You might find an answer or two by looking at my Transformation JavaScript
object used in the JavaScript Raytracer at
http://www.slimeland.com/jsinclude/transformation.js . The code is a little
more complicated than it needs to be, but it does the trick.
You might also benefit from looking at the cylinder intersection code at
http://www.slimeland.com/raytrace/objects/cylinder.js .
I wrote all of this code myself, without any references, so it's possible
that I overcomplicated some things.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|