[HN Gopher] Derivatives and Logarithms of 3D Transforms
___________________________________________________________________
Derivatives and Logarithms of 3D Transforms
Author : nosferalatu123
Score : 88 points
Date : 2025-03-21 00:06 UTC (2 days ago)
(HTM) web link (nosferalatu.com)
(TXT) w3m dump (nosferalatu.com)
| xeonmc wrote:
| essentially you decompose the transformation into (axial
| translation) + (screw rotation) + (oriented orthogonal stretch)
| and each of them are just straightforward interpolation: axial is
| linear, screw is angular, and stretch is exponential.
| nosferalatu123 wrote:
| (author here) Be careful because (ignoring scale for to keep
| things simple) a transformation T can be decomposed into a
| translation and rotation, such that T=Rotation * Translation,
| but that translation is not along the axis of rotation. You
| probably want to instead interpolate with a screw motion, which
| is a rotation about an axis along with a translation along that
| axis (a helical curve; a curve along the outside of a
| cylinder). The screw motion is what you get when you
| interpolate with exp(log(T)*t).
| xeonmc wrote:
| Yes, hence I wrote (axial translation)+(screw rotation)
| instead of just (translation)+(rotation).
| nosferalatu123 wrote:
| Yep!
| lenkite wrote:
| Just amazed that applets are still being used and are still
| working. Many folks here are younger than Java Applet technology.
| nextts wrote:
| An applet? I thought they didn't work? Or is this Java on WASM?
| billfruit wrote:
| Is that an applet? What type of libraries could have been used
| to build that type of interactive 3D graphics
| nosferalatu123 wrote:
| It's using the three.js library and a bit of javascript I
| wrote.
| moktonar wrote:
| What if you spherically interpolate the basis vectors and
| linearly interpolate the translation vector?
| MITSardine wrote:
| Cool article. Regarding section "The exponential map and
| logarithm map", if you're interested in computing the matrix
| exponential, there is the classic: C Moler, C Van Loan, "Nineteen
| dubious ways to compute the exponential of a matrix, twenty-five
| years later". Also, using the series expansion is not necessarily
| unrobust as long as you don't stop at a fixed number of
| iterations but instead go on as long as terms have a norm greater
| than some tolerance. Scaling and squaring can be used to remain
| always in a given range of norms (less than 1, say).
|
| Regarding Pitfall #3, the interpolation scheme exp(tlog(A) +
| (1-t)log(B)) is shortest path in a sense, just not with the usual
| matrix norms. See V Arsigny et al., "Log-Euclidean metrics for
| fast and simple calculus on diffusion tensors". I can't help but
| find it more elegant than exp(log(BA^{-1})t)A which could just as
| well have been exp(log(A^{-1}B)t)A, or even Aexp(log(A^{-1}B)t),
| right? It also fixes the "no more than two transforms", as you
| can put any convex combination in exp(sum_i x_i log(A_i)).
| ndriscoll wrote:
| In addition to the differential equation, you can also tweak the
| definition of the exponential function as a limit used with e.g.
| compound interest: exp(tA) = lim n->infinity
| (I+tA/n)^n = lim n->infinity (I+tA/n)...(I+tA/n) (n
| times)
|
| So you can interpret A (or log T) as a direction to move from the
| identity, and exp does infinite iterated compositions of an
| infinitesimal shift away from the identity in that direction.
| imtringued wrote:
| See also:
|
| Screw Theory: https://en.wikipedia.org/wiki/Screw_theory
___________________________________________________________________
(page generated 2025-03-23 23:01 UTC)