linear-1.22: Linear Algebra

Copyright | (C) 2012-2015 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | Trustworthy
Language | Haskell2010

Linear.Plucker

Contents

- Operations on lines
- Basis elements

Description

Plücker coordinates for lines in 3d homogeneous space.

Synopsis

- data Plucker a = Plucker !a !a !a !a !a !a
- squaredError :: Num a => Plucker a -> a
- isotropic :: Epsilon a => Plucker a -> Bool
- (><) :: Num a => Plucker a -> Plucker a -> a
- plucker :: Num a => V4 a -> V4 a -> Plucker a
- plucker3D :: Num a => V3 a -> V3 a -> Plucker a
- parallel :: Epsilon a => Plucker a -> Plucker a -> Bool
- intersects :: (Epsilon a, Ord a) => Plucker a -> Plucker a -> Bool
- data LinePass
  - = Coplanar
  - | Clockwise
  - | Counterclockwise
- passes :: (Epsilon a, Ord a) => Plucker a -> Plucker a -> LinePass
- quadranceToOrigin :: Fractional a => Plucker a -> a
- closestToOrigin :: Fractional a => Plucker a -> V3 a
- isLine :: Epsilon a => Plucker a -> Bool
- coincides :: (Epsilon a, Fractional a) => Plucker a -> Plucker a -> Bool
- coincides' :: (Epsilon a, Fractional a, Ord a) => Plucker a -> Plucker a -> Bool
- p01 :: Lens' (Plucker a) a
- p02 :: Lens' (Plucker a) a
- p03 :: Lens' (Plucker a) a
- p10 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)
- p12 :: Lens' (Plucker a) a
- p13 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)
- p20 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)
- p21 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)
- p23 :: Lens' (Plucker a) a
- p30 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)
- p31 :: Lens' (Plucker a) a
- p32 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a)
- e01 :: E Plucker
- e02 :: E Plucker
- e03 :: E Plucker
- e12 :: E Plucker
- e31 :: E Plucker
- e23 :: E Plucker

# Documentation

data Plucker a Source #

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

Constructors

Plucker !a !a !a !a !a !a |

#### Instances

Instances details

Representable Plucker Source # |
Instance details Defined in Linear.Plucker Associated Types type Rep Plucker Source # Methods tabulate :: (Rep Plucker -> a) -> Plucker a Source # index :: Plucker a -> Rep Plucker -> a Source #
MonadFix Plucker Source # |
Instance details Defined in Linear.Plucker Methods mfix :: (a -> Plucker a) -> Plucker a Source #
MonadZip Plucker Source # |
Instance details Defined in Linear.Plucker Methods mzip :: Plucker a -> Plucker b -> Plucker (a, b) Source # mzipWith :: (a -> b -> c) -> Plucker a -> Plucker b -> Plucker c Source # munzip :: Plucker (a, b) -> (Plucker a, Plucker b) Source #
Foldable Plucker Source # |

Instance details

Defined in Linear.Plucker

Methods

fold :: Monoid m => Plucker m -> m Source #

foldMap :: Monoid m => (a -> m) -> Plucker a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Plucker a -> m Source #

foldr :: (a -> b -> b) -> b -> Plucker a -> b Source #

foldr' :: (a -> b -> b) -> b -> Plucker a -> b Source #

foldl :: (b -> a -> b) -> b -> Plucker a -> b Source #

foldl' :: (b -> a -> b) -> b -> Plucker a -> b Source #

foldr1 :: (a -> a -> a) -> Plucker a -> a Source #

foldl1 :: (a -> a -> a) -> Plucker a -> a Source #

toList :: Plucker a -> [a] Source #

null :: Plucker a -> Bool Source #

length :: Plucker a -> Int Source #

elem :: Eq a => a -> Plucker a -> Bool Source #

maximum :: Ord a => Plucker a -> a Source #

minimum :: Ord a => Plucker a -> a Source #

sum :: Num a => Plucker a -> a Source #

product :: Num a => Plucker a -> a Source #

