Talk:Quaternions and spatial rotation

From Wikipedia, the free encyclopedia

This article is marked:

Author: M. Romero Schmidtke.
Translator: August Pieres.

Please can the authors confirm that this is original work, donated under the GFDL?

The article appears to be a translation from this Enciclopedia Libre article; M.Romero Schmidtke is a regular contributor there. AxelBoldt 01:26 Apr 7, 2003 (UTC)


Thank you, August Piers, for this translation of my article. I would surely not have done better. And yes, it is an original work, writen specifically for enciclopedia libre and the spanish wikipedia.

M. Romero Schmidtke, April 26 , 2003.

The following text was cut from the main page. -- Fropuff 03:48, 2004 Aug 2 (UTC)

Contents

[edit] a thought

One can specify a rotation in n dimensions by specifying two unit vectors A and B. The specified rotation is that which maps A onto B. The axis of rotation in n dmensions is a surface of (n-2) dimensions. Only in three dimensions is this axis itself one-dimensional.

I would guess, then, that a quaternion of rotation is equivalent to the cross product of the two unit vectors A and B, which is also a vector only in three-space, and whose magnitude also varies as the sin of the angle.

I'm not sure what you mean by "The specified rotation is that which maps A onto B." In 3 dimensions, there can be many rotations that map A onto B, not just the ones with the cross product as axis. Jwwalker


29 November 2005

I think perhaps the original suggestion is well defined, but the contributor is confusing the point with incorrect vocabulary and muddled concepts. What is probably meant is as follows:

One can specify a rotation in n dimensions by specifying two reflections. Indeed, this is the definition of a rotation. Each reflection can then in turn be specified by a corresponding unit vector, orthogonal to the (n-1) dimensional subspace which is invariant under the reflection. There are two such vectors: A and -A. If we choose positive notation by convention, A is mapped to -A under the reflection represented by A.

Composing with a second reflection B moves -A to its final desination = 2[A|B] B - A , where [x|y] specifies the finite dimensional inner product, following the notation of quantum mechanics for infinite dimensional inner products (<x|y>). [A|B] is of course the cosine of the angle between A and B, call it t, and defines this angle unambiguously. Therefore, A is rotated by an angle 2t through B, in the two dimensional subspace containing both A and B. The 'axis' of rotation is the n-2 dimensional subspace fixed by the composition of the two reflections A and B and is orthogonal to the plane containing A and B. I say 'axis' because its use in this context is an unforgivable corruption of terminology.

Returning to the topic at hand, namely quaternions, one may form the rotation which takes the three dimensional vector A to B in the plane of A and B by calculating sqrt(AB). As the second contributor correctly notes, there are infinitely many other rotations which move A to B. Of course, if A and B are not of unit magnitude, the resulting square root needs to be normalized.

The square root of a quaternion rotation operator is the quaternion operator which, when applied twice to all vectors in three space, yields the same movement as the orginal operator applied once. The square root rotates about the same axis, but by only half the angle. So given q=-cos(t )+usin(t ), which rotates 3-vectors about the axis u by an angle 2t, sqrt(q)=-cos(t /2)+usin(t /2). u is of course a unit pure quaternion specifying the axis of rotation (i.e. a three dimensional vector), and the resulting operator moves vectors by an angle t about u.

An interesting alternative axis of rotation for moving A to B is the unit vector bisecting the angle between them. In this case, the rotation operator is a pure quaternion (t = 90 degrees) formed by computing (A/|A|+B/|B|)/|(A/|A|)+(B/|B|)|, where |x| denotes the norm or magnitude of x.

P.S. As an after thought, the main article on quaternions and spatial rotation needs to be completely rewritten. It is confusing and misleading in places and was clearly authored by individuals who rarely use quaternions in practice, and therefore lack intuitive understanding.

14 December 2005

Well, it seems either no one is tracking this article's discussion, or no one is critically reading it, since the egregious error in my equation for the final destination of A above went unnoticed and uncorrected by others. It is now correct. It seems I muddled the forms for orthogonal bases and self referential bases in my head, which just goes to show extemporaneous online mathematical discourse is error prone. The correct equation is completely self referential.

Ironically, I had the presence of mind to correct the omission of the sqrt in [A|B] B - sqrt(1-[A|B]^2)A the first time I revisited the page, but didn't notice the orthogonal basis adjustment factor was unnecessary, and incorrect in this context.

