We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi everybody,
i have a 3d object and i want to animate it. the animation should consist of a sequence of rotations. first the object has orientation o1. then it smoothly (interpolation) changes its orientation to o2 and so on.
what's the best way to do that in that processing? thanks.
Answers
Hey,
lerp() is a function that can help you to interpolate between two values.
I don' know what you have so far but it could look similiar to this:
rotateY( lerp( o1, o2, amount) );
Where 'amount' could depend on frameCount, millis(), mouseX or whatever you want.
Thanks, but that is not solving my Problem.
As far as my research goes i have to use quaternions. But i do not know how. Which implementation should i use? How do i use quaternions with the rotate-functions processing offers? How do i interpolate between several quaternions to have a smooth animation between several orientations?
Tried it myself with proscene library but i am running into problems:
http://forum.processing.org/two/discussion/12925/quaternion-slerp-3d-animaton-is-jumping-in-proscene-library#latest