
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























Cloth simulation has been an important topic in
computer animation since the early 1980’s
It has been extensively researched, and has
reached a point where it is basically a solved
problem
Today, we will look at a very basic method of
cloth simulation. It is relatively easy to
implement and can achieve good results. It will
also serve as an introduction to some more
advanced cloth simulation topics.
Particle
Spring-damper
a f
m
v
r
=
i
f f
force
momentum
m mass
accelerati on
velocity
position
f
p
a
v
r
p = m v
General Physics Simulation:
For each particle: Apply gravity
For each spring-damper: Compute & apply forces
For each triangle: Compute & apply aerodynamic forces
For each particle: Apply forward Euler integration
1
r
2
r
2
v
1
v
The basic spring-damper connects
two particles and has three constants
defining its behavior
Spring constant: k
s
Damping factor: k
d
Rest length: l
0
A simple spring-damper class might look like:
class SpringDamper {
float SpringConstant,DampingFactor;
float RestLength;
Particle P1,P2;
public:
void ComputeForce();
};
To compute the forces in 3D:
Turn 3D distances & velocities into 1D
Compute spring force in 1D
Turn 1D force back into 3D force
We start by computing the unit length
vector e from r
1
to r
2
We can compute the distance l
between the two points in the process
1
r
2
r
l
l
2 1
e
e
e
e r r
e
l
Now, we can find the 1D force and
map it back into 3D
f e
sd
= f
1
e
2 1
1
0 1 2
f f
f e
sd
sd s d
f
f k l l k v v
2 1
f = − f
In the last lecture, we defined a simple
aerodynamic drag force on an object as:
_: density of the air (or water…)
c
d
: coefficient of drag for the object
a: cross sectional area of the object
e : unit vector in the opposite direction of the
velocity
f v c a e
aero d
2
= ρ
v
v
e = −
In order to compute the aerodynamic
forces, we need surfaces to apply it to
We will add some triangles to our
cloth definition, where each triangle
connects three particles
1
r
2
r
3
r
In order to compute our force:
we will need find the velocity,
normal, and area of the triangle
(we can assume that _ and c
d
are constants) 1
r
2
r
3
r f v c a n
aero d
2
= − ρ