DOC PREVIEW
CMU CS 15462 - Physical simulation for animation

This preview shows page 1-2-3-25-26-27 out of 27 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Computer Graphics 15-462Physical simulation foranimationCase study: The jello cubeThe Jello CubeMass-Spring SystemCollision DetectionIntegratorsThe Jello CubeMass-Spring SystemCollision DetectionIntegratorsSeptember 17 20022Computer Graphics 15-462Announcements• Programming assignment 3 is out. It is due Tuesday, November 5th midnight.• Midterm exam:– Next week on Thursday in class3Computer Graphics 15-462Undeformed cubeThe jello cubeDeformed cube• The jello cube is elastic,• Can be bent, stretched, squeezed, …,• Without external forces, it eventually restores to the original shape.4Computer Graphics 15-462Physical simulations• Model nature by using the laws of physics• Often, the only way to achieve realism• Alternative: try various non-scientific tricks to achieve realistic effects• Math becomes too complicated very quicklyIsn’t it incredible that nature can compute everything (you, me, and the whole universe) on the fly, it is the fastest computer ever.• Important issues: simulation accuracy and stability5Computer Graphics 15-462Simulation or real?6Computer Graphics 15-462Mass-Spring System• Several mass points• Connected to each other by springs• Springs expand and stretch, exerting force on the mass points• Very often used to simulate cloth• Examples:A 2-particle spring systemAnother 2-particle exampleCloth animation example7Computer Graphics 15-462Newton’s Laws• Newton’s 2nd law:amFrr=• Newton’s 3rd law: If object A exerts a force F on object B, then object B is at the same time exerting force -F on A.• Tells you how to compute acceleration, given the force and massFrFr−8Computer Graphics 15-462Single spring• Obeys the Hook’s law:F = k (x - x0)• x0= rest length• k = spring elasticity(aka stiffness)• For x<x0, springwants to extend• For x>x0, spring wants to contract9Computer Graphics 15-462Hook’s law in 3D• Assume A and B two mass points connected with a spring.• Let L be the vector pointing from B to A• Let R be the spring rest length• Then, the elastic force exerted on A is:||)|(|LLRLkFHookrrrr−−=10Computer Graphics 15-462Damping• Springs are not completely elastic• They absorb some of the energy and tend to decrease the velocity of the mass points attached to them• Damping force depends on the velocity:• kd= damping coefficient • kddifferent than kHook !!vkFdrr−=11Computer Graphics 15-462Damping in 3D• Assume A and B two mass points connected with a spring.• Let L be the vector pointing from B to A• Then, the damping force exerted on A is:• Here vAand vBare velocities of points A and B• Damping force always OPPOSES the motion||||)(LLLLvvkFBAdrrrrrrr⋅−−=12Computer Graphics 15-462A network of springs• Every mass point connected tosome other points by springs• Springs exert forces on mass points– Hook’s force– Damping force• Other forces– External force field» Gravity» Electrical or magnetic force field– Collision force13Computer Graphics 15-462How to organize the network(for jello cube)• To obtain stability, must organize the network of springs in some clever way• Jello cube is a 8x8x8 mass point network• 512 discrete points• Must somehow connect them with springsBasic network Stable network Network out of control14Computer Graphics 15-462Solution:Structural, Shear and Bend Springs• There will be threetypes of springs:– Structural– Shear– Bend• Each has its own function15Computer Graphics 15-462Structural springs• Connect every node to its 6 direct neighbours• Node (i,j,k) connected to– (i+1,j,k), (i-1,j,k), (i,j-1,k), (i,j+1,k), (i,j,k-1), (i,j,k+1)(for surface nodes, some of these neighbors might not exists)• Structural springs establish the basic structureof the jello cube• The picture shows structuralsprings for the jello cube.Only springs connectingtwo surface vertices areshown.16Computer Graphics 15-462Shear springs• Disallow excessive shearing• Prevent the cube from distorting• Every node (i,j,k) connected to its diagonal neighbors• Structural springs = white• Shear springs = redA 3D cube(if you can’t see it immediately, keep trying)Shear spring (red) resists stretchingand thus preventsshearing17Computer Graphics 15-462Bend springs• Prevent the cube from folding over• Every node connectedto its second neighborin every direction(6 connections per node,unless surface node)• white=structural springs• yellow=bend springs(shown for a single nodeonly)Bend spring (yellow) resists contractingand thus preventsbending18Computer Graphics 15-462External force field• If there is an external force field, add that force to the sum of all the forces on a mass point• There is one such equationfor every mass point andfor every moment in timefieldforcedampingHooktotalFFFF ++=rrr19Computer Graphics 15-462Collision detection• The movement of the jello cube is limited to a bounding box• Collision detection easy:– Check all the vertices if any of them is outside the box• Inclined plane:– Equation:– Initially, all points on the same side of the plane– F(x,y,z)>0 on one side of the plane and F(x,y,z)<0 on the other– Can check all the vertices for this condition0),,( =+++= dczbyaxzyxF20Computer Graphics 15-462Collision response• When collision happens, must perform some action to prevent the object penetrating even deeper• Object should bounce away from the colliding object• Some energy is usually lost during the collision• Several ways to handle collision response• We will use the penalty method21Computer Graphics 15-462The penalty method• When collision happens, put an artificial collision spring at the point of collision, which will push the object backwards and away from the colliding object• Collision springs have elasticity and damping,just like ordinary springsvFCollisionspringBoundary of colliding object22Computer Graphics 15-462Integrators• Network of mass points and springs• Hook’s law, damping law and Newton’s 2nd law give acceleration of every mass point at any given time• F=ma– Hook’s law and damping provide F– ‘m’ is point mass– The value for a follows from F=ma• Now, we know acceleration at any given time for any point• Want to compute the actual motion23Computer Graphics 15-462Integrators (contd.)• The equations of motion:• x = point position, v = point velocity, a = point acceleration• They describe the movement of any single mass point•


View Full Document

CMU CS 15462 - Physical simulation for animation

Download Physical simulation for animation
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Physical simulation for animation and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Physical simulation for animation 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?