There's a simple tutorial for modelling with distance fields on the same site: http://iquilezles.org/www/articles/distfunctions/distfunctio...
If you're into this kind of thing it's worth exploring that site.