Download presentation

Presentation is loading. Please wait.

Published byMadeline Cullum Modified about 1 year ago

1
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Phun with Physics The basic ideas Vector calculus Mass, acceleration, position, …

2
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics2 Some defs… Kinematics – The status of an object Position, orientation, acceleration, speed Describes the motion of objects without considering factors that cause or affect the motion Dynamics – The effects of forces on the motion of objects.

3
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics3 The basics Let p(t) be the position in time. – We’ll drop the (t) and just say p Other values: – v – velocity – a - acceleration Velocity is the derivative of position Acceleration is the derivative of velocity

4
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics4 Vector calculus Really, p(t) is a triple, right? – Think of these equations as three equations, one for each dimension – This is vector calculus

5
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics5 Newton’s law and Momentum We know this one… Momentum Note: Force is the derivative of momentum

6
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics6 What about real objects? Think of a real object as a bunch of points, each with a momentum – We can find a “center of mass” for the object and treat the object as a point with the total mass We have: – Mass, position vector, acceleration vector, velocity vector

7
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics7 Example: Air Resistance The resistance of air is proportional to the velocity – F = -kv We know F = ma, so: ma = -kv So, how can we solve?

8
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics8 Euler’s method

9
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics9 What about orientation? We’ll start in 2D… Let be the orientation (angle) – Easy in 2D, not so easy in 3D we’ll be back is the angular velocity around center of gravity is the angular acceleration Then…

10
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics10 What’s the velocity at a point? p Chasles’ Theorem: Velocity at any point is the sum of linear and rotational components. Radians are important, here Perpendicular to cp Same length! Perpendicularized radius vector

11
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics11 Angular momentum – At a point? – For the whole thing? – M=mv Momentum equals mass times velocity What does this mean?

12
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics12 We want to know how much of the momentum is “around” the center r cp Angular Momentum of a point around c

13
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics13 Torque – Angular force Torque at a point

14
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics14 Total angular momentum and moment of inertia I is the moment of inertia for the object.

15
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics15 Moment of inertia What are the characteristics? What does large vs. small mean? How to we get this value?

16
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics16 Relation of torque and moment of inertia

17
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics17 Simple dynamics Calculate/define center of mass (CM) and moment of inertia (I) Set initial position, orientation, linear, and angular velocities Determine all forces on the body Linear acceleration is sum of forces divided by mass Angular acceleration is sum of torques divided by I Numerically integrate to update position, orientation, and velocities

18
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics18 Object collisions Imagine objects A and B colliding B A Assume collision is point on plane n

19
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics19 What happens? ??? B A n

20
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics20 Our pal Newton… Newton’s law of restitution for instantaneous collisions with no friction – is a coefficient of restitution 0 is total plastic condition, all energy absorbed 1 is total elastic condition, all energy reflected What’s the consequence of “no friction”?

21
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics21 Impulse felt by each object Newton’s third law: equal and opposite forces – Force on A is jn (n is normal, j is amount of force) – Force on B is –jn – So… No rotation for now… B A n We’ll need to know j

22
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics22 Solving for j… Then plug j into…

23
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics23 What about rotation?

24
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics24 How to determine the time of collision? What do I mean? Ideas? Avoid “tunneling”: objects that move through each other in a time step

25
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics25 Euler’s method We can write…

26
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics26 The problem with Euler’s method Taylor series: We’re throwing this away! Error is O( t 2 ) Half step size cuts error to ¼!

27
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics27 Improving accuracy Supposed we know the second derivative? But, we would like to achieve this error without computing the second derivative. We can do this using the Midpoint Method

28
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics28 Midpoint Method 1. Compute an Euler step 2. Evaluate f at the midpoint 3. Take a step using the midpoint value.

29
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics29 Example Step 1 Step 2 Step 3

30
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics30 Moving to 3D Some things remain the same – Position, velocity, acceleration Just make them 3D instead of 2D The killer: Orientation – “It’s possible to prove that no three-scaler parameterization of 3D orientation exists that doesn’t ‘suck’, forsome suitably mathematically rigorous definition of ‘suck’.” Chris Hecker

31
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics31 Orientation options Quaternions – We’ll use later Matricies – We’ll use this here.

32
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics32 Variables x(t) – Spatial position in time (3D) – Center of mass at time t – Assume object has center of mass at (0,0,0) v(t) – Velocity in space q(t) – Orientation in time (quaternion)

33
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics33 Angular velocity (t) – Angular velocity at any point in time – This is a rotation rate times a rotation vector Strange, huh?

34
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics34 Note Angular velocity is instantaneous – We’ll compute it later in equations, but we won’t keep it around. – Angular velocity is not necessarily constant for a spinning object! Interesting! Can you visualize why?

35
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics35 Angular velocity and vectors Rate of change of a vector is: This is why they like that notation – Change is orthogonal to the normal and vector – Magnitude of change is vector length times magnitude of

36
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics36 Derivative of the rotation quaternion Woa… Normalize this sucker and we can take a Newton step. Be sure to scale (t) by t.

37
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics37 Velocity of a point (think vertex) Not just v(t), must include rotation!!! Position of point at time t: Just a reminder: Velocity of point at time t: And the magic: Angular partLinear part

38
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics38 Force and torque F i (t) – Force on particle i at time t – Vector, of course Torque on point i: Total Force: Total Torque:

39
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics39 Linear Momentum Momentum: And, the derivative of momentum is force:

40
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics40 Angular Momentum Angular momentum is preserved if no torque is applied. L(t) is the angular momentum

41
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics41 Inertia Tensor All that work typing this sucker in and it’s pretty much useless. Orientation dependent!

42
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics42 Inertia Tensor for a base orientation

43
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics43 Base inertia tensor to current inertia tensor Relation of angular momentum and inertia tensor:

44
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics44 Bringing it all together Current state: Position Orientation Linear momentum Angular momentum Velocity (may itself be updated)

45
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics45 3D Collisions There are now two possible types of collisions – Not just vertex to face

46
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics46 3D collisions Vertex to face Edge to edge

47
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics47 We need… 3D collision detection – We’ll do that later Determine when the collision occurred – Binary search for the time – Bisection technique

48
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics48 Velocity at a point Position (center of gravity) Position of point Velocity (linear) Angular velocity

49
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics49 Relative velocity Normal to object b Vertex to face: normal for face Edge to edge: cross product of edge directions Positive v rel means moving apart, ignore it Negative v rel means interpenetrating, process it What does zero v rel mean?

50
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics50 New velocities for a and b Let: Vector from center of mass to point Velocity (linear) update Mass Normal Angular velocity update Inertia tensor inverse Equivalent equations for b

51
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics51 And j…

52
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics52 Contrast 2D/3D 2D 3D

53
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics53 Questions? 2D had two different j’s – Linear velocity and angular velocity 3D gets by with only one. – Why is this?

54
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics54 Other issues Resting contact – Bodies in contact, but – < v rel < – Must deal with motion transfer

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google