And now here is a running example. This shows how to generate a CAPTCHA setting about 4 parameters.
More parameters can be added to this example, like dots size, polygons transparency, font size but all that are features.
Enjoy!
PS: Sources are bellow.
captcha