1 / 36

Simulation and Animation

Simulation and Animation. Key frame Interpolation. Keyframe Animation. Draw one keyframe after another  Results in “rough” animation instead of a smooth transition from frame to frame. Keyframe Interpolation. Keyframe Interpolation. Keyframe Interpolation. Simple Translations.

admon
Download Presentation

Simulation and Animation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Simulation and Animation Key frame Interpolation

  2. Keyframe Animation Draw one keyframe after another  Results in “rough” animation instead of a smooth transition from frame to frame

  3. Keyframe Interpolation

  4. Keyframe Interpolation

  5. Keyframe Interpolation

  6. Simple Translations Linear Interpolation is fine here But what about rotations?

  7. Linear Interpolation of Rotations K = (1-a) A + a B (linear interpolation: lerp) Introduces non linear behavior on the arc

  8. SLERP • Approach bymeansofslerp = sphericallinear interpolation • with • itfollows P A  B 

  9. Quaternion Power Operator [ cos(q/2), sin(q /2) * A] a = [cos(aq/2), sin(aq /2) * A] q a rotates to q orientation as a goes from 0 to 1 Quaternions: q = (qbqa-1) aqa (slerp) q = slerp(qa,qb, a)

  10. Curves • So far: smooth linear interpolation along a line (or along an arc on the circle) • Now extend the idea so that interpolation follows a given path, a curve • In the following: description of curves

  11. Consider the following: Data is sampled at discrete data points Want to know data values at an arbitrary position within the domain

  12. The simple way • From n+1 known data samples construct a n-dimensional polynomial • n+1 Samples → n+1 knows • n-dimensional polynomial has n+1unknowns leads to system of n+1 linear equations

  13. The simple way (cont.) • system of equations can be rewritten as matrix Vandermonde Matrix

  14. Polynomial for approximation

  15. How to handle multiple x values? • do not use a single approximation function but use n (=dimension of the domain) functions and a new parameter t from 0 to 1 • x(t)=x, y(t)=y, z(t)=z … y y(t) x(t) x

  16. multiple x-values (cont.) leads to multiple polynomials can be rewritten in matrix form

  17. Matrix notation C can be split up into M (basis matrix)G (geometry matrix) M is fixed for a given approach G depends on the specific curve to fit

  18. Building M • derive a Matrix M for the Hermite approach • Hermite uses polynomials of degree 3 to a fit 2 points • it is an interpolation → 2 conditions • derivatives at the endpoints are given→ 2 conditions

  19. Hermite interpolation with

  20. Hermite interpolation (cont.)

  21. Hermite interpolation • Cubic Hermite-Polynoms: Charles Hermite (1822-1901)

  22. Hermite interpolation • Example:

  23. Hermiteinterpolation • Properties: • Neither affine invariant with respect to control points nor with respect to vectors • No local control • Difficult to find tangent vectors • Curve segments can be attached continuously • Interpolation between points with tangents, e.g. for Keyframe-Animation with given position and velocity

  24. Monom interpolation • Approach: Monom-Basis: {ti | i=0…n} • From p(ti) = aithesystemofequationsisderived: Vandermond Matrix Basis Control points 3 components per entry

  25. Bézier-Curves • Idea: tangentvectorsdefinedbyfirstand last twopoints: • b0andbn will beinterpolated • bi will beapproximated • Relation toHermite-Interpolation: b1 b2 Example: cubic Bezier-Curve b3 b0 cubic Bézier-Curve

  26. Bézier-Curves • … andHermite-Interpolation • Andforthecurve: Geometry vectorfor Bézier Matrix forBézier to Hermite with

  27. Bézier-Curves • The cubic Bézier-Curve: • Bernstein-Polynoms ofdegreen: withdomain[0,1] Bézier-Control-Points Bernstein-Polynoms with

  28. Bézier-Curves • Cubic Bernstein-Polynoms:

  29. Bézier-Curves • Of degree n= 1: linear interpolation • Ofdegreen = 2: iterated linear interpolation

  30. Bézier-Curves • Iterated linear interpolation for degree 2: Example fort = 0,4 http://www.vis.uni-stuttgart.de/~kraus/LiveGraphics3D/

  31. Bezier Interpolation of Quaternions De Casteljau

  32. Spherical Linear Interpolation

  33. Repeated mid-point interpolation For u = 1/4

  34. Spline-Curves • Problem so far: polynomdegreedepends on numberofcontrolpoints • Idea: • Multiple segmentswithlowdegreeinsteadofonesegmentofhighdegree • Segments canbeofarbitrary type: • Hermite-Curves • Quadrics • Bézier-Curves • Importantis smooth transitionbetweensegments

  35. Spline-Curves • Spline: • A thin flexible rodusedfortheconstructionofships • Deutsch: Straklatte, Strakfunktionen • A splineof n-thdegreeconsistsofpolynomialsegmentsofmaxdegree n • A cubicSplinedescribestheshapeof a thinrodthatisfixedatstartand end point

  36. bi,2 bi,1 bi,3 = bi+1,0 bi,0 ui+1 ui bi+1,1 Bézier-Splines • Spline-Segments i: • Spline s(u) ist sum of segments

More Related