Thursday, April 30, 2009

Math - Random numbers and splines

I came across my old favourite website on random number generation today whilst browsing so that inspired this post.

Random numbers are a key component to so many things, from generating interesting textures, to selecting chromosome pairs for a genetic algorithm optimization problem. I've found the choice of random number generator can have a massive impact on some GAs.

Here is a list of Linear congruential generator (LCG) random number generators with spectral analysis, discussions and properties. It's a fantastic resource.

iq of rgba has a great article on small and fast random number generators for floating point numbers.

Splines are another great mathematical tool for any programmers bag of tricks. They are used in animating characters to robot control systems. The GDC 2009 maths tutorial has a great introduction to splines. Cubic provide a good introduction with pseudo-code for Hermite (the best) splines.

A really interesting find today was Time constant splines. I'm a bit skeptical about it on how it works (re-interpolating and re-fitting splines to get 'smooth' interpolation steps) but the author claims good results, and I'm sure it would be good enough for camera paths etc.

No comments: