A translation for Quaternion

Source: Internet
Author: User

 

A. This is a translation of the thesis that explains the theory of the Quaternary element. For the original article, see here.

B. I have found a lot of information on the Internet before, but it is basically a conclusive introduction and I have not thoroughly explained why. So after reading this article and understanding it, I decided to translate it. On the one hand, I used it as a summary of my knowledge and on the other hand, I helped my friends in similar situations.

C. It does not mean that this translation has no errors. In this section, especially about the history of the Quaternary element, due to the lack of necessary mathematical conservation, I am not sure whether it is correct. Please help me with the calibration. In addition, due to the limited level of English, many areas have been relatively stiff. I hope you can see haihan.

D. In the text (Note: ... The reasoning I make based on the context does not represent the author's point of view (in fact, the author did not say anything in those places, sometimes you have to push it yourself to understand ).

E. Due to the relationship between energy and time, I did not translate the full text. I just excerpted an important chapter. However, I believe that we have covered the necessary knowledge of the four elements, which is sufficient for you to complete a camera system (Camera System)

F. The reason why I say "enough" is that I have used these theories to write a camera that is supported by four elements.

G. I have an idea to find out from the beginning, to implement the function step by step, and then to the summative translation of this Article. Every night I see the plug-in for about two hours, which lasted nearly three months. It takes a long time to get exhausted. Snake is old...

 

-------------------------------------------

 

 

Quaternary

Ken shoemake
Department of Computer and Information Science
University of Pennsylvania
Philadelphia, PA 19104.

 


Summary

Most of the mathematical knowledge involved in graphics is detailed and complete, with the exception of ons. This article is written as a result. This tutorial introduces topics such as "What is a quaternary object", "Why is it so useful", "how to use it, where to use it", and "when to use it.

 

 

Introduction

In the field of graphics, the concept of rotation and orientation is generally used to express the concept. At the Siggraph conference in 1985, the quaternion curve method was first introduced to graphics, making it easier to compute the rotation animation. Although this is only a very special case, it is superior to the mainstream matrix notation or the minority's Euler's angles notation, do not lose points.

 

As a new technology applied to the curve method and many fields, such as the physical-based modeling technology and the constraint system) and the user interface. It is widely used because it is more concise, cost-effective, and elegant than other similar technologies. However, to master it, researchers and developers must learn some new mathematical knowledge, but general math or science courses do not teach any element 4. In a word, either from the perspective of the homogeneous coordinates or from a broader perspective, not just a complex upgraded version of the four dimensional homogeneous coordinates (four-component homogeneous coordinates) We know.

 

 

Ry Definition

There are several defining methods for the Quaternary element. These methods may have different forms, but they are essentially equivalent to each other. Understanding these forms is necessary because each form is very useful to us. For the first time in history, Hamilton defined the Quaternary element as a form of generalized plural: W +IX +JY +KZ, where,I2 =J2 =K2 =-1,IJ=K=-Ji, And,I, J, KIt is a virtual number, while w, x, y, and z are real numbers. (A mathematician uses h to represent a quaternary number to commemorate Hamilton ). There is a very special case in the operation of the Quaternary element: the multiplication is not interchangeable. The rest of the operations are similar to those of real numbers. Hamilton once realized that this "similarity" can be used to abstract the characteristics of the Quaternary element. Specifically, it simply regards the Quaternary element as a set composed of four real numbers [X, Y, Z, w], and define addition and multiplication for it as appropriate. However, when the plural number appeared, Hamilton "packed" (x, y, z) into an imaginary part and called it "vector, the real part is called the scalar ). Subsequently, researchers (mainly James) borrowed the terms invented by Hamilton, and extract a set of more "clean" rules from the dirty, but regular operational rules of the four-element model (extracted from the clean operations of quaternion arithmetic the somewhat messier N but more general n operations of vector arithmetic): that is, the dot products and cross products operations that will be taught in the course. For today's us, we can easily look back at history and use modern concepts such as dot product and cross product to describe the Times's Quaternary.

Based on the above point of view, we now come up with the following facts: First, we generally define the Quaternary element as follows :[V, W], whereVIs a vector and equal to (x, y, z), while W is a real number. Assume that there is a real number S. If we describe it in the form of semicolons, It is equal [0, S], while a pure vector V, if described using a quaternary element, is [V, 0]. Next, we will provide some basic operation rules for the Quaternary element:

 

Note that N (q) is a scalar, so the reciprocal definition of Q is clear (so the description of q-1 is well-defined ). In addition, non-interchangeable multiplication causes some operations to be expressed in a clearer form (otherwise, the non-commutatiativity of multiplication requires explicit expressions ), for example, use PQ-1 instead of P/Q.

