0
$\begingroup$

I want to understand the math behind OpenGL quaternion, rotation axis and rotation angle. There are a LOT of functions in programs that do this for you, however, they don't exactly explain the math. And that's no fun!

So to my example problem:

Vector

$$Apoint-x_1=109973,18\;y1=1156562\;z1=50,449$$
$$Bpoint - x_2=109924,1\; y2=1156621,9 \;z2=48,569$$

$$V= 49,082 \;−59,955 \;1,88$$

Magnitude vector $V$

$$||V||= 77,505994$$

Normalized vector $V$ $$U=0,6332671 \;−0,773553\; 0,0242562$$

How do I calculate the rotation angle and rotation axle between these two points and then use it to calculate the quaternion?

  • 1
    Can you explain what you mean by all the stuff you've written?2017-02-09
  • 0
    The math behind this is amply explained at [Wikipedia](https://en.m.wikipedia.org/wiki/Quaternions_and_spatial_rotation). Also, it is explained in excruciating detail dozens of places on the web, because everyone like yourself asks the same questions. Unfortunately, for some reason, people are terrible at looking for existing answers to their questions...2017-02-09

0 Answers 0