Eq1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftEq :: (a -> b -> Bool) -> Plucker a -> Plucker b -> Bool Source #
Ord1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftCompare :: (a -> b -> Ordering) -> Plucker a -> Plucker b -> Ordering Source #
Read1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Plucker a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Plucker a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Plucker a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Plucker a] Source #
Show1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Plucker a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Plucker a] -> ShowS Source #
Traversable Plucker Source # |
Instance details Defined in Linear.Plucker Methods traverse :: Applicative f => (a -> f b) -> Plucker a -> f (Plucker b) Source # sequenceA :: Applicative f => Plucker (f a) -> f (Plucker a) Source # mapM :: Monad m => (a -> m b) -> Plucker a -> m (Plucker b) Source # sequence :: Monad m => Plucker (m a) -> m (Plucker a) Source #
Applicative Plucker Source # |
Instance details Defined in Linear.Plucker Methods pure :: a -> Plucker a Source # (<*>) :: Plucker (a -> b) -> Plucker a -> Plucker b Source # liftA2 :: (a -> b -> c) -> Plucker a -> Plucker b -> Plucker c Source # (*>) :: Plucker a -> Plucker b -> Plucker b Source # (<*) :: Plucker a -> Plucker b -> Plucker a Source #
Functor Plucker Source # |
Instance details Defined in Linear.Plucker Methods fmap :: (a -> b) -> Plucker a -> Plucker b Source # (<$) :: a -> Plucker b -> Plucker a Source #
Monad Plucker Source # |
Instance details Defined in Linear.Plucker Methods (>>=) :: Plucker a -> (a -> Plucker b) -> Plucker b Source # (>>) :: Plucker a -> Plucker b -> Plucker b Source # return :: a -> Plucker a Source #
Serial1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods serializeWith :: MonadPut m => (a -> m ()) -> Plucker a -> m () Source # deserializeWith :: MonadGet m => m a -> m (Plucker a) Source #
Distributive Plucker Source # |
Instance details Defined in Linear.Plucker Methods distribute :: Functor f => f (Plucker a) -> Plucker (f a) Source # collect :: Functor f => (a -> Plucker b) -> f a -> Plucker (f b) Source # distributeM :: Monad m => m (Plucker a) -> Plucker (m a) Source # collectM :: Monad m => (a -> Plucker b) -> m a -> Plucker (m b) Source #
Affine Plucker Source # |
Instance details Defined in Linear.Affine Associated Types type Diff Plucker :: Type -> Type Source # Methods (.-.) :: Num a => Plucker a -> Plucker a -> Diff Plucker a Source # (.+^) :: Num a => Plucker a -> Diff Plucker a -> Plucker a Source # (.-^) :: Num a => Plucker a -> Diff Plucker a -> Plucker a Source #
Metric Plucker Source # |
Instance details Defined in Linear.Plucker Methods dot :: Num a => Plucker a -> Plucker a -> a Source # quadrance :: Num a => Plucker a -> a Source # qd :: Num a => Plucker a -> Plucker a -> a Source # distance :: Floating a => Plucker a -> Plucker a -> a Source # norm :: Floating a => Plucker a -> a Source # signorm :: Floating a => Plucker a -> Plucker a Source #
Trace Plucker Source # |
Instance details Defined in Linear.Trace Methods trace :: Num a => Plucker (Plucker a) -> a Source # diagonal :: Plucker (Plucker a) -> Plucker a Source #
Finite Plucker Source # |
Instance details Defined in Linear.Plucker Associated Types type Size Plucker :: Nat Source # Methods toV :: Plucker a -> V (Size Plucker) a Source # fromV :: V (Size Plucker) a -> Plucker a Source #
Additive Plucker Source # |

Instance details

Defined in Linear.Plucker

Methods

zero :: Num a => Plucker a Source #

(^+^) :: Num a => Plucker a -> Plucker a -> Plucker a Source #

(^-^) :: Num a => Plucker a -> Plucker a -> Plucker a Source #

lerp :: Num a => a -> Plucker a -> Plucker a -> Plucker a Source #

liftU2 :: (a -> a -> a) -> Plucker a -> Plucker a -> Plucker a Source #

liftI2 :: (a -> b -> c) -> Plucker a -> Plucker b -> Plucker c Source #

