Safe Haskell | None |
---|---|

Language | Haskell2010 |

- data Deformation v = Deformation (Point v -> Point v)
- class Deformable a where
- deform' :: Scalar (V a) -> Deformation (V a) -> a -> a
- deform :: Deformation (V a) -> a -> a

- asDeformation :: (HasTrie (Basis v), HasBasis v) => Transformation v -> Deformation v

# Documentation

data Deformation v Source

`Deformations`

are a superset of the affine transformations
represented by the `Transformation`

type. In general they are not
invertable. `Deformation`

s include projective transformations.
`Deformation`

can represent other functions from points to points
which are "well-behaved", in that they do not introduce small wiggles.

Deformation (Point v -> Point v) |

Semigroup (Deformation v) | |

Monoid (Deformation v) |

class Deformable a where Source

deform' :: Scalar (V a) -> Deformation (V a) -> a -> a Source

`deform' epsilon d a`

transforms `a`

by the deformation `d`

.
If the type of `a`

is not closed under projection, approximate
to accuracy `epsilon`

.

deform :: Deformation (V a) -> a -> a Source

`deform d a`

transforms `a`

by the deformation `d`

.
If the type of `a`

is not closed under projection, `deform`

should call `deform'`

with some reasonable default value of
`epsilon`

.

Deformable (Point v) | |

(VectorSpace v, InnerSpace v, (~) * s (Scalar v), Ord s, Fractional s, Floating s, Show s, Show v) => Deformable (Located (Trail v)) | |

(VectorSpace v, InnerSpace v, (~) * s (Scalar v), Ord s, Fractional s, Floating s, Show s, Show v) => Deformable (Path v) |

asDeformation :: (HasTrie (Basis v), HasBasis v) => Transformation v -> Deformation v Source

`asDeformation`

converts a `Transformation`

to a `Deformation`

by
discarding the inverse transform. This allows reusing
`Transformation`

s in the construction of `Deformation`

s.