POV-Ray : Newsgroups : povray.text.scene-files : Voronoi cell polygon macro : Voronoi cell polygon macro Server Time
4 Dec 2023 01:18:47 EST (-0500)
  Voronoi cell polygon macro  
From: Bill Pragnell
Date: 24 Nov 2022 19:25:00
Message: <web.63800ad9a4dfc19bb96893c06f35e431@news.povray.org>
Following threads in p.b.images, here's a more generically-useful version of my
Voronoi cells.

It's a macro that produces an array of Voronoi polygons in the x-z plane given
an input array of seed points. Each polygon is stored as a list of vertices, so
each element in the output array is itself an array of points (NOT a 2D array!).
The macro also removes collinear points, so each polygon might not be the same
size (use dimension_size to find the number of vertices for each polygon).

Also included is my util macro for shrinking a partly-assigned array.


Post a reply to this message

Download 'voronoi.inc.txt' (3 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.