In the formula listed above, there is a definition of the operation itself, and there is also a conclusion derived from the definition. It is very useful to try to deduce these conclusions as a theorem, and it is not difficult: every proof can be directly calculated.

 

Rotate with a quaternary Element

Theorem 1 can be used to describe the rotation relationship between the Quaternary element and the three-dimensional space.

Theorem1: P is a point in a three-dimensional (projected) space. It is expressed as a four-dimensional (X: Y: Z: W) using homogeneous coordinates) = [(x, y, z), w] = [V, W]; make Q any non-zero Quaternary. So:

  • Conclusion1)The result of expression qpq-1 will make P = [V, W] to p '= [V', W], the appearance of the two models.
  • Conclusion2)If any non-zero real number is multiplied by Q, the above formula is still true.
  • Conclusion3)Q = [VSin Ω, cos Ω] indicates a rotation action: Place P along the unit axisV Rotate 2 Ω to get P '.

 

Proof:Let's start fromConclusion2Start. This conclusion is easy to prove. Since the reciprocal of SQ is a q-1s-1 and the scalar multiplication satisfies the exchange law, we can get:

(SQ) · P · (SQ)-1 = SQ · P · Q-1s-1 = qpq-1ss-1 = qpq-1

 

According to this conclusion, we can regard this Q as a single unit, as shown in the following figure:Conclusion3And is general. For the unit Q, since the Q-1 = Q *, we can write the qpq-1 QPQ *.

 

Now we can prove that conclusion 1 is much simpler. Generally, when performing some transformations on a scalar, the result is often still a scalar. Similarly, for a vector [V, 0] for a series of transformations, the result is still a vector. For any Quaternary Q, the scalar part (that is, the real part) S (q) can be extracted using the formula 2 S (q) = q + Q. So we can get the equation:

2 S (QPQ *) = (QPQ *) + (QPQ *) * = QPQ * + QP * Q *

 

As the multiplication of the four-element model follows the linear law, we can propose the formula as follows:

Q (p + p *) Q * = Q (2 S (p) Q * = 2 S (p )[Note 1]

 

Furthermore, because the multiplication of the four elements also acts on the modulus (because multiplication preserves norms,), the N (p) = N (p ')[Note 2]; At the same time, because W does not change, N (v) = N (v ') can be obtained ').

(

Note 1:Because 2 S (P) is a scalar, we can put it in front and get 2 S (p) QQ *. In conclusion 2, q [***] Q * indicates that the result is not affected if Q is a unit of four elements. So we can think of it as a unit, which has Q * = q-1, so2 S (p) QQ * =2 S (p) QQ-1 = 2 S (P ).

NOTE 2:The so-called "because multiplication preserves norms" can be understood as follows: Because P' = QPQ *, and because multiplication preserves the module length, at the same time, we have taken Q as the unit Quaternary (meaning N (q) = N (Q *) = 1), so n (P') = N (P ). Note that the above Proof 2 S (P') = 2 S (P), that means W parts are the same. The two four-element modulo appearances have equal parts. It is not difficult to obtain that their virtual modulo lengths are equal, that is, N (v) = N (v ').

)


Finally, let's prove Conclusion 3, the core of this theorem. N (V0) = N (V1) = 1. We define a quaternary q =V1v0* = [V0×V1,V0·V1][NOTE 3]. Let's define Ω as the angle between V0 and V1, soV0·V1= Cos Ω. We can set another unit vector in the cross product direction of the two vectors.V = (V0×V1)/V0×V1‖, The unit vector is perpendicularV0AndV1. Now we can write Q [VSin Ω, cos Ω][NOTE 4](We should assume thatV1==±V0Otherwise, q = + 1, so this rotation action is invalid) (we shall assumeV1±V0, Else q = ± 1, and the action is the identity ).

 


(

Note 3: The following explains why v1v0*= [V0 × V1, V0 · V1]. Based on the basic facts of the four elements listed above, we know that V0*= [V0, 0]*= [-V0, 0] =-V0. We also know VV'= [V × V',-V · V'], Here v = V1, V' = V0*. Therefore, obtain v1v0.*= (-1) v1v0 = (-1)[V1 × v0,-V1 · V0] = [V0 × V1, V0 · V1].

Note 4:The following explains why Q can be written [VSin Ω, cos Ω]. Now we know q =V1v0* =[V0 × V1, V0 · V1]. ObviouslyV0 · V1 =Cos Ω. AndV0×V1=V ·V0×V1‖.V0×V1‖ Is a vector product.V0×We haveV0×V1‖ =‖ V0‖ V1Sin Ω, because V0 and V1 are all units vectorsV0×V1‖ =

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.