News for hackers. Stuff that matters.
Re:Derivatives and Logarithms of 3D Transforms by xeonmc on Saturday March 22, 2025 @10:14PM (#43450417)
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.
Re:Derivatives and Logarithms of 3D Transforms by nosferalatu123 on Sunday March 23, 2025 @01:03AM (#43451011)
(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).
Re:Derivatives and Logarithms of 3D Transforms by xeonmc on Sunday March 23, 2025 @01:05AM (#43451016)
Yes, hence I wrote (axial translation)+(screw rotation) instead of just (translation)+(rotation).
Re:Derivatives and Logarithms of 3D Transforms by nosferalatu123 on Sunday March 23, 2025 @01:12AM (#43451032)
Yep!
Re:Derivatives and Logarithms of 3D Transforms by lenkite on Sunday March 23, 2025 @04:22AM (#43451545)
Just amazed that applets are still being used and are still working. Many folks here are younger than Java Applet technology.
Re:Derivatives and Logarithms of 3D Transforms by nextts on Sunday March 23, 2025 @05:58AM (#43451922)
An applet? I thought they didn't work? Or is this Java on WASM?
Re:Derivatives and Logarithms of 3D Transforms by billfruit on Sunday March 23, 2025 @09:37AM (#43452853)
Is that an applet? What type of libraries could have been used to build that type of interactive 3D graphics
Re:Derivatives and Logarithms of 3D Transforms by nosferalatu123 on Sunday March 23, 2025 @11:06AM (#43453407)
It's using the three.js library and a bit of javascript I wrote.
Re:Derivatives and Logarithms of 3D Transforms by moktonar on Sunday March 23, 2025 @06:39AM (#43452083)
What if you spherically interpolate the basis vectors and linearly interpolate the translation vector?
Re:Derivatives and Logarithms of 3D Transforms by MITSardine on Sunday March 23, 2025 @09:28AM (#43452799)
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)).

Re:Derivatives and Logarithms of 3D Transforms by ndriscoll on Sunday March 23, 2025 @12:07PM (#43453831)
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.
Re:Derivatives and Logarithms of 3D Transforms by imtringued on Sunday March 23, 2025 @01:14PM (#43454263)