An elliptic rotation matrix?

In C ++, we can rotate a point around an arbitrary axis:

  void radRotateAxis (float a, float b, float c, float theta)
  {
    float newX = (
      x * (a * a * (1-cos (theta)) + cos (theta)) +
      y * (a * b * (1-cos (theta)) - c * sin (theta)) +
      z * (a * c * (1-cos (theta)) + b * sin (theta)));

    float newY = (
      x * (a * b * (1-cos (theta)) + c * sin (theta)) +
      y * (b * b * (1-cos (theta)) + cos (theta)) +
      z * (b * c * (1-cos (theta)) - a * sin (theta)));

    float newZ = (
      x * (a * c * (1-cos (theta)) - b * sin (theta)) +
      y * (b * c * (1-cos (theta)) + a * sin (theta)) +
      z * (c * c * (1-cos (theta)) + cos (theta)));

    x = newX;
    y = newY;
    z = newZ;
  }

But when we go theta 0 → 2PI it takes a point around the “unit circle” around the axis around which you rotate

, theta 0 → 2PI - a, height b?

- , , "" , - !

+3
1

A, .

, .

+6

Source: https://habr.com/ru/post/1711912/


All Articles