A module with types to use in a 3D system, and various helper functions. Several more functions are available for use in the Data.SG.Geometry module.
A point in 3D space.
|Point3 (a, a, a)|
A relative vector (free vector) in 3D space. The triple is the x, y, z components,
and the last item is the squared magnitude of the vector, which is stored
with it to speed up various operations. It is suggested you use
to create one of these, unless the magnitude is easily apparent, e.g.
(0, 1, 1) 2
|Rel3 (a, a, a) a|
|IsomorphicVectors Triple Rel3'|
|IsomorphicVectors Rel3' Triple|
|IsomorphicVectors Rel3' Point3'|
|IsomorphicVectors Point3' Rel3'|
|Geometry Rel3' Point3' Line3'|
|Eq a => Eq (Rel3' a)|
|(Show a, Eq a, Num a) => Num (Rel3' a)|
|Ord a => Ord (Rel3' a)|
|Read a => Read (Rel3' a)|
|Show a => Show (Rel3' a)|
A line in 3D space. A line is a point and a free vector indicating direction. A line may be treated by a function as either finite (taking the magnitude of the free vector as the length) or infinite (ignoring the magnitude of the direction vector).