Assignment 5 + Cumulative Submission
Assignment 5: Collision Response Implement collision response of a This assignment is worth ~8-12% of single convex object falling onto an the module infinite plane Minimum requirements: Rigid Body state (from previous) Unconstrained State update (from previous) Impulse magnitude j calculation Application of impulsive force and torque Detect a point of collision (from previous) Marking: Required Reading: Baraff, Pixar brute force solution tailored to Course Notes Siggraph 2001, Rigid minimum requirements: max ~80% Body Simulation, Section 8 – Colliding Contact General implementation: +~ 20%
Collision Response Calculate instantaneous change in rigid body state (linear and angular momenta) Based on impulse J We require: Point of contact, p Direction (contact normal), n P and n are obtained as part of contact modelling. j is calculated based on a Magnitude of impulse, j number of variables ...
Collision Impulse Magnitude 1 v ( ) rel j 1 1 ˆ ˆ ˆ ˆ 1 1 n I r n r n I r n r a a a b b b m m a b Inertial tensor in world space base on I body (constant) and orientation R Displacement vector from com to point of collision Relative velocity of contact points – based on instantaneous velocity of point due to angular and linear velocity of object p is the contact point Constants RB State variables Associated with a contact Derived values direction n Contact variables
Implementation For ease of coding, Baraff et al break down the impulse equation as follows: N j t 1 t 2 t 3 t 4 where N ( 1 ) v rel 1 t 1 m a 1 t 2 m b ˆ ˆ 1 t 3 n I ( r n ) r a a a ˆ ˆ 1 t 4 n I ( r n ) r b b b
Notes For efficiency (and stability), we normally store.. 1 instead of m m 1 I and instead of I body body For immovable objects (e.g. ground plane) use 1 Mass: infinite mass 0 m 1 Inertial Tensor: infinite moment of inertia I 0 body zero matrix (all entries 0) t2 and t4 are 0 in this case
Inertial Tensors During Simulation Inertial tensor is invariant to translation but changes with a body’s orientation Thankfully we can calculate I WORLD based on I BODY and R I BODY is a constant associated with the object. But how do we calculate this for general objects?
Inertial Tensor Examples w d h r h Above values are for an axis about the center of the object. m the is total mass.
Approximating I BODY : Bounding Volume Approximate object with a simpler bounding volume. Use tensor of the volume as I BODY of object. Enough for this assignment
Approximating I BODY : Other Approximations Approximate object as collection of volumes (this may be required for other purposes anyway) treat collection as collections of point masses of varying mass. (some overlap error) Alternatively we could work from a voxel representation of the object (Voxelization is slightly more common) . Treat each pixel as sampled point mass. Might take advantage of variable density.
Approximating I BODY : By Integration See: Brian Mirtich, “Fast and Accurate Computation of Polyhedral Mass Properties”, Journal of Graphics Tools. Vol. 1 (2) , 1996. Source Code Available at: http://jgt.akpeters.com/papers/Mirtich96/ Also see: http://www.geometrictools.com/
Cumulative Submission for all Labs Due 08/03/2010: This will account for ~30% of the labs so far (i.e. 15% of the full module) Implement a particle and rigid body dynamics engine capable of simulating a nonconcave object colliding with an infinite plane Submit a report detailing your implementation of the following: Particle simulation Submission: submit on a CD to Computer Rigid Body Unconstrained Motion science Reception, by 5pm 8 th March , code, Collision detection: broad and narrow phase executables and necessary files + a PDF of your Collision Response report with the title <Yourname- Any possible improvements (MAX 300 words) Yourstudentnumber-cs7057.pdf> Optional: Add a Link to a you tube video The report should mention any specific design choices you made, any implementation beyond the required minimum spec. Include names of any approaches you used with references where appropriate and optimisations. How your implementation differs from the notes or from Baraff et al. You will not be judged on the quality of the submission (style, grammar) but it is important that it clearly written and relatively concise (approx 0.5 – 1 page on each of the above points). You may submit a separate executable for each section or a demo featuring all the above points as once.
Marking Requirements met for all sub-assignments and sufficiently documented: ~80% Additional kudos for efficiency, completeness of code, complexity of demos, generality of implementation, soundness of implementation, consistency (“well -integratedness ”) of different sections: ~20%
Recommend
More recommend