Tinker Toy (Multiple Constraint Particle System)
A constrained particle system is implemented in this project. 5 particles are included and 3 types of constraints are realized. The constraints are maintained by applying constraint forces.
The first constraint is C(x,y) = x^2+y^2-d. So the particle stays on a circle.
The second constraints is C(x1, y1, x2, y2) = (x1-x2)^2+(y1-y2)^2-d. So the distance between two particles are kept the same.
The third constraint is C(x, y) = y-sin(x). So the particle stays on a Sine curve.
The particles are updated by a RK-4 integrator.
The first constraint is C(x,y) = x^2+y^2-d. So the particle stays on a circle.
The second constraints is C(x1, y1, x2, y2) = (x1-x2)^2+(y1-y2)^2-d. So the distance between two particles are kept the same.
The third constraint is C(x, y) = y-sin(x). So the particle stays on a Sine curve.
The particles are updated by a RK-4 integrator.
Rigid Body Simulation
In this project, I implemented a rigid body system with three types of primitives (ellipse, box, cylinder).
A standard rigid body simulation scheme is used and I replaced the rotation matrix with quaternion to ensure further stability.
A simple fracture method is used to simulate fracture of the model when a giant force is applied. After the fracture, the inertia tensor is recomputed for each of the fractured parts.
A standard rigid body simulation scheme is used and I replaced the rotation matrix with quaternion to ensure further stability.
A simple fracture method is used to simulate fracture of the model when a giant force is applied. After the fracture, the inertia tensor is recomputed for each of the fractured parts.