livecodelab icon indicating copy to clipboard operation
livecodelab copied to clipboard

there should be a four-arguments "rotate" and rotateX rotateY rotateZ

Open davidedc opened this issue 13 years ago • 0 comments

the current rotate(xrotate, yrotate, zrotate)

is really "home made", it's not a conventional notation for rotations. It assumes that you always have to rotate around X first, then around Y second, and then around Z last. (the order of the rotations matters). This is quite arbitrary, there is no specific reason to force that order on the user.

So if instead of doing that one wanted to rotate around Z and then Y and then X, then she'd have to use three separate rotates with three arguments.

The "serious" way of doing this is

  1. to have separate rotateX, rotateY, rotateZ. Which is what Processing does
  2. have a four-arguments rotate which uses quaternions (which are related to euler axis notation, which takes 3 arguments to specify an axis of rotation, and the last parameter to specify the rotation around it).

For more info on notations of 3d rotations see: http://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions

davidedc avatar Jul 27 '12 13:07 davidedc