POV-Ray : Newsgroups : povray.binaries.animations : Voronoi cells bounding box : Voronoi cells bounding box Server Time
1 Apr 2023 04:46:04 EDT (-0400)
  Voronoi cells bounding box  
From: Bill Pragnell
Date: 27 Dec 2022 07:35:00
Message: <web.63aae5b6fe17c447b96893c06f35e431@news.povray.org>
Hi all, Merry Christmas or the solstice celebration of your choice!

I found several major problems with my voronoi cell maker when I started messing
with non-square grids. This was hindered by a lack of input validation,
provoking me to overhaul my input parsing. The TL;DR is that anisotropic grids
are problematic, and it's difficult to sanitize inputs to avoid bad output, so I
decided to just document the input options and offer advice (!).

I'm now padding the volume of interest with extra grid points to make
calculation easier (and more correct). The change in boundary conditions means
that there are several ways to handle the cells at the edges of the box:

1) process all padded points, including the bounding planes, to fill the space
up to the faces of the box. This gives a 'filled' box with complete faces.

2) process only the points within the box, including the bounding planes to trim
the cells. This results in some cells that extend out of the box being trimmed
by the bounding planes, but also produces gaps from padding cells that extend
into the box.

3) process only the points within the box, but don't include the bounding
planes. This means that some cells extend out of the box, and some gaps from the
padding cells extend into the box. This option is the most 'natural' looking,
because there is no obvious edge to the bounded volume.

Here are three examples of the above options, all using the same seed grid. I
have combined them into a gif to more clearly show the differences.

(The attachment guidelines recommend h264, but I think this makes no sense for
comparisons with only a few frames; apologies if gifs are for some reason
frowned upon!)


Post a reply to this message

Download 'bounds_options.gif' (229 KB)

Preview of image 'bounds_options.gif'


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