(no subject)
Feb. 3rd, 2004 01:01 amBack at work today. Still not perfectly well, but fit for work again. Spent tremendous amounts of time re-filling my head with work, and catching up with what's happened in the last week.
Friday night I went to the Wake for a bit, though didn't stay up the full night. (Jomsborg hold a Wake for the old year at the end of January, and then have a dawn ceremony on Castle Mound to wind up the sun again for the new one. It's been a few years now since I've been awake at the right time...)
Saturday we watched more B5, after which I had dinner at Becky's and then (after some organizational faff and struggling against the violent winds) went to the Carlton and met up with the refugees from the Winter Ale Festival, which was a nice end to the evening.
On Sunday, and also this evening, I had a further play with my orrery software. The original idea behind this was to simulate the orbit of (in particular) Cruithne, and I wrote it in Java intending to put the applet up on the public internet when finished. In the event I got bogged down when it came to inserting Cruithne into it with the right location and velocity.
Anyway I've since translated it into C++ (that being a slightly more natural target for a bunch of classes than plain C) and used OpenGL to display the results. (The Java version just projected everything onto a plane.) It knows about the sun, all the planets except Pluto, and the Moon; you can zoom in on the Earth and see the moon going around it; centre a planet rather than the Sun and you can see other planets describing epicycles.
It's now reporting over 60,000 iterations per second when the CPU isn't otherwise busy (over 90,000 on LNR's PC, though something on that machine - possibly the software OpenGL - appears to be buggy and makes the planets wobble!). With the simulation set to run 105 times as fast as reality, i.e. each simulated day lasting less than a real second, this gives a δt of a bit over half a simulated second. It only actually displays up to 20 frames per real second, which seems to be quite smooth enough.
(It calculates the initial positions and velocities of the planets from their orbital elements, but thereafter simulates the effects of gravity in Newtonian space. Why not Pluto? Because the formulae for working out where it will be at a given moment in time, for the initial position, are much more complex than those for the other planets, and I haven't typed them in yet; much the same reason, then, as Cruithne isn't there yet either.)
(Cruithne is an asteroid with a wacky orbit.)