|
![](/i/fill.gif) |
The notation is hard to read. I think that maybe I would have
understood what was going on if it was written in MathML. I found
http://biokyb.dyndns.org/aknet/cg/ray_sphere_intersect_algebraic/ this
workout of the problem, and it pretty much matched my own calculations,
so I decided the book was wrong, and that the POV-Ray code matches what
is in the link I found. I'm still not sure if the psudocode explanation
makes sense. But I found an overlooked math fact that leads to multiple
optimizations If D is actually a unit vector like it is supposed to be
then D.D has to be "1". Thus...
The line starting with #local D2 can be removed. The next line will now
be.
#local SQ = DV*DV - (vdot(V,V) - R*R);
And
#local T2 = (-DV-SQ);
Post a reply to this message
|
![](/i/fill.gif) |