[x3d-public] Proposal: new field "factor" in Transform node

Yves Piguet yves.piguet at gmail.com
Wed Apr 20 16:19:16 PDT 2016


On 21 avr. 2016, at 00:26, Michalis Kamburelis wrote:

> 1. IMHO, it would be more consistent to specify scale treatment such
> that factor=0 means identity and factor=1 means "use the original
> Transform".

It's actually the case.

> E.g. set "scale = lerp(factor, 1, scale)". This makes
> "scale" interaction with "factor" similar to how "factor" affects
> "translation" and "rotation" in your proposal.

But then, extrapolating is less practical: you get a degenerated zero scale when factor is -1, and e.g. 2s-1 when factor is 2, which isn't very useful.

I've written the handling of scale as a special case, but actually plain multiplication of the translation and the rotation can also be seen as a kind of logarithmic modulation of the transform. In all cases, if factor is 2, it has the same effect as applying the transform twice; if factor is 0.5, applying it twice has the same effect as the original transform.

Mathematically, angles are closely related to logarithms. I was thinking about using logarithm and exponential of the homogeneous 4x4 transform matrix to have one simple equation, but (i) that's based on advanced linear algebra which has some learning curve; (ii) care should be exercised with complex numbers; (iii) rotation interpolation over more than pi would probably be impossible (I suspect it's worse than that). My proposal is much simpler, and seems effective.

Yves




More information about the x3d-public mailing list