linear-0.2: Linear Algebra

Safe HaskellNone




data Plucker a Source

Plücker coordinates for lines in a 3-dimensional space.


Plucker a a a a a a 

squaredError :: (Eq a, Num a) => Plucker a -> aSource

Valid Plücker coordinates p will have squaredError p == 0

That said, floating point makes a mockery of this claim, so you may want to use nearZero.

isotropic :: Epsilon a => Plucker a -> BoolSource

Checks if the line is near-isotropic (isotropic vectors in this quadratic space represent lines in real 3d space)

(><) :: Num a => Plucker a -> Plucker a -> aSource

This isn't th actual metric because this bilinear form gives rise to an isotropic quadratic space

plucker :: Num a => V4 a -> V4 a -> Plucker aSource

Given a pair of points represented by homogeneous coordinates generate Plücker coordinates for the line through them.

intersects :: Epsilon a => Plucker a -> Plucker a -> BoolSource

Checks if the two vectors intersect (or nearly intersect)