Title: Rotation Matrix Mset Post by: M Benesi on June 02, 2013, 12:44:55 AM A little more computation... for the same thing. :D Will this allow a different approach to the bulb? Yes. Will it be better? Know. <-- it's a pun, figure it out
Better code: Code: // sx and nx are x variables... Title: Re: Rotation Matrix Mset Post by: M Benesi on June 02, 2013, 08:30:51 PM In 3d, doing something very similar leads to the "Spun Mandelbrot" of yore. I know this has all been said before, but I'm thinking about it now, and mentioning it might spark an idea in someone.... After applying a 3d rotation matrix (http://inside.mines.edu/~gmurray/ArbitraryAxisRotation/) (thanks Glenn Murray, for doing the work!), rotating about the vector (http://en.wikipedia.org/wiki/Euclidean_vector) (0,z,-y), you end up with the spun Mset: new x= x^2- (y^2+z^2) new y= 2*xy new z= 2*xz To get the vector (http://en.wikipedia.org/wiki/Euclidean_vector) to rotate around, I made the assumption that we rotate from the x-axis to the point (x,y,z), so took the cross product (http://en.wikipedia.org/wiki/Cross_product) of the x-axis (1,0,0) and (x,y,z). When you do the standard 2d Mset, you rotate around the vector (0,0,-y), which happens to be the same vector you'd rotate around if z=0..... :p |