Dual Number

Recently, I read the "Spherical Skinning with Dual-Quaternions and QTangents" from Crytek. It raised my interest on the topic of "Dual Number" (which is related to Dual Quaternion). Dual number, just like imaginary number, has the form of:
where the real number a is called real part and the real number b is called dual part.

Arithmetic operations
Dual number can perform the arithmetic operations as below:


Finding derivative using Dual Number
The interesting part of dual number is when it is applied to Taylor Series. When substituting a dual number into a differentiable function using the Taylor Series:
This gives a very nice property that we can find the first derivative, f'(a), by consider the dual part of f(a+bε), which can be evaluated using dual number arithmetic.
For example, given a function
we want to find the first derivative of f(x) at x = 2, i.e. f'(2). We can find it by using dual number arithmetic where f'(2) will equals to the dual part of  f(2+ε) according to Taylor Series.
Therefore, f'(2)= 8/9, you can verify this by finding f'(x) and substitute 2 into it, which will give the same answer.

By using dual number, we can find the derivative of a function using dual arithmetic. Hence, we can also find the tangent to an arbitrary point, p, on a given parametric curve which is equals to the normalized dual part of the point p. For those who are interested in finding out more about dual number, I recommend to read the presentation "Dual Numbers: Simple Math, Easy C++ Coding, and Lots of Tricks" by Gino van den Bergen in GDC Europe 2009.

[1] http://en.wikipedia.org/wiki/Dual_number
[2] http://www.gdcvault.com/play/10103/Dual-Numbers-Simple-Math-Easy

3 則留言:

  1. It is worth noting that the conjugate of a number z = a + b ε is similar to complex numbers, z' = a - b ε.

    Great articles on dual numbers and dual quaternions, thanks!

  2. Please can you tell me how can I conver a 4X4 transformation matrix into a dual quaternion?

    1. The conversion between matrix and dual quaternion can be found in my "Dual Quaternion" post (http://simonstechblog.blogspot.hk/2011/11/dual-quaternion.html), under "Dual Quaternion - Matrix Conversion" section. Thanks