From: "Morgan L. Owens" Sent: Wednesday, May 22, 2002 3:28 PM
I think I'm outclassed. I mean, here's me still tinkering in two dimensions... Next thing to do would be to parameterise things a bit...
As much as I like ego strokes (who doesn't?) cudos should go to the POV-Ray team: A few years ago I nosed around in POV's source - the sphere and plane intersection code in my formulas is more or less gleaned from there (all I did was bolting the different pieces together...). As of more paramters, I've cobbled together a patch for both formulas to move the "camera" around a bit: ;---------------------- Parameter usage ----------------------- ;p1r: camera shift x ;p1i: camera shift y ;p2r: camera shift z ;p2i: rotation around x-axis (will be applied before p3r) :p3r: rotation around y-axis ;-------------------------------------------------------------- The patch proper has to replace everything below the coordinate constants (sphere centers and unit vector directions) up to the ;------------- TetraSpheres and TetraSpheresBas --------------- tmp2 = pi/180 tmp1 = exp(flip(imag(p2)*tmp2)), tmp2 = exp(flip(real(p3)*tmp2)) dxy = flip(conj(tmp2)) ; pxy = tmp2*real(pixel) - dxy*imag(tmp1)*imag(pixel) pz = imag(pxy) + real(p2) pxy = real(pxy) + flip(real(tmp1)*imag(pixel)) + p1 ; vxy = dxy*real(tmp1) vz = imag(vxy) vxy = real(vxy) + flip(imag(tmp1)) : ;-------------------------------------------------------------- In TetraSpheresBas also replace ":" with "j = 1:" That's all, Gerald And now on to the new "only 2d"<grin> stuff you have brewed up...