Thread: 3D Graphics with quaternion data

  1. #1
    Registered User
    Join Date
    Jun 2014
    Posts
    6

    3D Graphics with quaternion data

    Hi All,

    So I've got a sensor (contains a gyroscope, accelerometer, and magnetometer) that outputs quaternion data. I'm looking to take that data and use it to display the rotation of my sensor in the form of some object on the screen. I've seen instances where programs use a cube, but I'm hoping to figure out a way to have a little more control over what the object I'm rendering is.

    Does anyone have any advice as to how to get started? Are there any software packages that might be able to accomplish this?

    Thanks,
    Matt

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,608
    If you plug the quaternion into a matrix library that supports them (OpenGL and Direct3D both have these) then the rest is just plug and chug transformation. A transform is SRT or scale * rotation * translation. The rotation portion here is what your quaternion will yield in matrix form.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Visualizing 3D rotation using quaternion data
    By mrm63 in forum C++ Programming
    Replies: 2
    Last Post: 06-11-2014, 02:13 PM
  2. Replies: 3
    Last Post: 11-14-2011, 07:04 PM
  3. Quaternion fun... Is there a more efficient way to do this?
    By wallsocket in forum Game Programming
    Replies: 2
    Last Post: 10-12-2011, 04:20 PM
  4. Quaternion Rotation
    By psychopath in forum Game Programming
    Replies: 16
    Last Post: 07-23-2006, 03:28 PM
  5. Quaternion question
    By Mr Q in forum Game Programming
    Replies: 15
    Last Post: 04-21-2004, 09:34 AM