rsagl-math- The RogueStar Animation and Graphics Library:
Mathematics     data Ray3D Source  Rays with endpoints and
vectors.  Although a ray is isomorphic to a SurfaceVertex3D, it
does not have the same behavior.    projectRay :: RSdouble ->
Ray3D -> Point3DSource  The parametric function of a ray. The
parameter is measured as a proportion of the length of the
vector. projectRay 0 is the endpoint of the ray. projectRay 1 is
the endpoint offset by the ray's vector.  distanceAlong :: Ray3D
-> Point3D -> RSdoubleSource  The inverse operation to
projectRay. This could also be understood as the height of the
point above the plane defined by the ray.  angleFrom :: Ray3D ->
Point3D -> AngleSource  The angle between vector of the ray and
the vector from the endpoint of the ray to the specified point.
normalizeRay :: Ray3D -> Ray3DSource  A ray normalize to a
length of 1.