How do you make a rotation so the axles don't spin with the object?



  • I'm studying the OpenGL. TAO fraemwork() On C#, and I have such a question:

    There's a cube allowed, and I want to rotate it always on the same coordinate system as the right thing to do? Type functions glRotate() or rotation by multiplying the matrices directly rotates the axis of the object(s) and, after rotation, say, in the Y axis, the X axis and Z for the object will no longer be the same.

    So how do we proceed with the rotation so that the axles don't spin with the object? Both direct answers and indirect are welcome: references to books or Tutorials where infus can be dignified, but such as to provide a response.



  • I advise you to read https://ru.wikipedia.org/wiki/%D0%9A%D0%B2%D0%B0%D1%82%D0%B5%D1%80%D0%BD%D0%B8%D0%BE%D0%BD%D1%8B_%D0%B8_%D0%B2%D1%80%D0%B0%D1%89%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%81%D1%82%D1%80%D0%B0%D0%BD%D1%81%D1%82%D0%B2%D0%B0 More specifically, how they are used on computer schedule and robotics.

    If very brief, it's an alternative normal Eulerian angle rotation.

    Like the matrices, they can accumulate rotations, so you can draw chains, without a risk of having an axle lock (gimbal lock) as in the case of Euler's angles. At the same time, unlike the matrices, they can be well interpolated from one position to another.

    This may seem very complex, but it is not necessary to understand the internal quaternium kitchen in order to use its properties.

    UPD: https://habrahabr.ru/post/255005/ Good article




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2