Keyframing can be tedious - especially to get realism Using physics to define the animation, Subset of procedural animation Provide the physical

Σχετικά έγγραφα
Keyframing can be tedious - especially to get realism Using physics to define the animation, Subset of procedural animation Provide the physical

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Section 8.3 Trigonometric Equations

EE512: Error Control Coding

Forced Pendulum Numerical approach

The Simply Typed Lambda Calculus

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Second Order RLC Filters

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Second Order Partial Differential Equations

( y) Partial Differential Equations

Exercises to Statistics of Material Fatigue No. 5

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

Homework 3 Solutions

ΗΜΥ 220: ΣΗΜΑΤΑ ΚΑΙ ΣΥΣΤΗΜΑΤΑ Ι Ακαδημαϊκό έτος Εαρινό Εξάμηνο Κατ οίκον εργασία αρ. 2

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

2 Composition. Invertible Mappings

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Homework 8 Model Solution Section

Matrices and Determinants

Approximation of distance between locations on earth given by latitude and longitude

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Eulerian Simulation of Large Deformations

Srednicki Chapter 55

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Areas and Lengths in Polar Coordinates

Numerical Analysis FMN011

Other Test Constructions: Likelihood Ratio & Bayes Tests

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Finite Field Problems: Solutions

Higher Derivative Gravity Theories

Lifting Entry (continued)

derivation of the Laplacian from rectangular to spherical coordinates

Areas and Lengths in Polar Coordinates

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Mock Exam 7. 1 Hong Kong Educational Publishing Company. Section A 1. Reference: HKDSE Math M Q2 (a) (1 + kx) n 1M + 1A = (1) =

Example Sheet 3 Solutions

Appendix to On the stability of a compressible axisymmetric rotating flow in a pipe. By Z. Rusak & J. H. Lee

Μονοβάθμια Συστήματα: Εξίσωση Κίνησης, Διατύπωση του Προβλήματος και Μέθοδοι Επίλυσης. Απόστολος Σ. Παπαγεωργίου

TMA4115 Matematikk 3

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Concrete Mathematics Exercises from 30 September 2016

1 String with massive end-points

PARTIAL NOTES for 6.1 Trigonometric Identities

6.3 Forecasting ARMA processes

Section 7.6 Double and Half Angle Formulas

Variational Wavefunction for the Helium Atom

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Figure A.2: MPC and MPCP Age Profiles (estimating ρ, ρ = 2, φ = 0.03)..

ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems

Solutions to Exercise Sheet 5

Finite difference method for 2-D heat equation

MATH423 String Theory Solutions 4. = 0 τ = f(s). (1) dτ ds = dxµ dτ f (s) (2) dτ 2 [f (s)] 2 + dxµ. dτ f (s) (3)

Instruction Execution Times

( ) 2 and compare to M.

ECE Spring Prof. David R. Jackson ECE Dept. Notes 2

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Macromechanics of a Laminate. Textbook: Mechanics of Composite Materials Author: Autar Kaw

2. Μηχανικό Μαύρο Κουτί: κύλινδρος με μια μπάλα μέσα σε αυτόν.

[1] P Q. Fig. 3.1

Lecture 34 Bootstrap confidence intervals

Problem Set 9 Solutions. θ + 1. θ 2 + cotθ ( ) sinθ e iφ is an eigenfunction of the ˆ L 2 operator. / θ 2. φ 2. sin 2 θ φ 2. ( ) = e iφ. = e iφ cosθ.

Math 6 SL Probability Distributions Practice Test Mark Scheme

Math221: HW# 1 solutions

D Alembert s Solution to the Wave Equation

5.4 The Poisson Distribution.

Strain gauge and rosettes

Reminders: linear functions

Introduction to Theory of. Elasticity. Kengo Nakajima Summer

the total number of electrons passing through the lamp.

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Parametrized Surfaces

Section 9.2 Polar Equations and Graphs

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

DERIVATION OF MILES EQUATION FOR AN APPLIED FORCE Revision C

Written Examination. Antennas and Propagation (AA ) April 26, 2017.

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

1) Formulation of the Problem as a Linear Programming Model

(1) Describe the process by which mercury atoms become excited in a fluorescent tube (3)

Problem Set 3: Solutions

Solution to Review Problems for Midterm III

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Numerical Methods for Civil Engineers. Lecture 10 Ordinary Differential Equations. Ordinary Differential Equations. d x dx.

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

4.6 Autoregressive Moving Average Model ARMA(1,1)

Εγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade

Advanced Subsidiary Unit 1: Understanding and Written Response

Differential equations

Μηχανική Μάθηση Hypothesis Testing

상대론적고에너지중이온충돌에서 제트입자와관련된제동복사 박가영 인하대학교 윤진희교수님, 권민정교수님

HISTOGRAMS AND PERCENTILES What is the 25 th percentile of a histogram? What is the 50 th percentile for the cigarette histogram?

Transcript:

Dynamics-Physics based animation Keyframing can be tedious - especially to get realism Using physics to define the animation, Subset of procedural animation Provide the physical rules-laws that govern the motion, let the system evaluate the positions/shape Animator gives up control, gets realistic motion automatically. Can use augmented laws of physics Reusable code, autonomous agents, automatically captures compleity Ice skater, child on a swing

Dynamics-Physics based animation Point masses (particle systems), rigid bodies, deformable bodies, articulated objects One should specify forces, material properties, initial conditions, constraints Solving ordinary differential equations, inclusion of constraints Collision detection and handling

A Canonical Differential Equation 1 f(,t) = f(,t) (t): a moving point. f(,t): 's velocity. 2 SIGGRAPH 97 COURSE NOTES SB2 PHYSICALLY BASED MODELING

Vector Field The differential equation = f (,t) defines a vector field over. SIGGRAPH 97 COURSE NOTES SB3 PHYSICALLY BASED MODELING

Integral Curves Start Here Pick any starting point, and follow the vectors. SIGGRAPH 97 COURSE NOTES SB4 PHYSICALLY BASED MODELING

Initial Value Problems Given the starting point, follow the integral curve. SIGGRAPH 97 COURSE NOTES SB5 PHYSICALLY BASED MODELING

Solving ODE &( t) = f (, t) Given the differential equations and a starting point ( t i ) (known as an initial value problem) find (t) Interest in numerical solutions (discrete time steps (t 0 ), (t 0 +h), (t 0 +2h)) not analytical ones. We need to integrate to find the new position/state t+ h t+ h t '( τ ) dτ = ( t+ h) ( t) = f(, τ) dτ t

