Skip to content

148. A code library for 3D rotation and flying

February 4, 2014

After a long time wrestling with basic flying, Andrew Stacey and I have come up with a library that helps you do 3D rotations and flying. The question is how to share and explain it.

For the moment, I’ve set up a code project that has the library (several tabs of code) plus a set of demos. It’s a “step by step” project where the demos start out simple and become more advanced, from left to right. There is a parameter that lets you choose which demo you want to see (push down the output area at left, to see it at the bottom of the other parameters).

NB If you get crazy results when flipping between demos, just restart, it should go back to your latest choice and work OK.

Code here

(Note it needs one image downloaded for the sky – see the Notes tab)

I think you’ll agree (if you have enough experience to try it) the code you need to write is pretty small and not scary. But whatever you do, don’t look in the Quaternion tab. There be dragons in there.

Advertisement
One Comment

Trackbacks & Pingbacks

  1. Index of posts | coolcodea

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: