This is an example demo of a Delaunay triangulation, it was invented by Boris Delaunay and is used for making hull surfaces from single points. The downloadable .rar also has a java implementation and other stuff to study. The algorithm has a high degree order and has a few bugs when there are many points. It can be added points dynamically and circles that make triangles can be drawn as well.
Any questions post it here. Anonymous comments are enabled. this is the download link http://fbe.am/4W7