Laplacian mesh deformation
npm install laplacian-deformationlaplacian deformation module
=====================

This module implements laplacian surface editing.
This technique allows you to deform the surface of a mesh, while still preserving the details of the surface.
We implement this by minimizing the energy function (5) in the linked paper.
To run a minimal example do:
npm run minimal
To run a more advanced demo do:
npm run start
In our current API, we load the module as
``javascript`
require("laplacian-deformation").load(function(initModule,prepareDeform, doDeform, freeModule) {
// code that uses the API here.
}
The API consists of four methods. We describe them below.
initializes the module for doing deformation on mesh. Must be called
before any other methods in the API.
Does precalculations necessary for performing deformation on a region
of vertices of the mesh. Note that this is a slow operation that
performs performs a cholesky decomposition!
* handles vertices that can be freely manipulated and moved by the user of the library.
* unconstrained these are vertices that are free, and are solved for
in the laplacian deformation calculations.
Some images will serve to clarify the meaning of the above
parameters.

In the image, handles is yellow, unconstrained is blue, and the gray region are vertices not affected by thehandles
deformation. Only yellow and blue vertices are affected by the deformation, so these are in the region of deformation.
Note that the user is expected to specify boundary vertices that specify the end of the region of deformation.
In the above image, these boundary vertices are the yellow vertices above the gray vertices, and these boundary
vertices are part of the vertices. So their positions can be manipulated as well.
The user of the library deforms the mesh by setting the positions of
the handles vertices by calling doDeform. One possible
deformation can look like the below:

It is shown in minimal/minimal.js how this deformation was done.
After calling prepareDeform(), we can use doDeform() to specifyhandles
the positions of the vertices, and thus deform theprepareDeform
mesh. The function returns the vertex coordinates of the deformed mesh. We can call
this function as many times as we want after calling .prepareDeform
In difference to , this is a very fast operation.
* handlesPositions is simply an array of coordinates of the[[x,y,z], [x,y,z], ...]
format . The first coordinate sets thehandles[0]`, and so on.
positions of the handle