In spite of these foibles, per wiki etiquette, I am announcing here in the discussion that I have decided to rewrite this article in stages over the next few months, whenever I have a few hours to kill. This is a heads up, in case someone else has adopted this article, or may wish to collaborate on the revision. While I am evidently not the most competent person for the job, apparently no one in the current time frame has greater competence.

When I am finished, the article will be completely new, and I will therefore delete the copyright issue noted above, as it will become irrelevent.

Hi. Just a note that you are being watched :) . I don't know much about quaternions though and I never used them, so don't expect any help on the maths from me. Please go ahead and improve the article as you see fit. I hope you'll create an account first; that makes it easier to communicate and it enables you to tell us your background; alternatively, if that's what you want, it gives you more anonymity because it hides your IP address. Oh, and don't use this [ | ] notation for inner products unless it really is standard in this context; it most certainly is not standard in the general area of mathematics. I use x · y or xTy or 〈x,y〉; you may also use the physicists' 〈x|y〉 notation if you like it; it certainly is not restricted to infinite dimensions. Good luck! -- Jitse Niesen (talk) 23:02, 14 December 2005 (UTC)

3 January 2006

Well, it is good to know some discussion takes place before revisions. Regarding anonymity, I have no personal online access and use public terminals exclusively. For the purposes of this effort, I've been making a point of using the same public terminal so that the URL in the history consistently identifies me. Therefore, contributing without an account gives me the greatest anonymity, for I can change terminals in a trice.

Regarding notation, I will stick with what I've used above for reasons which will become apparent. I've nearly completed the revision in my head, and will begin data entry later this week. As far as unconventional notation goes, it is worth noting that Conway, in his recent book on octonians, implicitly defines the norm of a vector as the square of what is usually considered to be a norm, as a contradistinction to the magnitude. It is a good idea, and it sets a useful precedent, something which someone of Conway's stature can easily get away with.


14 Jan 2006

A word of encouragement: The author of the article is doing a better job of explaining a somewhat tricky subject than is usual - rather than simply displaying erudition, as some authors do, he/she seems to be genuinely aware of the pitfalls that can trap (and even dishearten) the interested but non-expert reader; if the Wikipedia is to be useful, it is to this level that I believe it should be targetted. Thanks. PGE.


17 January 2006

Since I'm still quite a wiki-neophyte, there are some editing details that need attention

  • The citation mechanism I'm using is ad hoc, created merely to enter the data. What is needed is a footnote placing the data at the end of the article, with a numbered link in situ. I don't know how to do this.
  • As things progress, the addition of several figures would be illuminating. I don't know how to make or insert such graphics.
  • The math mode creates very awkward font size changes. My predisposition thus far is to make it look right in an ad hoc way. This will become increasingly burdensome as things progress. On the other hand, the formatting choices of the math system are usually positively repulsive aesthetically.

I trust there are more experienced individuals who can help with this. Thus far, I've mostly simply imitated notation existing in the page, and gleaned a few techniques from the "cheat" link on the edit help page. Therefore, if someone would fix a citation, I can figure out what needs to be done with the rest of them.

Adding an image to this wikipedia is a simple matter - I did the images on the Mobius Transformation page. Creating them is quite a bit trickier. I did the 3d images with a tool called "PovRay", but that is not an interactive graphical tool: you have to greate a description file and tell your machine to render it. Pmurray bigpond.com 23:56, 20 February 2006 (UTC)

[edit] Versors

Versors are described in Earliest Known Uses of Some of the Words of Mathematics (under Tensor) and in this tutorial, but I found neither clear or relevant enough to be included in the References. -- Jitse Niesen (talk) 11:29, 10 September 2005 (UTC)

[edit] In Summary

The "Quaternion rotation" has a summary where it gives the cookbook formula for making a quaternion given an angle and a unit vector.

Could someone add the converse - the formula for getting the vector and the angle from an arbitrary quaternion? Yes, I suppose the reader can work it out from what's given but it would be nice and encyclopedic to include it.

Actually - why not make this summary a separate section? Name it "this is how you actually do it", or something.

Oh - and why use <u, v> (rather than the dot operator) for the dot product when the cross operator is used for the cross product?

