The display models that we have described represent the external surface of the artificial fish's body and give the realistic appearance of a variety of fishes. On the other hand, the dynamic fish model described in Chapter , represents the underlying ``flesh'' that moves and deform over time to produce the locomotion of the fish. The geometric fish surfaces need to be coupled to the dynamic model so that they will move and deform in accordance with the biomechanical simulation. A straightforward way to achieve this task is to associate the control points of the geometric surface model (in this instance, NURBS surfaces) to the faces of the dynamic model.

The dynamic fish model consists of six segments which are denoted as
, . corresponds to the fish's head and
the fish's tail (see Fig. ). Each has four
quadrilateral faces ( and two of the faces of can be
treated as quadrilaterals by double counting one of the vertices of
the triangles). An intuitive method of associating the NURBS surface to these faces is to find, for each control point of
the NURBS surface, a corresponding point on the quadrilateral
faces. To this end, we subdivide each face into sixteen patches as
shown in Fig. and define each face as a parametric
bilinear surface with parameters and . Let
us refer to the 3D vertices of the patches as `patch-nodes'. After the
subdivision, each face has in total twenty-five patch-nodes (four
of which are the original vertices that define the corners of the
face). Given the values of *s* and *t* and the 3D coordinates of the
four corners of the face, the coordinates of each patch-node *P*(*s*,*t*)
can be easily calculated. The resulting number of patch-nodes covering
half of the biomechanical fish model matches the number of control
points of the corresponding NURBS surface.

**Figure:** The subdivision of the faces of the dynamic fish.

The procedure of obtaining the positions of the control points of the NURBS surfaces over time is as follows:

- Calculate the positions of all patch-nodes of the initial, undeformed dynamic fish model.
- Calculate a 3D local coordinate system (
*u*,*v*,*w*) for each face. The*u*-axis is the normal of the surface and one of the edges of the face is the*v*-axis. - Calculate the ``offset vectors'' pointing from each patch-node to its matching control point in the local coordinate system.
- For each display time step:
- Update the patch-node positions.
- Update the local coordinate systems for each face.
- Offset each patch-node by the corresponding offset vector in the appropriate local coordinate system to update the positions of the control points.
- Transform the coordinates of control points from the local
coordinate systems to the world coordinate system.

Fig. shows the overlaying control point mesh and the underlying dynamic fish model. Fig. shows how the control point mesh deforms according to the shape of the dynamic fish. More importantly, our animations have also demonstrated that unnatural texture distortions due to surface deformation are very small and barely visible.

**Figure:** The geometric NURBS surface fish deforms with the dynamic fish.

Xiaoyuan Tu | January 1996 |