The odd bit

Once is an accident, twice is a coincidence, three times is an enemy action.

The odd bit - Once is an accident, twice is a coincidence, three times is an enemy action.

Star Trek TNG DVDs

I’ve been searching for the DVDs of all seasons of Star Trek The Next Generation for quite some time now, but without any success. I remember them being available in the shops, but I was still a student at the time and couldn’t afford them.

Now I have a job and I can afford them, but they seem to have vanished. So if anyone knows a place in Belgium where they still sell them, please let me know. Muchos gracias :)

Simulate a solar system

I’ve picked up OpenGL programming once again and this time I’m going to try to simulate our solar system. That sounds very simple, but it’s actually quite complex when you start researching for the necessary data. It’s supposed to be a simulation so wild guesses are a big no-no. The only trade-offs I’m willing to make are (1) all planets are perfect spheres and (2) all orbits are perfect circles. And in a later phase, I’d let to get rid of the latter limitation.
I decided to put all data I might need in a spreadsheet and then started recalculating all stuff to use units that I could use in the OpenGL environment, namely pixels and seconds. This again sounds very simple until you actually see the results.

The size of the spheres and the distance from the centre (the Sun) are scaled. This gives the Sun a radius of about 109 pixels, while Pluto ends up with a radius of about 0.18 pixel. You might say “make them all bigger” but that would have consequences for the distance from the Sun as well. The planet closest to the Sun, Mercury, would have an orbit with a radius of about 9000 pixels while the has a radius of 0.38 pixel. Starting to see the problem? Pluto, the outermost planet, has an orbit with a radius of 926000 pixels. Doubling the size of the spheres would double those distances too!

Just to fit the whole solar system in the application, I would need 1.9 million pixels on the Z-axis. The net result: you wouldn’t see anything on your screen.

The same problem surfaces when you recalculate the times. The event that takes the most time is a complete orbit (or revolution) of Pluto: nearly 248 earth years. You obviously can’t wait that long to see one lap of Pluto 😉 But that event was my starting point of the calculations. I started from the idea that one lap around the Sun should take 600 seconds (or 10 minutes) for Pluto. Here we go…

One earth year would then take a whopping 2.42 seconds, which still sounds quite reasonable to me. The Earth would complete one lap around the Sun in nearly 2 and a half second. One earth day would take 0.0066s. In other words, one rotation around its axis would take the Earth 6.6 milliseconds. You might see a bit of flickering if it’s textured, but otherwise it would go unnoticed. Our lovely Mercury, which is the fastest planet when it comes to orbital speed, would revolve around the Sun in 0.58s. Still too fast…

One problem is size vs distance and the other problem is revolution vs rotation. If anyone knows of a good solution without decoupling the relationship (size-distance is of course decoupled from rev.-rot.) within one problem, please let me know :-)

Football Manager 2006 v6.0.x Patch

Sports Interactive have released a new patch for their popular football management game Football Manager. Edition 2006 is brought up to version 6.0.2 with this patch. For the impressive list of fixes and a list of download mirrors, please consult the download page.

Update 2006-08-02: I’ve been going through some links in my older blog posts and it seems the download link above links to the latest patch which at this time is v6.0.3. If you’re looking for Football Manager patch v6.0.2, you’re better off installing patch v6.0.3 because it contains even more fixes (and updated transfers from January 2006 if you wish).

Regexp datatype

I’ve resumed the work on regexpline, one of my personal extensions for eZ publish. The datatype is exactly like the standard “Text line” that comes with the software, except that it validates the input against a regular expression. This makes it possible to limit the input to a certain formatting (even requiring a valid IP address is possible).

Today I’ve added support for presets of regular expressions. You can define named regular expressions in an ini file and then pick one of them during class edit. I’ve also fixed the object-level input validation. Validation started whining when it wasn’t necessary (required & info collector would whine during object edit instead of during info collection).

I’ve also bumped the required eZ publish version up to 3.6.0. That allowed me to use some newer template constructs.