POV-Ray : Newsgroups : povray.advanced-users : Voronoi! Again! With SDF's! And (some) color! Server Time
16 Apr 2024 14:20:13 EDT (-0400)
  Voronoi! Again! With SDF's! And (some) color! (Message 1 to 1 of 1)  
From: Bald Eagle
Subject: Voronoi! Again! With SDF's! And (some) color!
Date: 22 Jan 2023 15:20:00
Message: <web.63cd9a0842d33bbf1f9dae3025979125@news.povray.org>
(And you thought we were done....  :D )

So, I was pondering some practical logistics problems and analyses, and my mind
had the traveling salesman algorithm and the related Voronoi pattern bouncing
around in there, and my mind complained, "But the things you want to measure the
distance between aren't _points_!"

And then it realized: "They don't have to be!"

And so after struggling mightily to convert some 2D signed distance functions
into  something the POV-Ray function parser would allow, I then grabbed the
Voronoi code, clawed my way through structuring that to use an array of distance
functions and their parameters assigned to each "vertex" to make an SDF version
of the Voronoi pattern.   A little fiddling with the color functions for each of
the channels, and it's looking pretty interesting.

Not _as_ interesting as I had hoped - but maybe with some more eccentric SDF's
and denser arrangements.

The other interesting thing that popped out is how some of the values behave.
I certainly don't get the nice smooth SDF that IQ gets, and I'll have to keep
investigating WHY.  But also the color function that adds blue in order to
outline the shapes only seems to work on some.

Anyway, Hope you enjoy.


Post a reply to this message


Attachments:
Download 'sdf_voronoi.png' (271 KB)

Preview of image 'sdf_voronoi.png'
sdf_voronoi.png


 

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