linear-1.0.1: Linear Algebra

Portability non-portable experimental Edward Kmett None

Linear.Plucker

Contents

Description

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

Synopsis

# Documentation

data Plucker a Source

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

Constructors

 Plucker !a !a !a !a !a !a

Instances

 Monad Plucker Functor Plucker Applicative Plucker Foldable Plucker Traversable Plucker Distributive Plucker Traversable1 Plucker Foldable1 Plucker Apply Plucker Bind Plucker Additive Plucker Metric Plucker Core Plucker Eq a => Eq (Plucker a) Fractional a => Fractional (Plucker a) Num a => Num (Plucker a) Ord a => Ord (Plucker a) Read a => Read (Plucker a) Show a => Show (Plucker a) Ix a => Ix (Plucker a) Storable a => Storable (Plucker a) Epsilon a => Epsilon (Plucker 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)

# Basis elements

p01 :: Functor f => (a -> f a) -> Plucker a -> f (Plucker 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 :: Functor f => (a -> f a) -> Plucker a -> f (Plucker 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 :: Functor f => (a -> f a) -> Plucker a -> f (Plucker 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 :: Functor f => (a -> f a) -> Plucker a -> f (Plucker 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 :: Functor f => (a -> f a) -> Plucker a -> f (Plucker 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 :: Functor f => (a -> f a) -> Plucker a -> f (Plucker 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
```