As an afterthought: please don't remove these equations. There's an annoying trend on the math pages for hard-core math guys to remove the cookbook ("analytic") stuff. I imagine they feel that people should make the effort to understand the deeper beauties and derive the equations themselves, because the actual resulting equations are uninteresting: but it really imposes a learning curve and makes it difficult for people like me who just want to write code.

[edit] Too technical

This article certainly needs many cleanup, accessibility change, tone and style change, and even an rewrite. Personally, I think this article should be moved to wikibooks, but it is also true that wikipedia could use an article that explain how to do spatial rotation using quaternion in detail, through not excessively(translation: not too long that scare away all people).

I suggest that it be moved to wikibooks, and either rewrite this article here, or take the following measures to take it up to encyclopedia article standard:

  • The introduction on certain special properties of quaternion can be summarized and moved to the main quaternion article.(And yes, the non-commutativity of rotation can be better explained by using a diagram)
  • While useful for an indepth understanding, I don't think doing rotation would need understanding projective space, operator space, and all the like. The concepts section cannot stay, I'm afraid
  • Historical terminology(!) can be moved to their respective article.(PS: does this section imply that sometimes historical terms will be used?!)
  • Modern terminology can be moved to the last part of this article, sort of like an appendix, until we know what to do with them.
  • I know there is difference in notation in computer science and mathematics, even for the same concepts, but I think for the part that shows the mathematics, derive how to do rotation, prove that it is correct, etc, they should use standard mathematics notation(We have LaTeX, sir) , so that it is accessible to mathematician.
  • And then, if there's even an algorithm section, that can use the computer science group's notation, if there's a difference.
  • Instead, the algebraic rules section should be moved to the beginning, as a summary/revision.
  • The rest is ok as it stands. Through the derivation of quaternion for rotation(That is, the main point of this article, afterall) need quite some expansion.
  • And as a sidenote, the citation can be done in a footnote style, rather than brackets everywhere(check any featured article and notice some small number that occassionally appear at the end of a sentence.)

That's all for now, thanks. --Lemontea 02:34, 23 April 2006 (UTC)

Agree. The article is not too technical; its too verbose. The mathematics behind this is actually quite easy, but you would never guess that from this article. The sheer heft of this article is daunting. This whole thing should be moved to wikibooks, and re-written from scratch. linas 14:56, 18 August 2006 (UTC)
Yes. FAR too technical. The person talking about rotating vectors makes much more sense to me than talking about reflections. The person saying reflections are the basis of the definition of rotation may be right for 4 or higher dimensions, but I really don't think this needs to be mentioned in the article at all, it only confuses me.

[edit] Copied?

Has this article been copied from some other site? For one thing, there's this:

...which will not equal the absolute position implied by the sum produced in another representation. This problem arises when simply translating the origin some small distance from the original representation. (illustrative figure here) The positions are unique absolute physical positions, whereas the n-tuple is merely a symbolic abstraction....

Which looks as if a hyperlink was lost in the conversion to text, and nobody noticed.

For another thing, this is not Wikipedia style at all. It reads like a very, very boring book. Worse still, it doesn't actually make sense to anyone who doesn't already know what the article is about. I'm trying to make sense of it, but it's just frustrating the hell out of me.

My brother once said, "I've looked on Wikipedia, but I didn't understand it." This is my first go at that experience. 86.136.82.105 15:31, 9 May 2006 (UTC)

The source is mentioned at the top of this talk page. Actually this is a small corner of wikipedia that I'm afraid are rarely visited, as shown by how my comment and suggestions(see above) recieve no reply, not even acknowledgement or objection. And it's true that this topic is a quite specific and difficult one. Anyway, I tried to understand quaternion by starting from the matrix representation of complex number. Why rotation was done that way is still unknown to me. --Lemontea 11:25, 10 May 2006 (UTC)

[edit] no pictures

That's pretty extreme to discuss that whole article without a single picture.

Re. ^^^^: People's heads probably started aching before they got up to there.

[edit] Could we have something a bit more to the specific topic?

Could we have something a bit more to the specific topic? The topic is not quaternions, which already exists (elsewhere), it is quaternions and spatial rotation. I would be expecting something to tell me

  1. how to represent rotation in terms of quaternions
  2. why quaternions are better than matrixes.

