Quaternions and Euler Rotations Exploration



I did an exploration of rotations with quaternions and Euler angles and sharing the “bare bones” code I wrote.

The original project (a year ago) got out of hand and I really need to clean up the code and references and this was a start.

This code was written to test formulas from:

This program:

  1. Generates Euler angles with keyboard control
  2. Euler angles are converted to quaternions
  3. quaternions are converted back to Euler angles
  4. Euler angles are used to rotate a shape

Later I replaced 1 and 2 with serial data (quaternions) from a BNO055 sensor; there was a lot more involved in doing this. :slight_smile:



Example video of final project (the one I posted is only keyboard and “minimal”):



Request for guidance:- Making 3D objects appear static on a webcam feed using arduino & an IMU: