This is my work for
CSC2529F: Computer Animation course,
Assignment #1


quick-links to parts of this document:
all MPEGs available
Question 1a)
Question 1b)
Question 3: extension to system
Insights gained
Other extensions (minor)
Source

links to all MPEGs available


Question 1: a) the flag

First, here's a basic 8-by-8 flag, attached at the two top corners:
MPEG, network file

Then there is the same 8-by-8 flag, but attached by the side corners:
MPEG, network file

Finally, here is a 7-by-7 flag, also attached by the sides, but in stronger wind:
MPEG, network file

Just for fun, here is a sail:
MPEG, network file

In fact, most of these 'network' files can be much more easily generated with a utility I wrote for just this purpose:

(it's source is included in my complete source tree, and is made automatically by 'make')

The syntax of this command is:
flag_maker <cols> <rows> <dcol> <drow> <mass> <kp> <kd> <height> where,


Question 1: b) the soft ball

For starters, here's a general network file for the ball:
network.ball

Like the flag, this file was generated automatically by another utility I wrote:

(and like flag_maker, it is included in the tree source)

It's syntax is:
ball_maker <arcs> <slices> <radius> <mass> <height> <kp> <kd>
where,

Here are some MPEGs of the ball from different angles:

Here are some MPEGs of other objects generated with the ball_maker program:

The 2 pyramid object was created with 2 arcs and 4 slices.
The 2 cones object was created with 2 arcs and 10 slices.

Question 3: extension of the mass-spring system

Instead of the research paper I extended the mass-spring system from question 1 so that it is able to imitate fabrics better, using the Deformation Constraint technique (Xavier Provot, Deformation Constraints in a Mass-Spring Model to Describe Rigid Cloth Behaviour, Graphics Interface '95, pp.147-154).

The flag_maker utility turns on this ability using the 'cloth_model' command in the network file.

Here's an MPEG of a flag hanging down without deformation constraint:
unrestrained flag MPEG, its network file
While here is an MPEG of the same flag hanging down WITH deformation constraint (20% max deformation):
constrained flag MPEG, its network file

In fact, all of the flag network files mentioned in Question 1 used this deformation control.

To select a different constraint (maximum percentage deformation), just modify the ELASTICITY_MAX constant.


Insights gained
Other extensions (minor ones)

Here's a list of new commands that are now allowed in network files:

The 'spring' command has been extended to have an additional optional parameter at the end; if this parameter starts with 'n' or 'N', the spring will not be painted (although its effect can be seen). This is very handy for flexion springs which would otherwise obscure the true shape of the object.

The 'masspt' command has been extended to have an additional optional parameter (specified before the optional velocity component). It specifies an attraction (or repulsion if negative) coefficient which is used to attract or repulse all other particles. I've modelled the attraction somewhat on gravitational pull with the exception that the mass of the attractor is irrelavent (instead, the above mentioned parameter is used). This is so that one would be free to set its mass to whatever is necessary to achieve the desired effect (for example one could want to make the attractor really light so it rolls very far on the ground, and yet have it attract very strongly).

Two more utilities have been added on: hair_maker and grass_maker. Both have similar syntax to flag_maker and hence their full syntax is not given here. hair_maker generates a patch of hair, while grass_maker generates a patch of grass on the ground plane.


Source tree

Here's my complete source directory, including the lib directory. Since I modified almost all files, it's much easier just to download the whole source tree. This includes the source for the two utilities I mentioned above (flag_maker and ball_maker).

mac.tgz

The problem with ball_maker has been fixed...


Last modified on: Thu Apr 2 19:38:13 EST 1998