quaternions.htm
Home Site home Platforming Auto-sprites Vectors Path Finding quaternions.htm Variable Scope Water Panic Super Bouncy Ball Balls of Doom Contents k8055 GM Downloads

 

Care and Feeding
Library Docs
Rotation demo

Quaternion Resources

Important note: Much of this material was arrived at by trial and error, rather than recourse to mathematical theory. I'm not saying anything is actually original, just that one or two aspects may turn out to be "flipped" compared to a more "textbook" implementation.

Also the calculation functions could probably be better implemented using data structures to represent quaternions, but I never really bothered to learn Gamemaker data structures.

The Care and Feeding of Quaternions (in progress)

I attempt to explain my reasoning for using this technique as opposed to other more well known techniques

A Quaternion Library

My attempt at a library for performing Quaternion math assuming the values will be passed as numbers or variables (File download)

A rotation demo

An attempt to illustrate the way an object rotates cumulatively in 3D space. Note that the GM Studio version may not even display the object until it has moved slightly due to undocumented behaviour of a GMS 3D command