Euler method Assumes that the derivative f is constant over the timestep ( t+ h) ( t) + hf( ( t), t) First order approimation given Taylor epansion gives ( t ( t ( t i i i + dt) + dt) + dt) &( t) = f (, t) and t ) = ( t ( t ( t i i i ) ) ) + & ( t i + & ( t i ) ) + f ( ( t dt dt i ), t i ) dt ( i + O( dt 2 )

Euler's Method Simplest numerical solution method Discrete time steps Bigger steps, bigger errors. (t + t) = (t) + t f(,t) SIGGRAPH 97 COURSE NOTES SB6 PHYSICALLY BASED MODELING

Euler method Inaccurate smaller timesteps only slow the problems down Unstable f (, t) = k reasonable if dt <1/ Instability if dt > 2 / k k

Method performance Compleity depends on the number of derivative function calculations per time step. However performance is also related to the number of time steps required to obtain a certain accuracy and stability Sophisticated methods: more evaluations per step but they allow bigger steps

Midpoint Method Second order approimation 2 dt ( ti + dt) = ( ti ) + & ( ti ) dt + & ( ti ) + with f ( dt 2 2 f d &&(t i ) = = f dt f 2 O( dt 2 f ( ) f ( ) f i + = i + ( i ) + O( ) dt dt + f ( )) ( ) ( ) ( ) ( 2 i = f i + f 2 i f i O dt 3 dt && + O dt ) = dt ( f ( + f ( )) f ( )) i + ( i 2 i i 2 ) 3 ) dt ( ti + dt) = ( ti ) + dt ( f ( i + f ( 2 i ))) i = ( t i )

Midpoint Method Requires 2 derivative evaluations per step Geometric Interpretation dt ( ti + dt) = ( ti ) + dt ( f ( i + f ( 2 i Euler result ))) + i i f ( dt 2 i ) dt f ( i + f ( )) 2 i Midpoint result we can use higher orders (e: runge-kutta 4)

Adaptive Timestepping Fied timestep: proceed only as fast as worst section of (t) allows. Allow the timestep to change over the course of the solution e = a b 1 timestep 2 timesteps Scale the timestep based on the error s e e desired = current 1/ errororder See: Numerical recipes in C

ODE solver For(time=t0; time<t1; time+=delta){ derivative=derivative_function(time, ); =ode(derivative, time,, delta); } The user should provide derivative_function. Alternatively, derivative_function is fed to ode.

Particles Particles are objects modeled as point masses Particle systems are collections of particles Particle systems can represent: fire smoke/clouds flow of fluids debris/shrapnel soft bodies flocks/crowds etc.

Particles Particles respond to forces (Newtonian particles) We represent this using differential equations Newton s second law && = f m & v& = = v f m 2 nd order ODE 1 st order ODEs

Particle Systems The state of the system is fully determined by, v. Phase space Particle properties: mass position velocity total forces age, lifespan rendering properties etc.

Newtonian συστήµατα σωµατιδίων Ησυµπεριφορά του συστήµατος προσδιορίζεται από τις χρονοµεταβλητές δυνάµεις που ασκούνται. Εσωτερικές δυνάµεις (σύστηµα ελατηρίων) ή/και εξωτερικές δυνάµεις (βαρύτητα) Καθορίζοντας κατάλληλα τις δυνάµεις πετυχαίνουµε να µοντελοποιήσουµε την επιθυµητή συµπεριφορά.

Particle Systems Separate the data structures and integration Particle System particles time state send data as 6n vectors state/derivatives Solver state derivatives Particle v f m v f m v f m L v f m

Particle Motion (t) v(t) SIGGRAPH 97 COURSE NOTES SD2 PHYSICALLY BASED MODELING

Particle State Y = (t) v(t) (t) v(t) 6 4 7 4 4 8 6 4 7 4 4 8 Y = SIGGRAPH 97 COURSE NOTES SD3 PHYSICALLY BASED MODELING

Particle Dynamics (t) v(t) F(t) SIGGRAPH 97 COURSE NOTES SD4 PHYSICALLY BASED MODELING

State Derivative d dt Y = d dt (t) = v(t) v(t) F(t)/m d dt Y = v(t) F(t)/m 6 4 7 4 4 8 6 4 7 4 4 8 SIGGRAPH 97 COURSE NOTES SD5 PHYSICALLY BASED MODELING

Multiple Particles SIGGRAPH 97 COURSE NOTES SD6 PHYSICALLY BASED MODELING

State Derivative d dt Y = d dt 1 (t) v 1 (t) M n (t) v n (t) = v 1 (t) F 1 (t)/m 1 M v n (t) F n (t)/m n d dt Y =...... 6n elements SIGGRAPH 97 COURSE NOTES SD7 PHYSICALLY BASED MODELING

ODE solution d dt Y(t 0 + t)... Y(t 1 ) d dt Y(t 0) Y(t 0 + t) Y(t 0 ) SIGGRAPH 97 COURSE NOTES SD8 PHYSICALLY BASED MODELING

Y(t 0 ) len t 0 t 1 dydt ODE solver Y(t 1 ) void dydt(double t, double y[], double ydot[]) SIGGRAPH 97 COURSE NOTES SD9 PHYSICALLY BASED MODELING

Y(t) = 1 (t) v 1 (t) n (t) v n (t) dydt d dt Y(t) = v 1 (t) F 1 (t)/ m 1 v n (t) F n (t)/m n SIGGRAPH 97 COURSE NOTES SD10 PHYSICALLY BASED MODELING

v f m v f m v f m Clear Force Accumulators 1 2 Deriv Eval Loop F F F F Invoke apply_force functions v f m v f m v f m 3 Return [v, f/m, ] to solver. SIGGRAPH 97 COURSE NOTES SC17 PHYSICALLY BASED MODELING

Forces Unary forces :forces that only depend on 1 particle. O(n) compleity f drag v Gravity Dampening Wind Fields f mg f = k = drag d f = k v wind v

Forces Binary forces - forces that only depend on 2 particles f a f b ) ( 0 b a b a b a s a l k f = ) ( ) ( b a b a b a b a b a k d v v f b =- f a Springs Generalizes to n-ary forces

υνάµεις από σύστηµα ελατηρίων Χρήση σωµατιδίων για µοντελοποίηση επιφάνειας που µεταβάλλεται µε το χρόνο: ύφασµα στον άνεµο Κάθε σωµατίδιο κόµβος σε πλέγµα Εξωτερικές δυνάµεις (βαρύτητα, άνεµος) υνάµεις µεταξύ σωµατιδίων που τα καθιστούν συνεκτική επιφάνεια

υνάµεις από σύστηµα ελατηρίων Θεώρηση ότι τα σωµατίδια συνδέονται µε ελατήρια. Πολυπλοκότητα O(n) (επίδραση µόνο από γειτονικά σωµατίδια)

Ελκτικές-απωθητικές δυνάµεις Spatial interaction forces Οι δυνάµεις σε σύστηµα ελατηρίων κρατούν τα σωµατίδια στην ίδια τοπολογική διάταξη, Επιδρούν πάντα στο ίδιο ζεύγος. Οι ελκτικές ή απωθητικές δυνάµεις τα φέρνουν κοντά ή τα αποµακρύνουν. Απωθητικές δυνάµεις για να κατανείµουµε σωµατίδια σε επιφάνεια ή να τα αποτρέψουµε να συγκρουστούν Ελκτικές δυνάµεις: µοντέλο ηλιακού

Ελκτικές-απωθητικές δυνάµεις ρουν στην κατεύθυνση d = p -q και είναι αντιστρόφως ανάλογες της απόστασης Απωθητική αντίστροφου τετράγωνου f = k r d d 3 Στη γενική περίπτωση ο υπολογισµός των δυνάµεων είναι O(n 2 ).

Ελκτικές-απωθητικές δυνάµεις Χωρισµός του χώρου σε υποχώρους και υπόθεση ότι δυνάµεις από σωµατίδια σε γειτονικούς υποχώρους αµελητέες. Κόστος για αρχική διαµοίραση των σωµατιδίων και υπολογισµό µετάβασης σωµατιδίων σε άλλο υποχώρο για κάθε

Forces Controlled particles: motion not controlled by forces Fied particles (anchors and pivots) Procedurally controlled particles (e.g. particles moving in a circle) User Interaction forces (for interactive animation) : forces applied to particles by the user f user Usually just use springs

Soft Constraints Forces: provided by the user to specify the desired behavior (e.g. spring forces keep particles together) It is often easier to specify a condition that we want to be true rather than a force to make it true Constraint (or behavior) functions: specify a condition that we wish to have fulfilled C (, = 0 a b) = a b or C(, ) = r = a b a b 0 C: vector Constraint functions But how do we make it true? Convert constraints to force laws

Energy Functions Minimize the energy of the constraint The smaller the energy the more the constraint is satisfied ks E = C C 2 Force the particle towards the constraint E C fi = = ks C i i Add damping in order to avoid oscillations around the constraint dampening C f = k C& i d i Jacobian matri

Energy Functions Eample b a C = I C = a I C = b v a v b C = & a derivative b derivative time derivative Plug into the force equation C C C C f & i d i s i k k = ) ( ) ( b a d b a s a k k v v f = Just a damped spring

Collisions What should we do when there is a collision? Usually an interpenetration, not the eact collision is detected. t ) ( 0 ( t 1 ) ( t 2 ) ( t 3 )

Collision Detection Checked at every step, should be done efficiently Some collisions might be missed (collisions with thin objects)

Collision Detection Determine when a particle has collided (simple case) N N ( p) < 0 N ( p) = 0 Particle has collided iff p: point on the surface N ( p) < 0

Collision Response What should we do when a particle has collided? The correct thing to do is rollback the simulation to the eact point of contact Restart the simulation at the time of the collision On collision the state changes discontinuously

Rolling Back the Simulation ( t 0 ) ( t 1 ) ( t 2 ) ( t c ) ( t 3 ) Collision time, position can be found by interpolation, bisection, etc.

Rolling Back the Simulation: Bisection Bisect the time interval between the positions before and after the collision Run the simulation to evaluate position at the mid-time and check if this position is legal or not Bisect one of the two new time intervals depending on the previous step and repeat until the position is close to the surface

Collision Detection

Rolling Back the Simulation: Linear interpolation Assume that the particle follows linear constant velocity motion between the two positions (prior and after the detected collision) Evaluate collision time and position using this assumption.

Collision Response After finding the eact collision time and position: Kinematic response: negate (and perhaps modify) the perpendicular velocity. v n Run the simulation again from this point using the new initial velocity. v t v N new v After the collision: new v = ε vn + v t ε=1 elastic collision coefficient of restitution

Collision Response After finding the eact collision time and position: Dynamic response (more accurate): apply an instant impulse force on the particle in one step of the simulation Continue normally afterwards

Collision Response Easier handling: do not rollback the simulation Evaluate the new direction of the particle from the collision point onwards Evaluate the new velocity Place the particle on the new direction and in a distance equal to the one traveled after the real collision

Συγκρούσεις Ανελαστική σύγκρουση: το σωµατίδιο δεν χάνει ενέργεια, το µέτρο της ταχύτητας σταθερό Η πορεία µετά τη σύγκρουση ίδια µε αυτή φωτός ανακλώµενου σε επιφάνεια. Κατεύθυνση ανάκλασης: r = 2( p p ) nn ( p p ) 0 c 0 c

Συγκρούσεις Το σωµατίδιο σε απόσταση από το σηµείο σύγκρουσης όση και αν αυτή δεν συνέβαινε

Contact Forces Contact: the particle is on the collision surface with zero normal velocity A contact force resists penetration c ( N f ) < 0 f = ( N f ) N Contact forces do not resist leaving the surface f c = 0 Simple friction can be modeled f f f t ( N f ) > = k ( N f ) v ( N f ) < 0 0