A Spinning Solar System: 3D Graphics in IronPython and Resolver One

Back in early 2008 I posted a short entry on using IronPython with OpenGL and the Tao Framework for 3D graphics.

Tao is a set of bindings to OpenGL and SDL for cross-platform "media application development" with .NET and Mono.

My boss at Resolver Systems, Giles Thomas, has been having fun using Tao inside Resolver One. Resolver One is a "Windows-based spreadsheet that integrates IronPython deeply into its recalculation loop, making the models you build more reliable and more maintainable". Because it is so easy to program with IronPython, my Giles decided it would be a good platform for experimenting with 3D graphics - including a full animated version of the solar system with the paths controlled from the spreadsheet. Both entries have a video of the results and IronPython code to download.
I’ve been playing around with 3D graphics recently, and decided to find out what could be done using .NET from inside Resolver One. (If you haven’t hear of Resolver One, it’s a spreadsheet made by the company I work for — think of it as Excel on steroids :-)

Once you’ve loaded up the spreadsheet, a window will appear showing the spinning cube with the Resolver Systems logo that appears in the video. In the spreadsheet itself, the worksheet “Path” contains the list of 2,000 points that the cube follows while it spins; as in the video, these are initially all (0, 0, 0), so the cube just sits in the centre of the window spinning.
The entry has a video of the result, a walkthrough of the code, and shows how to control the path of the spinning cube using column-level formulae. Part two takes the concept further:
In my last post about animated 3D graphics in Resolver One (the souped-up spreadsheet the company I work for makes), I showed a bouncing, spinning cube controlled by the numbers in a worksheet. Here’s something more sophisticated: a 3D model of the planets in our solar system, also know as an orrery.

A window showing the 3D animation of the solar system will appear while the file loads. To manipulate it, drag the mouse left/right to spin the solar system around the Y axis, or up/down to spin around the X axis (left to right in the initial state). Zoom in and out using the mouse wheel or +/-.

Here’s how it works in more detail; I’ll start with the spreadsheet and then go on to the OpenGL/Tao/IronPython support code that lives in OpenGLPlanets.py later.
 This isn't the only "innovative" (read crazy) use of Resolver One I've seen recently. Here's another that uses the spreadsheet as a Twitter client:
I have developed a little Resolver One spreadsheet that can update your tweeter account, get your friend’s list or get the list of those who are following you.

Comments

Popular posts from this blog

Extending Abobe Flash Player and AIR with Python and Ruby

Further Adventures of the Debugger

IronPython Tools for Visual Studio CTP3