Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for working with 2-dimensional homogeneous coordinates.
Documentation
vector :: Num a => V2 a -> V3 a Source #
Convert a 2-dimensional affine vector into a 3-dimensional homogeneous vector,
i.e. sets the w
coordinate to 0.
point :: Num a => V2 a -> V3 a Source #
Convert a 2-dimensional affine point into a 3-dimensional homogeneous vector,
i.e. sets the w
coordinate to 1.
normalizePoint :: Fractional a => V3 a -> V2 a Source #
Convert 3-dimensional projective coordinates to a 2-dimensional
point. This operation may be denoted, euclidean [x:y:w] = (x/w,
y/w)
where the projective, homogeneous, coordinate
[x:y:z]
is one of many associated with a single point (x/w,
y/w)
.