linear-1.21.1: 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

Monad Plucker Source # |
Instance details Defined in Linear.Plucker Methods (>>=) :: Plucker a -> (a -> Plucker b) -> Plucker b (>>) :: Plucker a -> Plucker b -> Plucker b return :: a -> Plucker a
Functor Plucker Source # |
Instance details Defined in Linear.Plucker Methods fmap :: (a -> b) -> Plucker a -> Plucker b # (<$) :: a -> Plucker b -> Plucker a #
MonadFix Plucker Source # |
Instance details Defined in Linear.Plucker Methods mfix :: (a -> Plucker a) -> Plucker a
Applicative Plucker Source # |
Instance details Defined in Linear.Plucker Methods pure :: a -> Plucker a (<*>) :: Plucker (a -> b) -> Plucker a -> Plucker b liftA2 :: (a -> b -> c) -> Plucker a -> Plucker b -> Plucker c (*>) :: Plucker a -> Plucker b -> Plucker b (<*) :: Plucker a -> Plucker b -> Plucker a
Foldable Plucker Source # |

Instance details

Defined in Linear.Plucker

Methods

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

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

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

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

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

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

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

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

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

toList :: Plucker a -> [a]

null :: Plucker a -> Bool

length :: Plucker a -> Int

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

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

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

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

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

Traversable Plucker Source # |
Instance details Defined in Linear.Plucker Methods traverse :: Applicative f => (a -> f b) -> Plucker a -> f (Plucker b) # sequenceA :: Applicative f => Plucker (f a) -> f (Plucker a) mapM :: Monad m => (a -> m b) -> Plucker a -> m (Plucker b) sequence :: Monad m => Plucker (m a) -> m (Plucker a)
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 #
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 #
Show1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Plucker a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Plucker a] -> ShowS
Read1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Plucker a) liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Plucker a] liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Plucker a) liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Plucker a]
Ord1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftCompare :: (a -> b -> Ordering) -> Plucker a -> Plucker b -> Ordering
Eq1 Plucker Source # |
Instance details Defined in Linear.Plucker Methods liftEq :: (a -> b -> Bool) -> Plucker a -> Plucker b -> Bool
MonadZip Plucker Source # |
Instance details Defined in Linear.Plucker Methods mzip :: Plucker a -> Plucker b -> Plucker (a, b) mzipWith :: (a -> b -> c) -> Plucker a -> Plucker b -> Plucker c munzip :: Plucker (a, b) -> (Plucker a, Plucker b)
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 #
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 #
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 #
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 #
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 #
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 #

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 #
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 #
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 #
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 #
Unbox a => Vector Vector (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Plucker a) -> m (Vector (Plucker a)) Source #

basicUnsafeThaw :: PrimMonad m => Vector (Plucker a) -> m (Mutable Vector (PrimState m) (Plucker a)) Source #

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

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

basicUnsafeIndexM :: Monad m => Vector (Plucker a) -> Int -> m (Plucker a) Source #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Plucker a) -> Vector (Plucker a) -> m () 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 :: PrimMonad m => Int -> m (MVector (PrimState m) (Plucker a)) Source #

basicInitialize :: PrimMonad m => MVector (PrimState m) (Plucker a) -> m () Source #

basicUnsafeReplicate :: PrimMonad m => Int -> Plucker a -> m (MVector (PrimState m) (Plucker a)) Source #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Plucker a) -> Int -> m (Plucker a) Source #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Plucker a) -> Int -> Plucker a -> m () Source #

basicClear :: PrimMonad m => MVector (PrimState m) (Plucker a) -> m () Source #

basicSet :: PrimMonad m => MVector (PrimState m) (Plucker a) -> Plucker a -> m () Source #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Plucker a) -> MVector (PrimState m) (Plucker a) -> m () Source #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Plucker a) -> MVector (PrimState m) (Plucker a) -> m () Source #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Plucker a) -> Int -> m (MVector (PrimState m) (Plucker a)) Source #

