- type Deformation = Either (SurfaceVertex3D -> Point3D) (SurfaceVertex3D -> SurfaceVertex3D)
- class DeformationClass a where
- deformation :: a -> Deformation
- constrain :: (a -> Bool) -> (a -> a) -> a -> a
Documentation
type Deformation = Either (SurfaceVertex3D -> Point3D) (SurfaceVertex3D -> SurfaceVertex3D)Source
A deformation of a surface. These come in two types: a deformation that modifies only the shape of a surface, leaving the normal vectors to be recalculated automatically, or a deformation that modified both the shape and the normal vectors explicitly.
For example, the deformation function of type (Point3D -> Ponit3D)
depends on automatic differentiation to determine the new surface normals.
On the other hand, an affine transformation applied as a deformation can quickly and correctly compute the new surface normals.
Finally, one might want to construct a deformation that modifies the surface normals while leaving the shape intact -- this is perfectly legal.
class DeformationClass a whereSource
A convenienve class to convert common descriptions of deformations into the canonical representation.
deformation :: a -> DeformationSource