It seems that Blender uses quaternions to represent rotations; perhaps that would provide some assistance from the Blender documentation. m.e. 05:38, 16 October 2006 (UTC)

Ya, *unfortuneately* (from a user standpoint), Blender does use Quats for "bone" rotation representation in the "IPO" (graph) editor.

[edit] Book Description and zy rotation

I changed some of the description for the initial "book" example, it appeared to me that the "spine direction" description was incorrect. If I have changed it incorrectly, please advise .. (and I'll be confused :) if so).

Also in the description of "In fact, the composition zy represents a single rotation of 180 degrees about the [-1 1 0] axis", does that imply from [0 0 0] to [-1 1 0] ? I assume so, as otherwise I don't understand how an axis can be defined by a single point:) .. Unless it's more "understood" math terminology that I'm not familiar with :) Mike Stramba 17:19, 2 December 2006 (UTC)

Conventionally, an axis is represented by a unit vector (magnitude 1), such as the above mentioned [-1 1 0], so your assumption is correct. Btw, in two-dimensional space, a rotation axis is actually defined by a point. – Adrian Lozano 08:02, 4 December 2006 (UTC)
[-1,1,0] isn't a unit vector; it has norm \sqrt{2}.
In linear algebra, vectors are typically concieved as going from the origin to some other point in space. This leads to a common notational ambiguity; does a n-tuple represent the coordinates of a point in space, or a vector from the origin to the point? It could be either; the context helps if you really need to know. But often you don't, which only encourages the laziness. Endomorphic 02:43, 5 December 2006 (UTC)
My mistake, I don't know where my mind was – but an excellent example of laziness :-) – Adrian Lozano 23:37, 5 December 2006 (UTC)

[edit] Large edits planned

Is anyone actively editing this page at the moment? I would hack out the obfuscation in this article but for fears that someone else already has designs on it. Previous comments recommend an overhaul, and I concur. We have definitions from dictionaries a century old. We have vast notation and concepts sections which are at best redundant, at worst counterproductive. What should be the meat of the article doesn't arrive until three quarters of the way through. The article should *start* with 1.) q = cos(α/2) + u sin(α/2) and 2.) f_{q}(x) = q x q* and expand from there. Unless someone can provide a *really good* reason why so much history and handwaving needs to included in a practical article such as this, it's all going to get removed. Endomorphic 02:24, 5 December 2006 (UTC)

As a rank amateur researching quaternions, I would be delighted to see you perform the aforementioned surgery as soon as possible.
I've edited a technical magazine for six years and know irrelevancy when I see it. I followed this link sincerely hoping to see something such as, well... "1.) q = cos(α/2) + u sin(α/2) and 2.) f_{q}(x) = q x q* and expand from there". Over time, perhaps folks could even add in a few diagrams; the topic is, after all, rotations and spins.
The main issue is the obliviousness of the article to the link-intensive style of Wikipedia. That excellent style allows both amateurs (me) and experts (Endomorphic for example) to use the same articles with nearly equal ease. I follow nearly every link as a sort of guided study program. An expert looking at the same text skips over all the links and goes right to what they need. By replicating the contents of an old-style, stand-alone study book, this article instead creates an overly lengthy, out-of-context, and necessarily out-of-date tome that is equally frustrating for both amateurs and experts.
As a consolation for the sincerely directed efforts of the translator, perhaps some of the early materials could be used to create small, new, properly linked entries for topics not already covered. I seriously doubt the resulting small articles would even be referenced by the final version of this one, though.
Finally: Since fools go where angels fear to tread, and since I am, ah, very much in the former category, I hereby give fair warning that I will shortly undertake to do a major chop on this critter if Endomorphic or someone else does not do so fairly soon. I can't add anything, but as an editor I know what irrelevancy looks like, and I can be a terror with the editing knife when the circumstances merit it.
Terry Bollinger 18:34, 30 December 2006 (UTC)


Good grief, what are you waiting for? This bizarre article is in dire need of cleaning up. Nearly all of it is irrelevant, rambling, incoherent, confusing and frustrating. —The preceding unsigned comment was added by 134.174.9.30 (talk) 17:22, 17 January 2007 (UTC).
I couldn't state it better Jtico 22:50, 31 January 2007 (UTC)
Done. What this (severely) reduced version now needs are more specifics about applications, e.g., orbital mechanics. I don't have the details, but I know NASA has done a lot along those lines. I'll try to find someone to ask, or maybe a public domain report.
Incidentally, parts of the excised version tracked closely in content and order to Roger Penrose's section on visualizing quaternions in The Road to Reality. In particular, Penrose goes through much the same discussion of flipping a book around. Such visualization topics may have enough meat to merit a separate Wikipedia article (not here!). Frankly, though, I'd rather add in a reference at an appropriate spot to the chapter in Penrose's book, which does a pretty decent job of describing the visualization aspects of quaternions. (That said, all such attempts that I've seen, including Penrose's, are not for the visually faint of heart...)
Terry Bollinger 04:02, 1 February 2007 (UTC)
Excellent work. More is required; in particular, sometime I'd like to be motivated enough to detail:
  • The advantages over matrices mentioned in the intro
  • Distinction between quaternions representing points in 3D space and quaternions representing rotations.
  • The double-cover issue
The good news is it's more like pruning a hedge into the shape of a fish, rather than chainsawing a path through the Amazon. Endomorphic 21:30, 1 February 2007 (UTC)
Thanks, and all three of those possible additions sound very useful. Good use-the-main-ref trim of the basic operations section too -- brings the important material up to the start, where they should be.
Interestingly, the double cover section is one of the few early parts I thought about trying to preserve. It's and important and fascinating aspect of how quaternions relate to symmetry groups, and could be helpful for anyone coming here to gain insights on particle spin. A fresh start seemed better, though. Terry Bollinger 02:47, 2 February 2007 (UTC)

[edit] Discussion of non-commutativity insertion

Janek Kozicki: Your description of the book analogy in 3D space looks correct, and its an interesting point related to rotations of quaternions. However, you might want to think about where you have positioned it versus the kinds of readers most likely to link to this article. I suspect most such readers will not understanding how quaternions are used to represent rotations in the first place -- and until they can fully understand that, an immediate discussion of non-commutativity will not be what they expect, nor something they will easily be able to follow. They may understand the analogy fine, but not why it is being told to them.

I think a paragraph like the one your wrote might fit nicely somewhere within the overall group of quaternion articles, but I would suggesting thinking about location a bit more.

Terry Bollinger 05:40, 5 February 2007 (UTC)

Sure, you might be right. If you find a better place please feel free to move it there :) Maybe I'll find something too, I dunno. I was just writing an appendix about quaternions in my thesis, and I thought that this paragraph from my thesis might be interesting for the people. Janek Kozicki 20:12, 6 February 2007 (UTC)

