-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Definition of RotateTransform in the draft 3D API #2285
Comments
I don't think I'm a huge fan of option 2. My preference here would be for us to avoid inferred properties, especially where it's difficult for an end user to immediately calculate the inferred value. I think for option 2, with the angle of rotation being the magnitude of the vector, that vector magnitude is an inferred value that will be pretty hard for end users to easily gauge. I could see two possible ways to solve this:
|
This was discussed during the TSG meeting on April 3rd. There was some general support for going for an initial "readable"/"simple" solution of RotateTransform specifying an Euler transform with a rotation ordering of XYZ (this ordering is the Three.js default) until we reach practical examples where this is insufficient. In contrast to this, there was also a point that if we are going for "simplest," the simplest solution is quaternions, and that quaternions are both extremely simple and also largely unreadable for most users. |
A specific choice for the RotateTransform specification was implemented in the manifesto-3d code https://github.com/IIIF-Commons/manifesto-3d at commit 5e64e05; merged into master branch Aug 14 2024. The xyz components of an IIIF RotateTransform instance are interpreted as Euler angle rotations in XYZ order, using fixed XYZ axes for each step. This is the ThreeJS standard. Threejs-math utilitiies allow conversion to quaternion and axis-angle representations of a rotation. |
I am suggesting clarifying the description of the RotateTransform. From what is in the existing document ( document temp-draft-4.md in the eds branch) it is unclear what is the geometric action of a RotateTransform that has
non-zero values for several components, for example:
{
"type": "RotateTransform",
"x": 69.28,
"y": 69.28,
"z": 69.28
}
There would be two plausible ways to interpret this
As an Euler angle description; that is the geometric interpretation might be "rotate about the z axis by 69.3 degrees, then about the (rotated) y axis by 69.3 degree, then again by the (doubly rotated) z axis by 69.3 " . This definition would need to be filled out by specifying which axes are rotated, in what order, and whether the rotation axis are world fixed or body fixed. This is the world of Euler and Tait-Bryan angles.
The geometric interpretation would be : "do a single rotation, counterclockwise, about the axis whose direction is that of the vector with those x,y,z coordinates and whose angle of rotation in degrees is the length of the vector" In the example above, the direction of the vector is the direction from corner to opposite corner of a cube with one corner at the origin; the length of the vector is (close to) 120.0 degrees. This rotation would rotate the x axis onto the y axis,the y axis onto the z axis, and the z axis onto the x axis.
I recommend that the 2nd choice, be chosen for the IIIF Presentation API in 3 dimensions.
The text was updated successfully, but these errors were encountered: