Skip to content

Documentation of matrix and quaternion formats #29

@madsci77

Description

@madsci77

First, thank you so much for writing this! I've been looking for a lightweight 3D library without external dependencies for a very space-constrained project.

Are there any other notes on usage, or is the Docco output the place to go? I'm finding it hard to identify what I'm looking for there - partly because I'm new to CoffeScript.

For example, I needed the quaternion constructor parameter format. It seems to be (x, y, z, w), but I don't see how it actually gets there. I would offer to help write more documentation, but my grasp of the underlying math is too weak to be sure of getting it right.

My application is taking live motion sensor data, processed through a sensor fusion library on the remote device, and uses it to update the orientation of a displayed shape. At the moment I'm doing that by taking the quaternion values from the device and using toMatrix() and shape.transform() (after resetting the shape to its starting orientation each time) and it's partly working - but it has a lot of discontinuous jumps in rotation.

One thing that concerns me is that the remote device is configured to use the north-east-down coordinate system. I'm not sure what coordinate system seen is using, but I suspect that's not it. I think the quaternion output should still be smooth, though, just incorrectly rotated if they don't match - is that correct?

I also have an orientation matrix available from the device, but I don't see if there's a convenient way to create a corresponding object. It's also a less efficient format to be sending from the remote device. Is there any reason I wouldn't want to be using the quaternion output?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions