Part II: OUTLINE. Visualizing Quaternions. Part II: Visualizing Quaternion Geometry. The Spherical Projection Trick: Visualizing unit vectors.

Similar documents
Visualizing Quaternions

Visualizing Quaternions

VISUALIZING QUATERNIONS

Quaternions and Rotations

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

Transformations Week 9, Lecture 18

Motivation. Parametric Curves (later Surfaces) Outline. Tangents, Normals, Binormals. Arclength. Advanced Computer Graphics (Fall 2010)

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Quaternions and Rotations

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

Freeform Curves on Spheres of Arbitrary Dimension

Quaternions and Rotations

Quaternions and Rotations

12.1 Quaternions and Rotations

CS354 Computer Graphics Rotations and Quaternions

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Rotations for N-Dimensional Graphics

3D Kinematics. Consists of two parts

Advanced Computer Graphics Transformations. Matthias Teschner

Quaternions and Exponentials

Computer Animation II

A General Construction Scheme for Unit Quaternion Curves with Simple High Order Derivatives 1

Fundamentals of Computer Animation

Jorg s Graphics Lecture Notes Coordinate Spaces 1

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

3.3 Interpolation of rotations represented by quaternions

Visual Recognition: Image Formation

Aalto CS-C3100 Computer Graphics, Fall 2016

Space Curves of Constant Curvature *

Orientation & Quaternions

Reading. Parametric surfaces. Surfaces of revolution. Mathematical surface representations. Required:

Quaternions & Rotation in 3D Space

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation

Animating orientation. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

Animation Curves and Splines 2

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

CS 475 / CS 675 Computer Graphics. Lecture 16 : Interpolation for Animation

3D Rotations and Complex Representations. Computer Graphics CMU /15-662, Fall 2017

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Animation and Quaternions

10. Cartesian Trajectory Planning for Robot Manipulators

Topology of Surfaces

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

CS5620 Intro to Computer Graphics

COMPUTER ANIMATION 3 KEYFRAME ANIMATION, RIGGING, SKINNING AND CHARACTER ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

Rotation parameters for model building and stable parameter inversion in orthorhombic media Cintia Lapilli* and Paul J. Fowler, WesternGeco.

Visualizing Quaternions Course Notes for SIGGRAPH 99

Computer Graphics Curves and Surfaces. Matthias Teschner

Curves D.A. Forsyth, with slides from John Hart

CS 4621 PPA3: Animation

Animation. Traditional Animation Keyframe Animation. Interpolating Rotation Forward/Inverse Kinematics

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

Parametric curves. Brian Curless CSE 457 Spring 2016

