Go to the first, previous, next, last section, table of contents.


rayHitsSphereAt

Function: rayHitsSphereAt { O D S r -> P s }
file: jobg.t
package: muf
status: alpha

Basic raytracing primitive: Given a ray at origin O with direction vector D and a sphere given by center S (all length-three vectors) and radius r, this function returns nil,largevalue if there was no intersection, else the point of intersection P and the parametric ray coordinate of the intersection, a scalar s. (One often uses s to check which of several candidate hits is in fact first on the ray.)


Go to the first, previous, next, last section, table of contents.