<div dir="auto">Sure. “New” position interpolator for the front of the ship and “previous” position interpolator for the rear of the ship. So two position interpolators for the orientation of the ship (without computing orientation). Like interpolating orientation and position of a line segment (the ship). That is, animating two positions, the front and rear of the ship.</div><div dir="auto"><br></div><div dir="auto">Maybe I don’t get it. I’ve not analyzed it much.</div><div dir="auto"><br></div><div dir="auto">I’m also thinking I want to compute orientations for HAnimJoints when all I have is joint centers over time, so your idea has wider application.</div><div dir="auto"><br></div><div dir="auto">Jou</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 26, 2024 at 8:57 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Thanks for the input. To clarify, I was thinking of aligning the<br>
orientation of a rigid object (such as a ship) with its changing<br>
direction of travel.<br>
<br>
Regards, -Andreas<br>
<br>
On Mon, Aug 26, 2024 at 4:08 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
><br>
> Andreas, I read through this, and I suggest a LineSegmentInterpolator that animates a line segment. One can also interpolate between curves, surfaces and Text strings/fonts through interpolation (morphing or displacement).<br>
><br>
> In general, perhaps these are called transitions.<br>
><br>
> Perhaps one could use two interpolators, one for the previous positions and one for the new positions. I don’t know how two interpolators can adjust the same object though.<br>
><br>
> On Mon, Aug 26, 2024 at 2:19 PM Andreas Plesch via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>> wrote:<br>
>><br>
>> An idea for enhancement:<br>
>><br>
>> I had a need for a PositionInterpolator to animate an object (say a<br>
>> ship). While moving the object around it should align its orientation<br>
>> with the direction of travel (bow pointing forward) which is often the<br>
>> case. Rather than precomputing key values for an<br>
>> OrientationInterpolator to go along with the interpolated positions, I<br>
>> decided to derive the orientations from the change in positions<br>
>> dynamically. Perhaps not surprisingly, this required a script. Is<br>
>> there an existing alternative ? Perhaps via physics ?<br>
>><br>
>> The script takes a new position, calculates the direction of travel as<br>
>> the difference between the new position, and the last position (which<br>
>> it remembers), and uses a default SAI function to compute the rotation<br>
>> from the default (0,0,-1) orientation to the new direction. This<br>
>> sounds pretty straightforward but becomes more complicated for a<br>
>> GeoPositionInterpolator.<br>
>><br>
>> Since aligning orientation with direction of travel is a frequent use<br>
>> case - including for animated Viewpoints - , the enhancement would be<br>
>> for nodes such as position interpolators, chasers and dampers, etc. to<br>
>> provide this orientation directly, perhaps as an additional<br>
>> orientation_changed event.<br>
>><br>
>> An alternative may be use of a TransformSensor which could<br>
>> additionally provide this information, say as a direction_changed<br>
>> event.<br>
>><br>
>> This may be outside the scope of standard X3D since it may be seen as<br>
>> a use case for a Script node but is so generally useful that it may<br>
>> warrant enhancement of existing nodes.<br>
>><br>
>> Thanks for reading and any thoughts or criticism,<br>
>><br>
>> Andreas<br>
>><br>
>> --<br>
>> Andreas Plesch<br>
>> Waltham, MA 02453<br>
>><br>
>> _______________________________________________<br>
>> x3d-public mailing list<br>
>> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
>> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
</blockquote></div></div>