Lo-fi swirly graphics page

These are some graphics hacks I've written, which you can download and watch if you have a C compiler and the required libraries etc.

There are Makefiles for Linux included, which you can probably hack to work under Windows, Mac OS X or whatever pretty easily. Some of these programs might run like s**t if you have a slow computer, but they all go OK on mine (1.4GHz Athlon).

Enjoy :o)

Dual-paraboloid environment mapping demo

Download parabolik.tar.bz2 - 9 Dec 2004

I couldn't find a cheesy demo of dual-paraboloid environment mapping with source code available, so I hacked one together. The code can either use multitexturing, or multiple passes with "alpha test" for the texture on each pass - change the #define at the top of parabolik.c to choose whatever works for your hardware.

My old Voodoo3 hardware doesn't seem to work with the GL_DECAL texture environment, but works OK (if a bit glitchily) with #define MODULATE_HACK turned on (see parabolik.c again). This might be a bit faster than the multiple pass approach.

If you ever using this environment mapping technique, beware that according to, eg, here, if you use multitexturing you should use GL_REPLACE for the first unit and GL_BLEND for the second - this might or might not be true, but I could certainly only get it working with GL_REPLACE and GL_DECAL.

See also this Dual Paraboloid Maps HOWTO, which highlights a possible problem with texture coordinate systems in the original dual-paraboloid mapping paper (it helped me fix my code!).

Needs OpenGL, GLU & glut.

BBC Micro MODE 7 spinning 3D cube - in C

Download SSD disc image - source - 11 Sep 2004

This is just far too much geekery in one go. Many thanks to the authors of cc65, the hacking of which to work on the BBC was part of "the point". The other part of the point was me idly wondering if I could do smooth (well, kind of) 3D graphics in MODE 7 on a BBC... not sure if that was successful or not. OK, I admit it, it's pointless.

Happy swimmy duck

A duck

Download duck.tar.gz - 1 Mar 2004

A swimming duck, made with OpenGL and GLUT. It uses the 2nd-order Runge-Kutta method (and rather dubious physics) for simulating the water. All of the water geometry is rendered as plain triangles, so you need a fast graphics card as well as a fast CPU to run this well (ie, there are a lot of them). Warning: hypnotic.


fire picture

Download fire.tar.gz

Needs SDL. Algorithm shamelessly nicked from Hugo Elias's page (warp feedback/blur/Perlin noise).


swirly picture

Download swirly.tar.gz

Needs SDL. Not a great program, I think I was playing with the "blob" algorithm for some vaguely work-related reason.


flower picture

Download flower.tar.gz

Needs SDL & OpenGL. No, it's absolutely nothing to do with flowers. There's some historical reason it was called that, but it turned out different. It does have pretty ribbon things which don't look much like petals though.


blob picture

Download blob.tar.gz

Needs SDL. This was originally a sort-of prototype for the Valentine demo below, but diverged a bit. OK, a lot. It's not spectacular, but quite hypnotic to watch (if you're bored).


distort picture

Download distort.tar.gz

Needs OpenGL & glut. I like this one. It's quite hypnotic to watch too, the sphere thing sort of flows like really heavy rain down a window or something, in 3D.

Valentine demo

valentine demo picture

Download valentine-demo.tar.gz

Needs SDL. The screenshot doesn't do it justice, you have to watch it. The idea is due to Joey. James has made it into an MPEG movie too, but it's huge (about 200Mb for about 50 seconds? WTF?).


How about a little game?

Contact Julian about the swirly graphics