Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-363

please clarify quaternion conventions in org.apache.commons.math.geometry.Rotation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0
    • None
    • None
    • None
    • all

    Description

      Please clarify which quaternion convention is used in the Rotation documentation, and provide constructor methods to use alternate quaternion conventions.

      For example, the computer graphics community has standardized on representing a rotation of angle theta about the unit vector (i, j, k) with the quaternion

      { cos(theta/2), i * sin(theta/2), j * sin(theta/2), k * sin(theta/2) }

      e.g., any introductory computer graphics textbook referring to quaternions will describe them in this convention. This is also the convention appearing on Mathworld, Wikipedia, etc.

      The convention in org.apache.commons.math.geometry.Rotation instead appears to be

      { cos(-theta/2), i * sin(-theta/2), j * sin(-theta/2), k * sin(-theta/2) }

      Since I'm not likely to convince you to switch conventions, please at least document the convention and provide ways to convert from the alternate (this should be trivial?)

      Attachments

        Activity

          People

            Unassigned Unassigned
            ashuang Albert Huang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: