Bad, vile and meaningless: The logic of bicubic spline pattern from Alan's clob

I have been working on trying to build a Virus sort of game, the classic by David Braben.

Implementation language is Python, and I've been putting the pieces together, from various public sources: shadow mapping, bump mapping, noise texture generation using OpenGL hardware. Today I'll mention something about the noise textures.

The noise texture is a function composed of superimposing images of bicubic spline. The bicubic spline here is given by:

f(u, v) = g(2u) * g(2v)
g(x) = 3x - 2x

The function is good only for 0 <= x <= 1, and you need a symmetric piece so in practice you'll mirror the first quadrant into the 3 others.

A piece of noise is constructed by superimposing 4 pictures of this noise by placing the first center at (0, 0), second at (0.5, 0), third at (0.5, 0.5) and fourth at (0, 0.5). Together they sum up into a white square, but here's the trick: you modulate each one of them independently to achieve smooth variations. One method of variation is to scale a GL_NEAREST-interpolated texture and use it together with GL_BLEND. Or you could just make use of the multiple texturer units straight away.

To make detailed noise, you're going to superimpose several groups of modulated bicubic splines with coefficients that halve each time. So the lowest octave of noise gives you 0.5 of the total picture, the next octave has 2 * 2 = 4 bicubic patterns and contributes 0.25, the next has 4 * 4 = 16 bicubic patterns and contributes 0.125, and so on, until you judge the noise detailed enough.

I shall use the hardware-generated noise texture as the map of the game.