TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rediscovering Quaternions

125 点作者 jfantl3 个月前

9 条评论

nighthawk4543 个月前
The easiest way for me to conceptualize it is to think of it as orientation + rotation. 3 dims for the orientation vector to get the object facing&#x2F;pointing the right way, then a further 1 dim&#x2F;var for rotation about that axis. For a total of 4 variables&#x2F;dimensions<p>3blue1brown and Ben Eater did a series of interactive videos on the subject that can be explored:<p><a href="https:&#x2F;&#x2F;eater.net&#x2F;quaternions" rel="nofollow">https:&#x2F;&#x2F;eater.net&#x2F;quaternions</a><p>My favorite demo on this point is this one: <a href="https:&#x2F;&#x2F;eater.net&#x2F;quaternions&#x2F;video&#x2F;rotation" rel="nofollow">https:&#x2F;&#x2F;eater.net&#x2F;quaternions&#x2F;video&#x2F;rotation</a><p>Where they have a toggle to go between `a + bi + cj + dk` quaternion notation and an equivalent formulation in terms of 3d orientation vector plus rotation angle as `cos(θ) + sin(θ)*(ai + bj + ck)`
评论 #43192022 未加载
评论 #43191301 未加载
评论 #43191358 未加载
matmann20013 个月前
Not detracting from this post, but has anyone else noticed there&#x27;s a front page post about Quaternions or Kalman filters on about a monthly cadence? Wonder why that is?
评论 #43187974 未加载
评论 #43186733 未加载
评论 #43187319 未加载
评论 #43189299 未加载
评论 #43188047 未加载
评论 #43187620 未加载
评论 #43188198 未加载
评论 #43187383 未加载
评论 #43190838 未加载
评论 #43189178 未加载
评论 #43196427 未加载
评论 #43189817 未加载
评论 #43187813 未加载
评论 #43188389 未加载
评论 #43187945 未加载
aithrowawaycomm3 个月前
&gt; These discontinuities are not just an artifact of poor implementation; it can be proven that any representation of 3D rotations using only three values must contain discontinuities.<p>This is a bit pedantic - and the blog post actually does clarify this - but the problem isn&#x27;t that a 3D representation of representations has &quot;discontinuities&quot; as such, it&#x27;s that it&#x27;s not orientable in Euclidean 3D space. It is similar to the Klein bottle - the mathematical description is continuous, but any Klein bottle made of real-world glass has to intersect itself. Or likewise that a Mobius strip can be demonstrated in 3D but can&#x27;t be built in Flatland without a 3D entity doing the copy-pasting. Reality just has the wrong topology to represent the full group of rotations. Hence the discussion about projective space later in the blog post.<p>So adding a fourth gimbal is really tantamount to a correctly-oriented embedding of 3D rotations onto a 4-torus (that is, [0,2pi]^4).<p>Gimbal lock also relates to another issue of continuity, related to the &quot;plate dance.&quot;[1] Rotations themselves have a sense of continuity (infinitesimal differences in either the angle or axis of rotation, aka they are Lie groups), but Euler angles fail to respect the equivalent fundamental theorem of calculus: adding a bunch of infinitesimal changes might say you are at the identity rotation according to Euler angles, but in reality you have flipped the meaning of the right-hand rule and the overall state of the system is not at the identity. In a robotics context, the robot&#x27;s hand might have done a complete rotation, but its arm is twisted without the robot &quot;knowing.&quot; I believe robotic arms used to have a serious problem with this, either overrotating and breaking the arm, or swinging dangerously fast in the opposite direction. Using quaternions &#x2F; a fourth gimbal &#x2F; etc. there would be a measurable phase or pole indicating the true state of the system, and letting the robot know how to rotate its arm without malfunctioning. So, like the Apollo mission, the need for a fourth dimension to keep track of that stuff - and even the quaternion multiplication structure - comes about pretty naturally without ever thinking about abstract math.<p>[1] <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Plate_trick" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Plate_trick</a>
评论 #43191505 未加载
LegionMammal9783 个月前
While they might be theoretically pleasing, I&#x27;ve had trouble seeing the appeal of quaternions for 3D graphics. Recently I was working on some 3D-rendering code from scratch for a project, and I looked into using quaternions for rotation, only to scratch my head at how fiddly they were to apply to vectors. (Also, many resources talking about them focus on their abstract properties at the expense of actual examples, which is annoying when I&#x27;m just trying to implement them.)<p>I had a much simpler time just using rotation matrices for everything. They&#x27;re not much more difficult to compose, they&#x27;re trivial to apply to vectors, and they can be easily understood in terms of their row and column vectors. (For my project in particular, I really enjoyed the property of easily knowing which octants the basis vectors are mapped to.)<p>Where are the practical areas where quaternions shine? Are they just useful for the slerp operations that everyone points at, or are there other situations where they&#x27;re better than rotation matrices?
评论 #43190914 未加载
评论 #43190804 未加载
评论 #43190926 未加载
评论 #43191367 未加载
评论 #43190774 未加载
评论 #43192779 未加载
r1chardnl3 个月前
If I had to describe Quaternions to someone I would first try to explain a Plane (Ax + By + Cz + D = 0) to them. ABC being a (normal) direction that the Plane is pointed towards and D being the distance from the origin.<p>A Quaternion from what I believe is just the same but instead of distance it just encodes the rotation around that direction as a fixed axis. (Instead the angle stored is half etc).<p>Feel free to correct me if I&#x27;m wrong, I&#x27;m not a math-heavy person.
评论 #43187472 未加载
评论 #43189182 未加载
Ygg23 个月前
Whenever I see a quaternion post, I wonder why the rotors aren&#x27;t the default[1].<p>They are mathematically equivalent, easier to explain, can generalize to higher dimensions, and aren&#x27;t mocked in the Alice in the Wonderland[2] (famous tea part scene).<p>[1]<a href="https:&#x2F;&#x2F;archive.is&#x2F;20240820193111&#x2F;" rel="nofollow">https:&#x2F;&#x2F;archive.is&#x2F;20240820193111&#x2F;</a> (mirror of <a href="https:&#x2F;&#x2F;marctenbosch.com&#x2F;quaternions&#x2F;" rel="nofollow">https:&#x2F;&#x2F;marctenbosch.com&#x2F;quaternions&#x2F;</a> )<p>[2]<a href="https:&#x2F;&#x2F;gaupdate.wordpress.com&#x2F;2011&#x2F;07&#x2F;26&#x2F;quaternions-part-of-the-hidden-math-behind-alice-in-wonderland&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gaupdate.wordpress.com&#x2F;2011&#x2F;07&#x2F;26&#x2F;quaternions-part-o...</a>
agnishom3 个月前
I also recently came across &quot;Geometric Algebra&quot;, which seems like an idea of equipping a vector space with a formal anticommutative product. There seems to be a subset of people on the internet who swear by it.
评论 #43189828 未加载
pvg3 个月前
Related a few weeks ago <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42880242">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42880242</a>
cantalopes3 个月前
I was hoping thered be more of actual quaternions