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

Michalis Kamburelis michalis.kambi at gmail.com
Wed Apr 20 15:26:50 PDT 2016


>
> - translation: the translation vector is multiplied by factor.
>
> For rotation and translation, this corresponds to a linear interpolation from identity transform if factor is between 0 and 1, and extrapolation if factor is outside this range. For the scale field, this is a logarithmic interpolation, so that 1 is left unchanged.

Nice idea! Comments:

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". 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.

  It is also nice in case a Transform specifies more than one
operation (e.g. translation *and* rotation, or translation *and*
rotation *and* scale). You want in this case "factor" to have the same
meaning, for all the operations. "factor=0" should set all
translation/rotation/scale to identity, factor=1 should leave them all
untouched.

2. It should be possible to use prototypes to create a
TransformWithFactor node, adding the "factor" field like you describe.
It would hide the Script or interpolators (combined with standard
Transform) inside the prototype. Such TransformWithFactor could then
be used in the rest of code, including in the definition of
"higher-level" prototypes.

  So you should be able to achieve this functionality without even
extending the X3D standard:)

Best regards,
Michalis



More information about the x3d-public mailing list