Eq a => Eq (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (==) :: Plucker a -> Plucker a -> Bool (/=) :: Plucker a -> Plucker a -> Bool
Floating a => Floating (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

pi :: Plucker a

exp :: Plucker a -> Plucker a

log :: Plucker a -> Plucker a

sqrt :: Plucker a -> Plucker a

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

logBase :: Plucker a -> Plucker a -> Plucker a

sin :: Plucker a -> Plucker a

cos :: Plucker a -> Plucker a

tan :: Plucker a -> Plucker a

asin :: Plucker a -> Plucker a

acos :: Plucker a -> Plucker a

atan :: Plucker a -> Plucker a

sinh :: Plucker a -> Plucker a

cosh :: Plucker a -> Plucker a

tanh :: Plucker a -> Plucker a

asinh :: Plucker a -> Plucker a

acosh :: Plucker a -> Plucker a

atanh :: Plucker a -> Plucker a

log1p :: Plucker a -> Plucker a

expm1 :: Plucker a -> Plucker a

log1pexp :: Plucker a -> Plucker a

log1mexp :: Plucker a -> Plucker a

Fractional a => Fractional (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (/) :: Plucker a -> Plucker a -> Plucker a recip :: Plucker a -> Plucker a fromRational :: Rational -> Plucker a
Num a => Num (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (+) :: Plucker a -> Plucker a -> Plucker a (-) :: Plucker a -> Plucker a -> Plucker a (*) :: Plucker a -> Plucker a -> Plucker a negate :: Plucker a -> Plucker a abs :: Plucker a -> Plucker a signum :: Plucker a -> Plucker a fromInteger :: Integer -> Plucker a
Ord a => Ord (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods compare :: Plucker a -> Plucker a -> Ordering (<) :: Plucker a -> Plucker a -> Bool (<=) :: Plucker a -> Plucker a -> Bool (>) :: Plucker a -> Plucker a -> Bool (>=) :: Plucker a -> Plucker a -> Bool max :: Plucker a -> Plucker a -> Plucker a min :: Plucker a -> Plucker a -> Plucker a
Read a => Read (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods readsPrec :: Int -> ReadS (Plucker a) readList :: ReadS [Plucker a] readPrec :: ReadPrec (Plucker a) readListPrec :: ReadPrec [Plucker a]
Show a => Show (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods showsPrec :: Int -> Plucker a -> ShowS show :: Plucker a -> String showList :: [Plucker a] -> ShowS
Ix a => Ix (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods range :: (Plucker a, Plucker a) -> [Plucker a] index :: (Plucker a, Plucker a) -> Plucker a -> Int unsafeIndex :: (Plucker a, Plucker a) -> Plucker a -> Int inRange :: (Plucker a, Plucker a) -> Plucker a -> Bool rangeSize :: (Plucker a, Plucker a) -> Int unsafeRangeSize :: (Plucker a, Plucker a) -> Int
Generic (Plucker a) Source # |
Instance details Defined in Linear.Plucker Associated Types type Rep (Plucker a) :: Type -> Type Methods from :: Plucker a -> Rep (Plucker a) x to :: Rep (Plucker a) x -> Plucker a
Semigroup a => Semigroup (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods (<>) :: Plucker a -> Plucker a -> Plucker a sconcat :: NonEmpty (Plucker a) -> Plucker a stimes :: Integral b => b -> Plucker a -> Plucker a
Monoid a => Monoid (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods mempty :: Plucker a mappend :: Plucker a -> Plucker a -> Plucker a mconcat :: [Plucker a] -> Plucker a
Lift a => Lift (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods lift :: Plucker a -> Q Exp
Storable a => Storable (Plucker a) Source # |

Instance details

Defined in Linear.Plucker

Methods

sizeOf :: Plucker a -> Int

alignment :: Plucker a -> Int

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

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

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

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

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

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

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 #
Hashable a => Hashable (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods hashWithSalt :: Int -> Plucker a -> Int Source # hash :: Plucker a -> Int Source #
Unbox a => Unbox (Plucker a) Source # |
Instance details Defined in Linear.Plucker
Ixed (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods ix :: Index (Plucker a) -> Traversal' (Plucker a) (IxValue (Plucker a)) 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 #

randomRIO :: (Plucker a, Plucker a) -> IO (Plucker a) Source #

randomIO :: IO (Plucker a) Source #

Binary a => Binary (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods put :: Plucker a -> Put get :: Get (Plucker a) putList :: [Plucker a] -> Put
NFData a => NFData (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods rnf :: Plucker a -> ()
Epsilon a => Epsilon (Plucker a) Source # |
Instance details Defined in Linear.Plucker Methods nearZero :: Plucker a -> Bool Source #
Generic1 Plucker Source # |
Instance details Defined in Linear.Plucker Associated Types type Rep1 Plucker :: k -> Type Methods from1 :: forall (a :: k). Plucker a -> Rep1 Plucker a to1 :: forall (a :: k). Rep1 Plucker a -> Plucker a
FunctorWithIndex (E Plucker) Plucker Source # |
Instance details Defined in Linear.Plucker Methods imap :: (E Plucker -> a -> b) -> Plucker a -> Plucker b Source # imapped :: IndexedSetter (E Plucker) (Plucker a) (Plucker b) a b Source #
FoldableWithIndex (E Plucker) Plucker Source # |

Instance details

Defined in Linear.Plucker

Methods

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

ifolded :: IndexedFold (E Plucker) (Plucker a) a 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 #

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 # itraversed :: IndexedTraversal (E Plucker) (Plucker a) (Plucker b) a 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 Size Plucker Source # |
Instance details Defined in Linear.Plucker type Size Plucker = 6
type Diff Plucker Source # |
Instance details Defined in Linear.Affine type Diff Plucker = Plucker
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.21.1-HlENKBPK2Ju8kawdeh6a8q" '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)))))

data Vector (Plucker a) Source # |
Instance details Defined in Linear.Plucker data Vector (Plucker a) = V_Plucker !Int (Vector 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
type Rep1 Plucker Source # |

Instance details

Defined in Linear.Plucker

type Rep1 Plucker = D1 ('MetaData "Plucker" "Linear.Plucker" "linear-1.21.1-HlENKBPK2Ju8kawdeh6a8q" '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))))

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

Eq LinePass Source # |
Instance details Defined in Linear.Plucker Methods (==) :: LinePass -> LinePass -> Bool (/=) :: LinePass -> LinePass -> Bool
Show LinePass Source # |
Instance details Defined in Linear.Plucker Methods showsPrec :: Int -> LinePass -> ShowS show :: LinePass -> String showList :: [LinePass] -> ShowS
Generic LinePass Source # |
Instance details Defined in Linear.Plucker Associated Types type Rep LinePass :: Type -> Type Methods from :: LinePass -> Rep LinePass x to :: Rep LinePass x -> LinePass
type Rep LinePass Source # |
Instance details Defined in Linear.Plucker type Rep LinePass = D1 ('MetaData "LinePass" "Linear.Plucker" "linear-1.21.1-HlENKBPK2Ju8kawdeh6a8q" '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 #