Apply Plucker Source # |
Instance details Defined in Linear.Plucker Methods (<.>) :: Plucker (a -> b) -> Plucker a -> Plucker b Source # (.>) :: Plucker a -> Plucker b -> Plucker b Source # (<.) :: Plucker a -> Plucker b -> Plucker a Source # liftF2 :: (a -> b -> c) -> Plucker a -> Plucker b -> Plucker c Source #
Bind Plucker Source # |
Instance details Defined in Linear.Plucker Methods (>>-) :: Plucker a -> (a -> Plucker b) -> Plucker b Source # join :: Plucker (Plucker a) -> Plucker a Source #
Foldable1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods fold1 :: Semigroup m => Plucker m -> m Source # foldMap1 :: Semigroup m => (a -> m) -> Plucker a -> m Source # toNonEmpty :: Plucker a -> NonEmpty a Source #
Traversable1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods traverse1 :: Apply f => (a -> f b) -> Plucker a -> f (Plucker b) Source # sequence1 :: Apply f => Plucker (f b) -> f (Plucker b) Source #
Generic1 Plucker Source # |
Instance details Defined in Linear.Plucker Associated Types type Rep1 Plucker :: k -> Type Source # Methods from1 :: forall (a :: k). Plucker a -> Rep1 Plucker a Source # to1 :: forall (a :: k). Rep1 Plucker a -> Plucker a Source #
Lift a => Lift (Plucker a :: Type) Source # |
Instance details Defined in Linear.Plucker Methods lift :: Quote m => Plucker a -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Plucker a -> Code m (Plucker a) Source #
Unbox a => Vector Vector (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

basicUnsafeFreeze :: Mutable Vector s (Plucker a) -> ST s (Vector (Plucker a)) Source #

basicUnsafeThaw :: Vector (Plucker a) -> ST s (Mutable Vector s (Plucker a)) Source #

basicLength :: Vector (Plucker a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> Vector (Plucker a) -> Vector (Plucker a) Source #

basicUnsafeIndexM :: Vector (Plucker a) -> Int -> Box (Plucker a) Source #

basicUnsafeCopy :: Mutable Vector s (Plucker a) -> Vector (Plucker a) -> ST s () Source #

elemseq :: Vector (Plucker a) -> Plucker a -> b -> b Source #

Unbox a => MVector MVector (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

basicLength :: MVector s (Plucker a) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (Plucker a) -> MVector s (Plucker a) Source #

basicOverlaps :: MVector s (Plucker a) -> MVector s (Plucker a) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (Plucker a)) Source #

basicInitialize :: MVector s (Plucker a) -> ST s () Source #

basicUnsafeReplicate :: Int -> Plucker a -> ST s (MVector s (Plucker a)) Source #

basicUnsafeRead :: MVector s (Plucker a) -> Int -> ST s (Plucker a) Source #

basicUnsafeWrite :: MVector s (Plucker a) -> Int -> Plucker a -> ST s () Source #

basicClear :: MVector s (Plucker a) -> ST s () Source #

basicSet :: MVector s (Plucker a) -> Plucker a -> ST s () Source #

basicUnsafeCopy :: MVector s (Plucker a) -> MVector s (Plucker a) -> ST s () Source #

basicUnsafeMove :: MVector s (Plucker a) -> MVector s (Plucker a) -> ST s () Source #

basicUnsafeGrow :: MVector s (Plucker a) -> Int -> ST s (MVector s (Plucker a)) Source #

Storable a => Storable (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

sizeOf :: Plucker a -> Int Source #

alignment :: Plucker a -> Int Source #

peekElemOff :: Ptr (Plucker a) -> Int -> IO (Plucker a) Source #

pokeElemOff :: Ptr (Plucker a) -> Int -> Plucker a -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO (Plucker a) Source #

pokeByteOff :: Ptr b -> Int -> Plucker a -> IO () Source #

peek :: Ptr (Plucker a) -> IO (Plucker a) Source #

poke :: Ptr (Plucker a) -> Plucker a -> IO () Source #

Monoid a => Monoid (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods mempty :: Plucker a Source # mappend :: Plucker a -> Plucker a -> Plucker a Source # mconcat :: [Plucker a] -> Plucker a Source #
Semigroup a => Semigroup (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (<>) :: Plucker a -> Plucker a -> Plucker a Source # sconcat :: NonEmpty (Plucker a) -> Plucker a Source # stimes :: Integral b => b -> Plucker a -> Plucker a Source #
Floating a => Floating (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

pi :: Plucker a Source #

exp :: Plucker a -> Plucker a Source #

log :: Plucker a -> Plucker a Source #

sqrt :: Plucker a -> Plucker a Source #

(**) :: Plucker a -> Plucker a -> Plucker a Source #

logBase :: Plucker a -> Plucker a -> Plucker a Source #

sin :: Plucker a -> Plucker a Source #

cos :: Plucker a -> Plucker a Source #

tan :: Plucker a -> Plucker a Source #

asin :: Plucker a -> Plucker a Source #

acos :: Plucker a -> Plucker a Source #

atan :: Plucker a -> Plucker a Source #

sinh :: Plucker a -> Plucker a Source #

cosh :: Plucker a -> Plucker a Source #

tanh :: Plucker a -> Plucker a Source #

asinh :: Plucker a -> Plucker a Source #

acosh :: Plucker a -> Plucker a Source #

atanh :: Plucker a -> Plucker a Source #

log1p :: Plucker a -> Plucker a Source #

expm1 :: Plucker a -> Plucker a Source #

log1pexp :: Plucker a -> Plucker a Source #

log1mexp :: Plucker a -> Plucker a Source #

Generic (Plucker a) Source # |
Instance details Defined in Linear.Plucker Associated Types type Rep (Plucker a) :: Type -> Type Source # Methods from :: Plucker a -> Rep (Plucker a) x Source # to :: Rep (Plucker a) x -> Plucker a Source #
Ix a => Ix (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

range :: (Plucker a, Plucker a) -> [Plucker a] Source #

index :: (Plucker a, Plucker a) -> Plucker a -> Int Source #

unsafeIndex :: (Plucker a, Plucker a) -> Plucker a -> Int Source #

inRange :: (Plucker a, Plucker a) -> Plucker a -> Bool Source #

rangeSize :: (Plucker a, Plucker a) -> Int Source #

unsafeRangeSize :: (Plucker a, Plucker a) -> Int Source #

Num a => Num (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (+) :: Plucker a -> Plucker a -> Plucker a Source # (-) :: Plucker a -> Plucker a -> Plucker a Source # (*) :: Plucker a -> Plucker a -> Plucker a Source # negate :: Plucker a -> Plucker a Source # abs :: Plucker a -> Plucker a Source # signum :: Plucker a -> Plucker a Source # fromInteger :: Integer -> Plucker a Source #
Read a => Read (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods readsPrec :: Int -> ReadS (Plucker a) Source # readList :: ReadS [Plucker a] Source # readPrec :: ReadPrec (Plucker a) Source # readListPrec :: ReadPrec [Plucker a] Source #
Fractional a => Fractional (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (/) :: Plucker a -> Plucker a -> Plucker a Source # recip :: Plucker a -> Plucker a Source # fromRational :: Rational -> Plucker a Source #
Show a => Show (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods showsPrec :: Int -> Plucker a -> ShowS Source # show :: Plucker a -> String Source # showList :: [Plucker a] -> ShowS Source #
Binary a => Binary (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods put :: Plucker a -> Put Source # get :: Get (Plucker a) Source # putList :: [Plucker a] -> Put Source #
Serial a => Serial (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods serialize :: MonadPut m => Plucker a -> m () Source # deserialize :: MonadGet m => m (Plucker a) Source #
Serialize a => Serialize (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods put :: Putter (Plucker a) Source # get :: Get (Plucker a) Source #
NFData a => NFData (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods rnf :: Plucker a -> () Source #
Eq a => Eq (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (==) :: Plucker a -> Plucker a -> Bool Source # (/=) :: Plucker a -> Plucker a -> Bool Source #
Ord a => Ord (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods compare :: Plucker a -> Plucker a -> Ordering Source # (<) :: Plucker a -> Plucker a -> Bool Source # (<=) :: Plucker a -> Plucker a -> Bool Source # (>) :: Plucker a -> Plucker a -> Bool Source # (>=) :: Plucker a -> Plucker a -> Bool Source # max :: Plucker a -> Plucker a -> Plucker a Source # min :: Plucker a -> Plucker a -> Plucker a Source #
Hashable a => Hashable (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods hashWithSalt :: Int -> Plucker a -> Int Source # hash :: Plucker a -> Int Source #
Ixed (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods ix :: Index (Plucker a) -> Traversal' (Plucker a) (IxValue (Plucker a)) Source #
Epsilon a => Epsilon (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods nearZero :: Plucker a -> Bool Source #
Random a => Random (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods randomR :: RandomGen g => (Plucker a, Plucker a) -> g -> (Plucker a, g) Source # random :: RandomGen g => g -> (Plucker a, g) Source # randomRs :: RandomGen g => (Plucker a, Plucker a) -> g -> [Plucker a] Source # randoms :: RandomGen g => g -> [Plucker a] Source #
Unbox a => Unbox (Plucker a) Source # |
Instance details Defined in Linear.Plucker
FoldableWithIndex (E Plucker) Plucker Source # |

Instance details

Defined in Linear.Plucker

Methods

ifoldMap :: Monoid m => (E Plucker -> a -> m) -> Plucker a -> m Source #

ifoldMap' :: Monoid m => (E Plucker -> a -> m) -> Plucker a -> m Source #

ifoldr :: (E Plucker -> a -> b -> b) -> b -> Plucker a -> b Source #

ifoldl :: (E Plucker -> b -> a -> b) -> b -> Plucker a -> b Source #

ifoldr' :: (E Plucker -> a -> b -> b) -> b -> Plucker a -> b Source #

ifoldl' :: (E Plucker -> b -> a -> b) -> b -> Plucker a -> b Source #

FunctorWithIndex (E Plucker) Plucker Source # |
Instance details Defined in Linear.Plucker Methods imap :: (E Plucker -> a -> b) -> Plucker a -> Plucker b Source #
TraversableWithIndex (E Plucker) Plucker Source # |
Instance details Defined in Linear.Plucker Methods itraverse :: Applicative f => (E Plucker -> a -> f b) -> Plucker a -> f (Plucker b) Source #
Each (Plucker a) (Plucker b) a b Source # |
Instance details Defined in Linear.Plucker Methods each :: Traversal (Plucker a) (Plucker b) a b Source #
Field1 (Plucker a) (Plucker a) a a Source # |
Instance details Defined in Linear.Plucker Methods _1 :: Lens (Plucker a) (Plucker a) a a Source #
Field2 (Plucker a) (Plucker a) a a Source # |
Instance details Defined in Linear.Plucker Methods _2 :: Lens (Plucker a) (Plucker a) a a Source #
Field3 (Plucker a) (Plucker a) a a Source # |
Instance details Defined in Linear.Plucker Methods _3 :: Lens (Plucker a) (Plucker a) a a Source #
Field4 (Plucker a) (Plucker a) a a Source # |
Instance details Defined in Linear.Plucker Methods _4 :: Lens (Plucker a) (Plucker a) a a Source #
Field5 (Plucker a) (Plucker a) a a Source # |
Instance details Defined in Linear.Plucker Methods _5 :: Lens (Plucker a) (Plucker a) a a Source #
Field6 (Plucker a) (Plucker a) a a Source # |
Instance details Defined in Linear.Plucker Methods _6 :: Lens (Plucker a) (Plucker a) a a Source #
type Rep Plucker Source # |
Instance details Defined in Linear.Plucker type Rep Plucker = E Plucker
type Diff Plucker Source # |
Instance details Defined in Linear.Affine type Diff Plucker = Plucker
type Size Plucker Source # |
Instance details Defined in Linear.Plucker type Size Plucker = 6
type Rep1 Plucker Source # |

Instance details

Defined in Linear.Plucker

type Rep1 Plucker = D1 ('MetaData "Plucker" "Linear.Plucker" "linear-1.22-CRgBRfHw0OsL7QUZ7C9Pko" 'False) (C1 ('MetaCons "Plucker" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1))))

data MVector s (Plucker a) Source # |
Instance details Defined in Linear.Plucker data MVector s (Plucker a) = MV_Plucker !Int (MVector s a)
type Rep (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

type Rep (Plucker a) = D1 ('MetaData "Plucker" "Linear.Plucker" "linear-1.22-CRgBRfHw0OsL7QUZ7C9Pko" 'False) (C1 ('MetaCons "Plucker" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))))

type Index (Plucker a) Source # |
Instance details Defined in Linear.Plucker type Index (Plucker a) = E Plucker
type IxValue (Plucker a) Source # |
Instance details Defined in Linear.Plucker type IxValue (Plucker a) = a
data Vector (Plucker a) Source # |
Instance details Defined in Linear.Plucker data Vector (Plucker a) = V_Plucker !Int (Vector a)

squaredError :: Num a => Plucker a -> a Source #

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 -> Bool Source #

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 -> a infixl 5 Source #

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 a Source #

Given a pair of points represented by homogeneous coordinates generate Plücker coordinates for the line through them, directed from the second towards the first.

plucker3D :: Num a => V3 a -> V3 a -> Plucker a Source #

Given a pair of 3D points, generate Plücker coordinates for the line through them, directed from the second towards the first.

# Operations on lines

parallel :: Epsilon a => Plucker a -> Plucker a -> Bool Source #

Checks if two lines are parallel.

intersects :: (Epsilon a, Ord a) => Plucker a -> Plucker a -> Bool Source #

Checks if two lines intersect (or nearly intersect).

data LinePass Source #

Describe how two lines pass each other.

Constructors

Coplanar | The lines are coplanar (parallel or intersecting).
Clockwise | The lines pass each other clockwise (right-handed screw)
Counterclockwise | The lines pass each other counterclockwise (left-handed screw).

#### Instances

Instances details

Generic LinePass Source # |
Instance details Defined in Linear.Plucker Associated Types type Rep LinePass :: Type -> Type Source # Methods from :: LinePass -> Rep LinePass x Source # to :: Rep LinePass x -> LinePass Source #
Show LinePass Source # |
Instance details Defined in Linear.Plucker Methods showsPrec :: Int -> LinePass -> ShowS Source # show :: LinePass -> String Source # showList :: [LinePass] -> ShowS Source #
Eq LinePass Source # |
Instance details Defined in Linear.Plucker Methods (==) :: LinePass -> LinePass -> Bool Source # (/=) :: LinePass -> LinePass -> Bool Source #
type Rep LinePass Source # |
Instance details Defined in Linear.Plucker type Rep LinePass = D1 ('MetaData "LinePass" "Linear.Plucker" "linear-1.22-CRgBRfHw0OsL7QUZ7C9Pko" 'False) (C1 ('MetaCons "Coplanar" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Clockwise" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Counterclockwise" 'PrefixI 'False) (U1 :: Type -> Type)))

passes :: (Epsilon a, Ord a) => Plucker a -> Plucker a -> LinePass Source #

Check how two lines pass each other. `passes l1 l2` describes `l2` when looking down `l1`.

quadranceToOrigin :: Fractional a => Plucker a -> a Source #

The minimum squared distance of a line from the origin.

closestToOrigin :: Fractional a => Plucker a -> V3 a Source #

The point where a line is closest to the origin.

isLine :: Epsilon a => Plucker a -> Bool Source #

Not all 6-dimensional points correspond to a line in 3D. This predicate tests that a Plücker coordinate lies on the Grassmann manifold, and does indeed represent a 3D line.

coincides :: (Epsilon a, Fractional a) => Plucker a -> Plucker a -> Bool Source #

Checks if two lines coincide in space. In other words, undirected equality.

coincides' :: (Epsilon a, Fractional a, Ord a) => Plucker a -> Plucker a -> Bool Source #

Checks if two lines coincide in space, and have the same orientation.

# Basis elements

p01 :: Lens' (Plucker a) a Source #

These elements form a basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p01 :: Lens' (Plucker a) a
    p02 :: Lens' (Plucker a) a
    p03 :: Lens' (Plucker a) a
    p23 :: Lens' (Plucker a) a
    p31 :: Lens' (Plucker a) a
    p12 :: Lens' (Plucker a) a

p02 :: Lens' (Plucker a) a Source #

These elements form a basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p01 :: Lens' (Plucker a) a
    p02 :: Lens' (Plucker a) a
    p03 :: Lens' (Plucker a) a
    p23 :: Lens' (Plucker a) a
    p31 :: Lens' (Plucker a) a
    p12 :: Lens' (Plucker a) a

p03 :: Lens' (Plucker a) a Source #

These elements form a basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p01 :: Lens' (Plucker a) a
    p02 :: Lens' (Plucker a) a
    p03 :: Lens' (Plucker a) a
    p23 :: Lens' (Plucker a) a
    p31 :: Lens' (Plucker a) a
    p12 :: Lens' (Plucker a) a

p10 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a) Source #

These elements form an alternate basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p10 :: Num a => Lens' (Plucker a) a
    p20 :: Num a => Lens' (Plucker a) a
    p30 :: Num a => Lens' (Plucker a) a
    p32 :: Num a => Lens' (Plucker a) a
    p13 :: Num a => Lens' (Plucker a) a
    p21 :: Num a => Lens' (Plucker a) a

p12 :: Lens' (Plucker a) a Source #

These elements form a basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p01 :: Lens' (Plucker a) a
    p02 :: Lens' (Plucker a) a
    p03 :: Lens' (Plucker a) a
    p23 :: Lens' (Plucker a) a
    p31 :: Lens' (Plucker a) a
    p12 :: Lens' (Plucker a) a

p13 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a) Source #

These elements form an alternate basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p10 :: Num a => Lens' (Plucker a) a
    p20 :: Num a => Lens' (Plucker a) a
    p30 :: Num a => Lens' (Plucker a) a
    p32 :: Num a => Lens' (Plucker a) a
    p13 :: Num a => Lens' (Plucker a) a
    p21 :: Num a => Lens' (Plucker a) a

p20 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a) Source #

These elements form an alternate basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p10 :: Num a => Lens' (Plucker a) a
    p20 :: Num a => Lens' (Plucker a) a
    p30 :: Num a => Lens' (Plucker a) a
    p32 :: Num a => Lens' (Plucker a) a
    p13 :: Num a => Lens' (Plucker a) a
    p21 :: Num a => Lens' (Plucker a) a

p21 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a) Source #

These elements form an alternate basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p10 :: Num a => Lens' (Plucker a) a
    p20 :: Num a => Lens' (Plucker a) a
    p30 :: Num a => Lens' (Plucker a) a
    p32 :: Num a => Lens' (Plucker a) a
    p13 :: Num a => Lens' (Plucker a) a
    p21 :: Num a => Lens' (Plucker a) a

p23 :: Lens' (Plucker a) a Source #

These elements form a basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p01 :: Lens' (Plucker a) a
    p02 :: Lens' (Plucker a) a
    p03 :: Lens' (Plucker a) a
    p23 :: Lens' (Plucker a) a
    p31 :: Lens' (Plucker a) a
    p12 :: Lens' (Plucker a) a

p30 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a) Source #

These elements form an alternate basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p10 :: Num a => Lens' (Plucker a) a
    p20 :: Num a => Lens' (Plucker a) a
    p30 :: Num a => Lens' (Plucker a) a
    p32 :: Num a => Lens' (Plucker a) a
    p13 :: Num a => Lens' (Plucker a) a
    p21 :: Num a => Lens' (Plucker a) a

p31 :: Lens' (Plucker a) a Source #

These elements form a basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p01 :: Lens' (Plucker a) a
    p02 :: Lens' (Plucker a) a
    p03 :: Lens' (Plucker a) a
    p23 :: Lens' (Plucker a) a
    p31 :: Lens' (Plucker a) a
    p12 :: Lens' (Plucker a) a

p32 :: (Functor f, Num a) => (a -> f a) -> Plucker a -> f (Plucker a) Source #

These elements form an alternate basis for the Plücker space, or the Grassmanian manifold `Gr(2,V4)`.

    p10 :: Num a => Lens' (Plucker a) a
    p20 :: Num a => Lens' (Plucker a) a
    p30 :: Num a => Lens' (Plucker a) a
    p32 :: Num a => Lens' (Plucker a) a
    p13 :: Num a => Lens' (Plucker a) a
    p21 :: Num a => Lens' (Plucker a) a

e01 :: E Plucker Source #

e02 :: E Plucker Source #

e03 :: E Plucker Source #

e12 :: E Plucker Source #

e31 :: E Plucker Source #

e23 :: E Plucker Source #