TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Less Weird Quaternions Using Geometric Algebra

90 pointsby Kristine1975almost 8 years ago

9 comments

arnioxuxalmost 8 years ago
For people trying to understand quaternions, the faster way to intuition is understanding axis-angle first. I think axis-angle is totally intuitive. First pick a direction (some 3d unit vector) and then rotate around that direction by some amount (so some scalar). Then convert those four numbers to quaternions<p><pre><code> qx = ax * sin(angle&#x2F;2) qy = ay * sin(angle&#x2F;2) qz = az * sin(angle&#x2F;2) qw = cos(angle&#x2F;2) </code></pre> where (ax, ay, az) is the unit direction (ax^2 + ay^ + az^2 = 1) and angle is the amount you want to rotate.<p><a href="http:&#x2F;&#x2F;www.euclideanspace.com&#x2F;maths&#x2F;geometry&#x2F;rotations&#x2F;conversions&#x2F;angleToQuaternion&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.euclideanspace.com&#x2F;maths&#x2F;geometry&#x2F;rotations&#x2F;conve...</a><p><a href="http:&#x2F;&#x2F;www.euclideanspace.com&#x2F;maths&#x2F;geometry&#x2F;rotations&#x2F;conversions&#x2F;quaternionToAngle&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.euclideanspace.com&#x2F;maths&#x2F;geometry&#x2F;rotations&#x2F;conve...</a>
klodolphalmost 8 years ago
A couple things to add.<p>For notation, we would often see the basis vectors named (e_1, e_2, e_3) instead of (x, y, z).<p>The quaternions are the even-ordered subalgebra of the 3D exterior algebra. The exterior algebra has scalars (1), vectors (x, y, z), bivectors (xy, yz, zx), and pseudoscalars (xyz). The even-ordered subalgebra is scalars and bivectors (1, xy, yz, zx). Adding or multiplying two even-ordered multivectors will always give you an even-ordered multivector, and 1 is even-ordered, so the even-ordered multivectors form a subalgebra.<p>We can also conceive of this subalgebra, the quaternions, as a Clifford algebra. Clifford algebras are generalizations of exterior algebras. Instead of saying v * v = 0, we can put something else on the RHS, and for quaternions we can start with just two basis vectors e_1 and e_2, and then define e_1 * e_1 = e_2 * e_2 = -1. The third basis vector for quaternions is then just e_1 * e_2.
评论 #14951085 未加载
Grustafalmost 8 years ago
Quaternions are beautiful and natural, not weird, but I&#x27;m always happy when they get some attention! This was a very interesting article, thanks. It does seem to confuse quaternions in general with (unit) quaternions as used for rotating vectors. For example:<p>&gt;So don’t think of quaternions as a 4 dimensional hypersphere of radius 1<p>This is also a bit weird:<p>&gt;But nobody would ever suggest that we should think of a rotation matrix as a 9 dimensional hyper-cube with rounded edges of radius 3.<p>Even weirder when they claim that the axis-angle interpretation of (unit) quaternions &quot;breaks down&quot;.<p>Anyway, back in high-school when I first became fascinated with quaternions I certainly didn&#x27;t expect to be working with them on a daily basis two decades later. The moral of this is that anything you learn can become crucial to your career...
Govindaealmost 8 years ago
While we all learned in middle school geometric algebra that the even subalgebra of G3 is isomorphic to the quaternions, what is the relationship between the even subalgebra of G4 and the octonions?<p>If you write out a multiplication table, it seems that it&#x27;s isomorphic. But... Octonions aren&#x27;t associtive. Does the even subalgebra of G4 somehow lose associativity? Is it equivalent to Octonions with a cannonical multiplication order?
marcv81almost 8 years ago
Quarternions aren&#x27;t weird. With a 2D angle we use 2 numbers (sin and cos) to calculate vector rotations. It turns out that in 3D we use 4 numbers.
评论 #14949319 未加载
评论 #14949454 未加载
amaialmost 8 years ago
This helped me a lot to understand quaternions using simple algebra: <a href="https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;147166&#x2F;does-my-definition-of-double-complex-noncommutative-numbers-make-any-sense" rel="nofollow">https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;147166&#x2F;does-my-defi...</a>
tnonealmost 8 years ago
This is great insight, but it seems a bit silly to act like you don&#x27;t need a 4D &#x2F; hypersphere representation when the 4th one is hiding in plain sight. For the not-quaternion to describe a rotation, it needs unit length in 4D, with the two components scaled as a sine&#x2F;cosine pair.
mwkaufmaalmost 8 years ago
Geometric algebra is &quot;easier&quot; to understand than plain-old imaginary numbers? Pourquoi?
catnaroekalmost 8 years ago
&gt; OK so what is this Geometric Algebra? It’s an alternative to linear algebra.<p>No. Geometric algebra is a use case of linear algebra. How can it be an alternative?<p>&gt; Before I tell you how to actually evaluate the wedge product, I first have to tell you the properties that it has:<p>&gt; 1. It’s anti-commutative: a \wedge b = -b \wedge a<p>&gt; 2. The wedge product of a vector with itself is 0: a \wedge a = 0<p>Redundant information. The latter follows from the former.
评论 #14949667 未加载
评论 #14950011 未加载