zoukankan      html  css  js  c++  java
  • Rodrigues formula is beautiful, but uneven to sine and cosine. (zz Berkeley's Page)

    Notes originally by Laura Downs and by Alex Berg

    CS184: Computing Rotations in 3D


    Using the Rodrigues Formula to Compute Rotations

    Suppose we are rotating a point, p, in space by an angle, b, (later also called theta) about an axis through the origin represented by the unit vector, a.

    First, we create the matrix A which is the linear transformation that computes the cross product of the vector a with any other vector, v.

    a x v =
    ayvz - azvy
    azvx - axvz
    axvy - ayvx
    =
    0 -az ay
    az 0 -ax
    -ay ax 0
    vx
    vy
    vz
    = Av, with A =
    0 -az ay
    az 0 -ax
    -ay ax 0

    Now, the rotation matrix can be written in terms of A as

    Q = eAb = I + A sin(b) + A2 [1 - cos(b)]

    A Geometrical Explanation
    Rotation as Vector Components in a 2D Subspace

    Suppose we are rotating a point, p, in space by an angle, b, about an axis through the origin, represented by the unit vector, a. The component of p parallel to a, ppar a, will not change during the transformation. The component of p perpendicular to a, pper a will rotate about the axis in the plane perpendicular to the axis the same as in 2D The vectors pper a and pbiper ar of the correct length and orientation to act as the x and y vectors in this 2D rotation.
    p' = ppar a + cos(b) pper a + sin(b) pbiper
    p' = (p + (a x (a x p))) + cos(b) (-(a x (a x p))) + sin(b) (a x p)
    p' = p + sin(b) (a x p) + [1 - cos(b)] (a x (a x p))
    p' = (I + sin(b) A + [1 - cos(b)] A2) p


    An Algebraic Explanation
    Rotation as a Differential Equation

    Suppose we are rotating a point, p, in space by an angle, b (called theta in the formatted equations), about an axis through the origin, represented by the unit vector, a. We will form a differential equation describing the motion of the point from time t=0 to time t=b. Let p(t} be the position of the point at time t. The velocity of the point at any time is


    p'(t) = a x p(t)

    Now, if we use the matrix formula for cross products in our differential equation, we have a first order, linear system of differential equations, p'(t) = A p(t). The solution to that system is known to be p(t) = eAtp(0) so the location of the rotated point will be p(b) = eAbp(0).

    Taylor Expansions

    Now we need to evaluate eAb, so we examine its Taylor expansion.


    Considering how we constructed A, it is easy to verify that A^3 = -A Every additional application of A turns the plane of ppar aA^2 in the appropriate places, we get


    Now, we recognize the Taylor expansions for sin(b) and cos(b) in the above expression and find that


    eAb = I + A sin(b) + A2 [1 - cos(b)]
    with A =
    0 -az ay
    az 0 -ax
    -ay ax 0

    gives us the rotation matrix. This formula is known as Rodrigues' Formula.


    Useful Note Given an arbitrary rotation matrix, can we find the corresponding rotation axis vecto and the angle of rotation
    Consider R=eAb then by some algebra based on A =- At we have, R-Rt = 2Acos( b ) Using this and solving for a unit axis, and an angle we can recover the axis (up to a factor of +/-1) and angle up to a factor of +/- 2pi.

    References

    • "A Mathematical Introduction to Robotic Manipulation", Richard M. Murray, Zexiang Li, S. Shankar Sastry, pp. 26-28

  • 相关阅读:
    为什么未来是全栈project师的世界?
    剑指Offer面试题10(Java版):二进制中的1的个数
    arm-linux内存管理学习笔记(1)-内存页表的硬件原理
    高速掌握Lua 5.3 —— 字符串库 (2)
    C语言实现使用动态数组来构造栈结构
    [自学AndroidStudio系列]第二篇章:高速上手AS小技巧其一
    苹果新的编程语言 Swift 语言进阶(十三)--类型检查与类型嵌套
    JAVA 安装JDK注意事项
    hdu 1398 Square Coins(母函数)
    百度有道雅虎的实习面试经历
  • 原文地址:https://www.cnblogs.com/stevenxiu/p/5613796.html
Copyright © 2011-2022 走看看