Mathematics for Realtime Animation part two - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Mathematics for Realtime Animation part two

Description:

A reflexion can not be obtained by a rigid body motion, therefore we require det ... of two reflexions is not a reflexion). Ladislav Kavan. 6. Rotation in R3 ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 13
Provided by: lad6
Category:

less

Transcript and Presenter's Notes

Title: Mathematics for Realtime Animation part two


1
Mathematics for Real-time Animation (part two)
  • Ladislav Kavan

2
Matrices
  • A square m ? m matrix M is a table of real numbers
  • Recall matrix-matrix multiplication,
    matrix-vector multiplication (vector ? one-column
    matrix)
  • Properties
  • M(NK) (MN)K (if defined)
  • MN ? NM (in general)
  • MI IM M (the identity matrix)

3
Orthonormal Matrices
  • A square matrix M is orthogonal (orthonormal) if
    its columns, interpreted as column vectors, are
    orthogonal (orthonormal).
  • Properties of orthonormal matrices
  • M-1 MT
  • ?x,y?V ltMx, Mygt ltx, ygt
  • ?x?V ?
  • det(M) 1
  • rows of M are orthonormal
  • Especially for 3?3 orthonormal matrix, there
    always exists x?0 such that Mx x

4
Rigid Body Motion
R - 3?3 matrix t - column vector
  • R is a matrix of associated linear mapping, t is
    a translation vector.
  • A rigid body motion is an affine transformation
    which preserves lengths (i.e. dot product).
  • Matrix M represents a rigid body motion iff R is
    an orthonormal matrix.
  • If R is orthonormal, then M transforms frames to
    frames (cartesian coordinate systems).

5
Rigid Body Motion
  • If det(R) 1, then R represents a rotation
  • If det(R) -1, then R represents a reflexion
    (transforms right-hand basis to a left-hand one)
  • A reflexion can not be obtained by a rigid body
    motion, therefore we require det(R) 1
  • Identity (matrix I) is a rotation (with zero
    angle)
  • Composition of two rotations is again a rotation
  • Inverse rotation is also a rotation
  • algebraically rotations form a group
  • (Composition of two reflexions is not a
    reflexion).

6
Rotation in R3
  • In R3, there always exists a?0 such that Ra a
  • What is a? Invariant direction the axis of
    rotation!
  • Assume that a (1,0,0). Then R must look like

R preserves the first coordinate and in the other
two acts as a 2D rotation. The same is true for
any axis (although the matrix is not as
simple). Convention angle of rotation in a
right-hand sense
7
Cross (Vector) Product
  • The cross product of R3 vectors x (x1, x2, x3)
    and y (y1, y2, y3) is a vector
  • Properties ?x, y, z ? R3 ?k?R
  • neither commutative nor associative
  • ltx ? y, xgt 0, ltx ? y, ygt 0 (orthogonality)
  • (x y) ? z x ? z y ? z
  • (kx) ? y k(x ? y)
  • if x, y orthonormal, then x, y, x ? y is a
    right-hand orthonormal basis

8
Cross Product to Matrix
  • For each vector x (x1, x2, x3) ? R3 we can
    define a 3 ? 3 matrix M(x)

This matrix converts cross product to a matrix
multiplication, i.e. ?y?R3 x ? y M(x)
y Note that M(x) is anti-symmetric M(x)T -M(x)
9
Rotation about a General Axis
  • The rotation with axis a?R3 and angle ? can be
    expressed as a matrix
  • R(a, ?) cos(?)I (1- cos(?))M(a)2 sin(?)M(a)
  • where
  • I is the identity matrix
  • M(a) is the matrix representation of cross
    product
  • known as the "Rodrigues formula"

10
Combination of Points in A3
  • Let x1, x2, ..., xn ? A3, and w1, w2, ..., wn ? R
  • A point y ? A3 is an affine combination of points
    x1, x2, ..., xn if
  • y w1 x1 w2 x2 ... wn xn, and
  • w1w2...wn 1
  • (Why 1? Recall affine coordinates!)
  • A point y ? A3 is a convex combination of points
    x1, x2, ..., xn if
  • it is an affine combination of x1, x2, ..., xn,
    and
  • w1?0, w2?0, ..., wn?0
  • Note If we require w1w2...wn 0, the result
    will be a vector (again recall affine
    coordinates)

11
Affine and Convex Hull
  • An affine (resp. convex) hull of points x1, x2,
    ..., xn ? A3 is the set of all possible affine
    (resp. convex) combinations of x1, x2, ..., xn
  • (Compare with the linear hull!)
  • Example What is the affine and convex hull in A3
    of
  • two points?
  • three points?
  • four points?
  • five points?

12
Convex Sets
  • A set of points S ? A3 is convex if
  • ?x, y ? S ?t?0,1 (1-t)x ty ?S
  • (i.e. for each two points in S, their connecting
    line segment is also in S)

Example
convex
non-convex
Write a Comment
User Comments (0)
About PowerShow.com