Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer graphics & visualization Rigid Body Simulation.

Similar presentations


Presentation on theme: "Computer graphics & visualization Rigid Body Simulation."— Presentation transcript:

1 computer graphics & visualization Rigid Body Simulation

2 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group The next few lectures…

3 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Comming up… Point Dynamics no extendno extend only positiononly position Rigid Bodies extendedextended positioned & orientedpositioned & oriented „a set of points“„a set of points“

4 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Dynamic simulation Movement of point masses, rigid bodies, systems of point masses etc. with respect to – Forces – Body charcteristics (mass, shape) – Derivation of accelerations from properties and physical laws Dynamic of point masses Dynamic of rigid bodies

5 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Dynamic simulation Newtons Axioms – Without external forces, a body moves uniformly (Inertia) – An external force F applied to a mass m results in an acceleration a: F = ma – Actio = reactio

6 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Now… Point Dynamics no extendno extend no orientationno orientation Rigid Bodies ExtendedExtended OrientedOriented „a set of points“„a set of points“

7 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Dynamic simulation of particles – Position r, mass m, velocity v, acceleration a, but no extend – Forces F act on particles F,a,v,r are 3D vectors!!!

8 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Dynamic simulation of particles – Multiple forces may act on particles Forces are added by vector addition – F is usually a function of time – Mass might change as well Change of momentum (Impuls) with change of time

9 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Particles have no internal structure 3 DOF = degrees of freedom (position only) Direct kinematic: from a  v  r Indirect kinematic: from r and boundary conditions  v  a

10 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Relation between force F and acceleration a Direct dynamics Point mass

11 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Important Forces – Gravity – Hooke's Law – Friction

12 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Linear momentum (Impuls) – Force F act on center of mass Force Conservation of momentum Example: elastic push

13 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Angular momentum (Drall) Torque (Drehmoment) Conservation of angular momentum r p Moment of inertia: I = mr 2

14 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Angular velocity of a point (rate at which the point is rotating): magnitude of change Notation:

15 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Analog for rotation matrix R - it changes under angular velocity Aggregate movement of a body point – (r 0 /r(t): position in local/world space coordinate system)

16 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Relation between angular momentum and angular velocity Inertia tensor I (Trägheitstensor) Symmetric tensor Example: Skater

17 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Point dynamics Summary TranslationRotation Position r Angle  velocity v Angular velocity  Momentum p Angular momentum L Force F Torque T

18 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Next… Point Dynamics no extendno extend no orientationno orientation Rigid Bodies ExtendedExtended OrientedOriented „a set of points“„a set of points“

19 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Idea – Combination of many small particles to a rigid body – Bodies that do not deform – they are stiff – They do not penetrate – They bounce back if they collide – Rigid convex polyhedra of constant density – 6 DOF instead of 3n DOF (for n particles) Distinguish between – Movement of center of mass (CM) – Rotation around (CM)

20 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Mass M in continuous case small, discrete mass points Volume integral over entire body Mass density (= specific weight = Mass/Volume)

21 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation CM (center of mass) in continuous case

22 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Dynamic simulation of rigid bodies – Motion consist of translational and angular component – Velocity v(t) is rate of change of position r(t) over time v(t) = r´(t) v(t) is linear velocity at center of mass – Bodies also have a spin About an axis (vector) through the center of mass Magnitude of the vector defines how fast the body is spinning

23 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Translation and Rotation: Rotation R: – 3*3 Matrix – Redundancies – only 3 DOF CM local/fixed coordinate system

24 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Translation Rotation

25 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Momentum Movement of CM Force F ext is sum of all external forces R F ext,i F ext

26 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Angular momentum Inertia tensor I

27 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Angular momentum Inertia tensor I in continuous case Kronecker-symbol x,y,z coordinates

28 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Translation vs. Rotation MassInertia Moment (Trägheitsmoment) m VelocityAngular Velocity v =dr/dt  = d  /dt MomentumAngular Momentum p = mv L = I  = r x p ForceTorque F = dp/dt T = r x F = dL/dt Kinetc EnergyKinetic Energy E = ½ mv 2 E = ½ I  2 Rigid body simulation

29 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Properties of the Inertia tensor – Diagonal elements are moments of inertia with respect to coordinate axes – It is symmetric and real Has three principal axis (eigenvectors) Eigenvectors are orthogonal: directions of inertia (Hauptträgheitsachsen) Eigenvalues are real: moments of inertia (Hauptträgheitsmomente)

30 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Inertia tensor – In this (directions of inertia) coordinate system, I can be diagonalized by RIR T, where R is a rotation matrix: Inertia moment (scalar) for rotation around axis n (normalized)

31 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Torque of single „body element“ Total torque Important: starting point of force Equations of motion for rotation (Euler equations for fixed coordinate system)

32 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation State vector of a rigid body Constants: – Inertia tensor I KS – Mass M Position Orientation (rotation matrix) Impuls Angular momentum

33 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Derived variables

34 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Equations of motion

35 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation System of ordinary partial differential equations Initial boundary problem Structure In general, numeric solution (Integration) – Explicit solve: Euler, Runge-Kutta – Implicit solver

36 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Numerical Integration Initial value problem: Simple approach: Euler Derivation: Taylor expansion First order scheme Higher accuracy with smaller step size

37 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Numerical Integration Problems of Euler-Scheme Inaccurate Unstable Example: Divergenz für  t > 2/k

38 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Numerical Integration Midpoint method: 1. Euler-Step 2. Evaluation of f at midpoint 3. Step with value at midpoint Second order scheme

39 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Numerical Integration Fourth order Runge-Kutta Adaptive step size control

40 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Numerical Integration So far: Explicit techniques Stable integration by means of implicit integration schemes Implicit Euler-Step „rewind“ the explicit Euler-Step Taylor-expansion around t +  t instead of t Solving the non-linear system of equations for x(t +  t)

41 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation

42 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Demo

43 computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization Group Rigid body simulation Summary Torque T Forces F ext Angular moment L Impuls p CM Angular velocity  Velocity v CM Orientation R Position r CM RotationTranslation Inertia tensor  Mass M


Download ppt "Computer graphics & visualization Rigid Body Simulation."

Similar presentations


Ads by Google