IIIF / api

Source for API and model specifications documents (api and model)
http://iiif.io/api
107 stars 54 forks source link

Radians or degrees on rotation transformation? #2266

Open tomcrane opened 11 months ago

tomcrane commented 11 months ago

Degrees:

{
    "type": "RotationTransform",
    "x": "90",
    "y": "180",
    "z": "270"
}

Radians:

{
    "type": "RotationTransform",
    "x": "1.5708",
    "y": "3.14159",
    "z": "4.71239"
}

gltf and many other systems use radians for rotation. But are degrees easier to translate to real world scenarios for human constructors of manifests?

tomcrane commented 11 months ago

Personal opinion - degrees are more human friendly; radians are used in more technical environments to make subsequent operations easier, but subsequent operations are not the concern of the manifest, and it's trivial to turn degrees into radians.

tomcrane commented 11 months ago

Also... in a programing environment we always have access to something like Math.Pi and we can do

{
    "type": "RotationTransform",
    "x": Math.Pi / 2,
    "y": Math.Pi,
    "z": Math.Pi * 1.5
}

...but a Manifest is a JSON doc and can only have the floating point literals.

JulieWinchester commented 11 months ago

I'll add a second personal opinion to echo @tomcrane that degrees are more human friendly, trivial for computers to convert to radians, and will help ensure that the JSON manifest is a bit easier for humans to read, understand, and modify.

azaroth42 commented 8 months ago

+1 to degrees