{
  "id": "quaternion",
  "title": "Quaternion Rotation Composer",
  "category": "Mathematics",
  "slug": "quaternion-rotation-composer",
  "subtitle": "Compose two noncommuting 3D rotations",
  "description": "The quaternion product combines rotations around orthogonal axes without gimbal lock.",
  "params": [
    {
      "id": "yaw",
      "label": "First Y-axis turn",
      "min": 0,
      "max": 170,
      "step": 5,
      "value": 65,
      "unit": "°"
    },
    {
      "id": "pitch",
      "label": "Second X-axis turn",
      "min": 0,
      "max": 170,
      "step": 5,
      "value": 50,
      "unit": "°"
    },
    {
      "id": "roll",
      "label": "Visual reference roll",
      "min": -90,
      "max": 90,
      "step": 5,
      "value": 0,
      "unit": "°"
    },
    {
      "id": "axis",
      "label": "Coordinate frame scale",
      "min": 0.8,
      "max": 2,
      "step": 0.1,
      "value": 1.2,
      "unit": "×"
    }
  ],
  "output": "Combined rotation magnitude",
  "outputUnit": "°",
  "formula": "θ = 2 acos[cos(yaw/2) cos(pitch/2)]",
  "notes": "Magnitude of product of two pure rotations about orthogonal axes (X and Y); the independent roll changes only the reference drawing.",
  "seed": "9492120520224524117",
  "batchSeed": "2674396715534941479",
  "difficulty": "GCSE–undergraduate",
  "language": "en-GB",
  "technology": "offline WebGL2 ES modules",
  "integration": {
    "urlPath": "/mathematics/quaternion-rotation-composer/",
    "entry": "index.html",
    "assets": [
      "assets/apparatus.glb"
    ],
    "seoDescription": "The quaternion product combines rotations around orthogonal axes without gimbal lock.",
    "keywords": [
      "Mathematics",
      "quaternion",
      "3D",
      "interactive",
      "virtual lab"
    ]
  },
  "challengeGenerator": {
    "total": 10,
    "numeric": 6,
    "multipleChoice": 4,
    "seed": "cryptographically random session + original 64-bit lab seed",
    "grading": "formula-derived answers, 2.5% relative tolerance with 0.015 absolute floor; -1 exact for unreachable routes",
    "hints": true,
    "explanations": true,
    "regenerate": true
  },
  "features": {
    "webgl2": true,
    "webgl2ShaderLighting": true,
    "procedural3D": true,
    "localGLB": true,
    "orbitZoom": true,
    "touchAndKeyboard": true,
    "drag3DProbe": true,
    "liveCalculatedReadout": true,
    "parameterResponseGraph": true,
    "pausePlaySpeedReset": true,
    "csvExport": true,
    "screenshot": true
  },
  "assetGeneration": {
    "source": "trimesh Python procedural modeling",
    "nativeThreeR160": false,
    "authoredInBlender": false,
    "assetFile": "assets/apparatus.glb",
    "format": "binary glTF 2.0"
  }
}
