History: Horta's Mestrado Thesis
In this work several proposals for modeling non-rigid objects were
analyzed and the approach suggested by Terzopoulos et al. is
implemented in C language with use of the numerical library Meschach. The relaxation method and, instead of
the Choleski decomposition which requires the matrix being a positive
definite one, the LU factorization are used for solving sparse linear
systems. For faciliting the input of modeling parameter values, a
simple description language was defined and its parser was implemented
with help of lex and yacc. For producing nice pictures of
the deforming surfaces, PoVRay and SIPP are used for rendering the generated results.
An Elastically Deformable Model
The deformation dynamics
are ruled by the equation of motion in its Lagrangean
formulation:
 |
(1) |
In equation (1), is the mass density and is the
dumping constant at a point . The vector denotes the
total contribution of external forces at in an instant .
The term corresponding to the internal energies accumulated due to
elastical deformation
is estimated from the following
empirical consideration:
 |
(2) |
which takes, for the metric and curvature tensors, a weighted norm of the
difference between the deformed state and rest state values. That measure
can reasonably estimate the elastical energy of a surface, attaching
the amount of energy to the variations in the surface's geometric shape.
In other words, that norm is a measure of the energy needed to displace the
surface's points, defined over a region , from their rest state.
By applying the weighted norms of equation (2), the following
simplified deformation energy:
 |
(3) |
The weights and are denominated elasticity parameters.
From equation (3)
an approximation for the
internal force
is suggested:
 |
(4) |
where the variables and are defined as:
 |
|
|
|
 |
|
|
(5) |
Since quantities are related to surface stretching,
while the values for are related
to curvature, the measures of deformation follow from these
quantities and the surface's behavior of resistance to external forces
will be as much effective as greater are the values assigned to the elasticity
parameters.
Discretization
The discretization turns the partial differential equation of
motion into a system of coupled ordinary differential equations.
The continuous space is discretized to a MxN-node mesh, where each
node represents a discrete point (or a nodal variable)
in 3D space. To the set of nodal variables
defined for MN nodes we call function mesh and
we denote it
.
Equations (4) and (5)
are respectively discretized to
![\begin{displaymath}
e_{ij}[m,n]=\sum^{2}_{i,j}-D^{-}_{i}({\bf\vec p})[m,n]+D^{(-)}_{ij}({\bf\vec q})[m,n]
\end{displaymath}](img24.gif) |
(6) |
where
![\begin{displaymath}
\alpha_{ij}[m,n]=\eta_{ij}[m,n](D^{+}_{i}({\bf\vec r})[m,n].D^{+}_{j}({\bf\vec r})[m,n]-G^{0}_{ij})
\end{displaymath}](img30.gif) |
(8) |
and
![\begin{displaymath}
\beta_{ij}[m,n]=\xi_{ij}[m,n]({\bf\vec n}[m,n].D^{(+)}_{ij}({\bf\vec r})[m,n]-B^{0}_{ij}).
\end{displaymath}](img31.gif) |
(9) |
One can observe that the values for the difference operators are not
determined for points laying at the boundaries of domain .
Nevertheless, a natural condition of boundary can be simulated by
assigning a value to any difference operator of
equation (7)
that refers to points
not belonging to the set of points MN of the mesh.
If the nodal variables in function meshes and
are grouped, respectively, into column matrices e
of dimension MN, then equation (6) can be
written in matrix form
 |
(10) |
where
is known as strength matrix.
The discrete form of the equation of motion can then be expressed by
the following coupled system of differential equations:
 |
(11) |
where
is the diagonal matrix formed by the mass density of
each element,
, the diagonal matrix formed by the dumping density of
each element and
, the column matrix containing the external force
applied to each element, calculated from
.
To simulate the dynamics of a non-rigid object, the system of differential
equations (11) must be integrated through time.
Those equations will be integrated using a step-by-step process, which
now converts a system of non-linear differential equations into
a sequence of linear systems.
The time interval from t=0 to t=T is subdivided into smaller time intervals of
same duration and the integration process carries out the
calculations for the sequence of approximated solutions for instants
t, t+ , t+2 , ... , T. Computing
in and in t, and substituting the
discrete-time approximations
 |
(12) |
 |
(13) |
in equation (11)
it is obtained
 |
(14) |
where
 |
(15) |
and
 |
(16) |
The column matrix of speed is given by:
 |
(17) |
An Animation
An animation of a cloth was generated for the Sibgrapi 94 Video Festival.
|