View Full Version : from voronoi-faces to voronoi-diagram in pixel-space??

12-28-2002, 06:01 AM

my goal is to draw a voronoi-diagramm for a number of single points which represent obstacles for my path-finding-problem. In order to solve this I draw a unique colored cone for every point with its apex matching the obstacle-point. With the help of z-buffer and orthogonal projection i get the voronoi-faces in pixel-space, but my problem is to generate just the voronoi-diagram that consits of a line-mesh in the frame-buffer which exactly matches the intersection-lines of the cones.

I will be pleased for every helpful comments ;-)


12-28-2002, 07:32 AM
You can post-process by using edge finding (i e, only output data where there are neighboring pixels of different color).

This can be done using ARB_fragment_program if you bind your first output to a texture, and then use that as input for the second draw pass.

However, this sounds a lot like something you should solve with computational geometry (look for "delaunay triangulation" on MathWorld or Google) and just submit lines to GL.