This screensaver applies the marching tetrahedrons algorithm to produce some blob-like entities which move around the screen. All of the surface construction code is executed on the CPU.
During development, I found that increasing the grid size did not scale very will as a method of increasing the smoothness of the mesh (O(n^3), where n is the resolution of the grid). Instead, I apply a surface subdivision to the mesh after it has been constructed, smoothing everything out while not using up too much CPU.
Unfortunately, the mesh produced by the marching tetrahedrons algorithm is quite messy (I think marching cubes is better), and does not lend itself very well to surface subdivision. To solve this problem, I apply a "mesh fixing" process to the mesh after it is constructed and before it is subdivided. This "mesh fixing" basically snaps together vertices that are less than a certain distance from each other in to the same vertex. The result of applying this procedure is a mesh where most of the polygons have roughly the same area.









