Module Gg.P3
type t
= p3
The type for points.
val dim : int
dim
is the dimension of points of typep3
.
type mh
= m4
The type for matrices representing linear transformations of homogenous 3D space.
Constructors, accessors and constants
val v : float -> float -> float -> p3
v x y z
is the point(x y z)
.
val x : p3 -> float
x p
is the x coordinate ofp
.
val y : p3 -> float
y p
is the y coordinate ofp
.
val z : p3 -> float
y p
is the z coordinate ofp
.
val o : p3
o
is the point(0 0 0)
.
Functions
val tr : m4 -> p3 -> p3
tr m p
is the affine transform in homogenous 3D space of the pointp
bym
.Note. Since
m
is supposed to be affine the function ignores the last row ofm
.p
is treated as a finite point (its last coordinate in homogenous space is 1). UseV3.tr
to transform vectors (infinite points).