rsagl-0.6.0.1: The RogueStar Animation and Graphics Library

RSAGL.Modeling.Deformation

Synopsis

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.

constrain :: (a -> Bool) -> (a -> a) -> a -> aSource