It is interesting, readable, and relevant to quaternions, so placement is the question... I'll think on it a bit, and meanwhile, if you find a good spot, by all means feel free to take the initiative.

There may even be a potential for a new article of some sort, something about visualization in general of quaternions (Quaternion visualizations? Hmm. Not title that leaps to mind, is it?) The rotation focus of this Quaternions and spatial rotation can be done almost purely mathematically, making it less critical to have the visualization here...

Actually, one place I think material like this would be very relevant is in explaining the concept of non-commutativity in general to intro math folks. This concept is often presented so mysteriously that people can't see any connection to ordinary circumstances; your book example shows that there are quite ordinary operations on real objects that are non-commutative (or non-Abelian). The Commutativity article itself might be a plausible location, for example, with a proper intro...

I think the example of non-commutative rotations is good to have in the article, but I don't think the current explanation is clear enough. For someone who is good at thinking in spatial terms, it's easy to follow, but many people will not be, especially people who are new to quaternions. A diagram would really help here, maybe an animated GIF? Does anyone have the ability to make a good one? - Rainwarrior 20:09, 10 February 2007 (UTC)

I disagree with a lot of the intent in the above posts. Representing rotations with quaternions is a specific technical idea. I'm not saying that the article should be filled with jargon; merely that handwaving descriptions of rotating books won't be useful to someone who arrives at Wikipedia wanting to know how to rotate with quarternions. That being said, the book analogy is good, but perhaps it should go at "Non-commutativity" itself, which currently redirects to commutativity. Add a little For a technical discussion of non-commutativity, see Commutativity. line, and you have the perfect place to explain why Rubics Cube's are so difficult. Endomorphic 20:27, 11 February 2007 (UTC)