Linear algebra deals with matrixes: two-dimensional arrays of values. Here s a matrix: [ x + 5y + 7z 9x + 3y + 11z

Kinematical Animation.

Name: Let the Catmull-Rom curve q(u) be defined by the following control points: p 1 = 0, 1 p 2 = 1, 1 p 3 = 1, 0. p 2. p 1.

Design considerations

Sung-Eui Yoon ( 윤성의 )

A Practical Parameterization of 2 and 3 Degree of Freedom Rotations

Know it. Control points. B Spline surfaces. Implicit surfaces

SUBDIVISION ALGORITHMS FOR MOTION DESIGN BASED ON HOMOLOGOUS POINTS

Central issues in modelling

CS612 - Algorithms in Bioinformatics

Rotation with Quaternions

How to Project Spherical Conics into the Plane

16.6. Parametric Surfaces. Parametric Surfaces. Parametric Surfaces. Vector Calculus. Parametric Surfaces and Their Areas

3D Transformations and Complex Representations. Computer Graphics CMU /15-662, Fall 2016

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

CS230 : Computer Graphics Lecture 12: Introduction to Animation. Tamar Shinar Computer Science & Engineering UC Riverside

Autonomous Navigation for Flying Robots

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Interpolating/approximating pp gcurves

2D Spline Curves. CS 4620 Lecture 13

Inverse Kinematics Programming Assignment

3D Game Engine Programming. Understanding Quaternions. Helping you build your dream game engine. Posted on June 25, 2012 by Jeremiah van Oosten

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

Shape modeling Modeling technique Shape representation! 3D Graphics Modeling Techniques

Curves and Surfaces for Computer-Aided Geometric Design

Rotations (and other transformations) Rotation as rotation matrix. Storage. Apply to vector matrix vector multiply (15 flops)

Rotations in 3D Graphics and the Gimbal Lock

Animation. Animation

2D/3D Geometric Transformations and Scene Graphs

CHAPTER 6 Parametric Spline Curves

Pythagorean - Hodograph Curves: Algebra and Geometry Inseparable

Introduction to Riemann surfaces, moduli spaces and its applications

Dgp _ lecture 2. Curves

ECE 600, Dr. Farag, Summer 09

Geometric Transformations

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Objectives. transformation. General Transformations. Affine Transformations. Notation. Pipeline Implementation. Introduce standard transformations

Tentti/Exam Midterm 2/Välikoe 2, December

Fundamentals of 3D. Lecture 3: Debriefing: Lecture 2 Rigid transformations Quaternions Iterative Closest Point (+Kd-trees)

Animating Transformations

Parametric curves. Reading. Curves before computers. Mathematical curve representation. CSE 457 Winter Required:

TECHNICAL REPORT NO Quaternion Gauss Maps and Optimal Framings of Curves and Surfaces. by Andrew J. Hanson

A 12-DOF Analytic Inverse Kinematics Solver for Human Motion Control

Computer Animation. Rick Parent

Rotational Joint Limits in Quaternion Space. Gino van den Bergen Dtecta

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

Transcription:

Visualizing Quaternions Part II: Visualizing Quaternion Geometry Andrew J. Hanson Indiana University Part II: OUTLINE The Spherical Projection Trick: Visualizing unit vectors. Quaternion Frames Quaternion Curves Quaternion Splines The Geometry of Quaternions Recall (a; b) with a + b = is a unit-length complex number or a point on the unit circle S. (a a-b b, a b+ab ) θ + θ (a, b ) (a,b) θ / θ/ (,) The Geometry of Quaternions... Similarly, = ( ; ~) with + ~ = is a unit-length uaternion or a point on the unit 3- sphere S 3. 3 4 The Geometry of Quaternions... Rotations combine by taking the uaternion product of the geometric values of 4D points on S 3 : Visualizing a Quaternion?? Learn how to Visualize a uaternion by starting with a visualization of a point on S, the circle: r =, ( ) * (, ) (,) (unseen) (, ) cos θ θ (seen) ^n sin θ 5 6

Visualizing a Quaternion??... Demo: D Unit Vector Projection Next, visualize a point on S, the ordinary sphere using only the projection ~: r =, ( ), ( ) 7 8 Visualizing a Quaternion??... Demo: 3D Unit Vector Projection Finally, visualize a point on S 3, the uaternion space: DISPLAY only ~, but INFER r =, ( ), ( ), ( 3) 9 Visualize Quaternion Rotations Demo: 4D Unit Vector Projection Each 4D uaternion point = (cos ; ^n sin ) is a frame a33rotation matrix generated by applying R(;^n) to the identity frame. Identity Matrix is the uaternion = (; ; ; ). Visualize using only the VECTOR part ~, so Identity is the zero vector.

Visualize Quaternion Rotations... The uaternion rotation by about ^n: = ( ; ) = (cos(=); ^n sin(=)) represents the matrix R(;^n). Action of rotating Identity by about ^n: (; ; ; ) gives Vector part: ~ ) ^n sin(=) Quaternion Interpretation Rotation axis is Fundamental 3-vector: We know = cos(=); ~ = ^n sin(=) We also know that any coordinate frame M canbewritten as M = R(; ^n). Therefore ~ points exactly along the axis we have to rotate around to go from identity I to M, and the length of ~ tells us how much to rotate. 3 4 Displaying spherical points Displaying a point on a sphere is ambiguous: N Demo: Growing Quaternion = Rotation about Axis ^ = reuired Euler theorem axis. h -h The same horizontal projection is shared by the North vector (h;~) and the South vector (,h;~). S 5 6 Orbit is Front/Back Line D projection of orbit around sphere has two half circles that line up in D, match at two edge points only in 3D. Projective spherical points Polar Projection removes ambiguity, destroys symmetry: Projection Center the North vector (h;~) and the South vector (,h;~) project to different points on the line. 7 8

Displaying S 3 Displaying S 3... A uaternion point can be displayed in Parallel Projection: so = (h;~) lines up with = (,h;~), Polar projection: so only the north pole projects within the unit sphere, and south pole is at of R 3. (a) (b) (c) (a) Usual vector uaternion point. (b) Orbits through northern and southern hemispheres. (c) Polar projection: north pole at origin, south pole at infinity. 9 Quaternion Curves Represent Families of Frames Each orientation is a 4D point on the 3-sphere representing a uaternion. Demo: Simple Quaternion Curves Thus families of frames, which are really rotation matrices, become curves on the 3-sphere. ) treat these curves just like any other curve... Families of Quaternion Frames,... Example: torus knot and its (twice around) uaternion Frenet frame: Families of Quaternion Frames,... Example: Surface describes two-degree-of-freedom joint - y see: Hanson and Ma, Quaternion Frame Approach to Streamline Visualization, IEEE Trans. on Visualiz. and Comp. Graphics,, No., pp. 64 74 (June, 995). 3 - - - z - y - x Remark: Group theory demands that x and y rotations combine to give some z rotation! x - 4 z

