Tie Fighters and Terrain

While I’m still waiting for my FOSS4GNA video from last week to be posted so I can send it out, I thought you guys might like a new demo I showed off during the talk:


In addition to being fun (who doesn’t like Tie Fighters), this demo hits on some very common questions on the mailing list:

  1. How do I animate Entity position and/or orientation?

  2. How do I orient a mode along the direction it’s traveling?

  3. How do I set the clock?

  4. How do the the different interpolation options affect things?

The buttons along the upper left of the screen should hopefully be self-explanatory, but when my slides/video are up, it will also walk you through it. I also plan on cleaning up the code and making it a Sandcastle example for a future release (probably swapping out the tie fighter for the Cesium plane model). Finally, I want to turn the orientation code I wrote into a simple to use property something like:

entity.orientation = new OrientationDirectionOfTravelProperty(entity.position);

Let me know what you think or if you have any questions.



So all Cesium needs now is a Death Star terrain plugin!

The math behind the interpolations seems quite involved

With the Hermite method it seems that the joints aren’t smoothly joined; you can see the tie fighter ‘snap turn’ slightly to a different direction at the joints. Though they are smoothly joined using the Lagrange method. I’m not sure if this is due to the interpolation design or implementation. I’m impressed that Cesium can not only calculate these for any set of arbitrary points, but also draw them smoothly and calculate the tangent at any location along the curve.

Can Cesium also do a constant acceleration type of interpolation by chance? Basically take the velocity vector at a joint and figure an acceleration vector that will cause an object to travel to the next point. This would require an initial velocity vector to start the path. I’m fairly sure that there’s only one constant acceleration vector that would take the object to the next point

Excellent presentation by the way!

+1 for Death Star Terrain Plugin. +5 if there is the added particle effect bonus of a death star explosion.