Interpolating on Spheres Quaternion Interpolations Shoemake (Siggraph 85) proposed using uaternions instead of Euler angles to get smooth frame interpolations without Gimbal Lock: BEST CHOICE: Animate objects and cameras using rotations represented on S 3 by uaternions N-dimensional spherical interpolation employs the SLERP, a constant angular velocity transition between two directions, ^n and ^n : ^n (t) = Slerp(^n ; ^n ; t) sin((, t)) sin(t) = ^n + ^n sin() sin() where cos = ^n ^n. 5 6 Quaternion Interpolations Many variations have been proposed since then; simplest is Remark on Spherical Interpolation (The SLERP formula is simply the result of applying a Gram- Schmidt decomposition to the two vectors while enforcing unit norm in any dimension.) simply to apply the formula iteratively to give analog of the de Casteljau spline construction: final point 34 34 3 3 3 34 4 7 8 Spline Families Spline Families... Schlag (in Graphics Gems II (99)) gives recursive form for several cubic splines: S(x ; x ; x 3 ; x 4 ; t) = L(L(L(x ; x ; f (t)); L(x ; x 3 ; f 3 (t)); f 3 (t)); L(L(x ; x 3 ; f 3 (t)); L(x 3 ; x 4 ; f 34 (t)); f 34 (t)); f(t)) For Euclidean space, the interpolator is L(a; b; t) = a(, t) + bt while for Spherical space, the interpolator is sin((, t)) L(a; b; t) = a + b sin(t) sin sin where a b = cos. 9 3

Spline Families... Catmull-Rom Spline Families... Bezier f = t + f 3 = t f 34 = t, f 3 = (t+) f 34 = t f = t f = t f 3 = t f 34 = t f 3 = t f 34 = t f = t 3 3 Plane Interpolations Spline Families... Uniform B-spline In Euclidean space, these three basic cubic splines look like this:.5.5.5 f = (t+) 3 f 3 = (t+) 3 f 34 = t 3 f 3 = (t+) f 34 = t f = t 33 - - - - - Bezier Catmull-Rom Uniform B The differences are in the derivatives: Bezier has to start matching all over at every fourth point; Catmull-Rom matches the first derivative; and B-spline is the cadillac, matching all derivatives but no control points. - 34 Spherical Interpolations Quaternion Interpolations - - - - - - - - - - - - - - - - - - Bezier Catmull-Rom Uniform B Bezier Catmull-Rom Uniform B 35 36

Optional: Exponential Quaternion Map Exponential map (Kim, Kim, and Shin; see also Grassia) has these advantages: Demo: Interpolated Keyframe Quaternion Curves 37 Derivative Computation Simpler. Initial velocity conditions work. Derivative Matching Simpler. Easier to match neighboring derivatives. No Renormalization Re d. 4vars, 3DOF) 3 independent vars, constraints automatic. 38 Exponential Quaternion Map... METHOD: use only three vector degrees of freedom ~n = ^n =: exponentiating gives four-component uaternion obeying unit 3-sphere constraint: (~n) = e (I^n =) = (cos(=); ^n sin(=)) Note (Grassia): the uaternion frame evolution euations can be then be written directly in terms of the 3-vector ~n! Exponential Quaternion Map... Then, using logarithms of uaternion control points, e.g., ~n = log =! jj = cos, ( ) jj where ~n is not normalized, we can use splines in the reduced Euclidean 3D space. 39 4 Exponential Quaternion Map... The trick: Wherever you would see x + t(x, x ) in a Euclidean spline, replace (x, x ) by! = log(( ), ) (This is easy: uaternion multiplication gives a new Q = (Q ; Q), and! = log Q is computed as usual.) Exponential Quaternion Map... Then, with! i = log(( i,), i ),let k Y (t) = exp(! i i (t)) i= ) Euclidean spline i (t) methods can be used, and derivative computations are simplified. 4 4

Exponential Quaternion Map... Example of a many-control-point Catmull-Rom spline done using the exponential method: - Even More Quaternion Interpolations... A number of other approaches can be found in the bibliography. Other literature includes: Barr et al. Global optimization emulating vanishing 4th derivative of Euclidean cubic splines, but on uaternion three-sphere. - - Jüttler et al.: Generalized rational splines, including uaternion component as well as a spatial component. 43 44 SUMMARY The Spherical Projection Trick: unit vectors. Visualizing Quaternion Frames: ^n in uaternion tells how to make frame. Quaternion Curves: are like any other curve; spline applications. 45