[Fuse] Voronoi Diagram

User avatar
Dunn
Moderator
Posts: 477
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 2 times
Contact:

[Fuse] Voronoi Diagram

#1

Post by Dunn » Mon Feb 06, 2017 10:51 am

Here´s a quick Code Doodle, translated from here: http://rosettacode.org/wiki/Voronoi_diagram#Lua
Maybe "still" needs some cleanup and some features are not added yet ( like the classic voronoi look ). :oops:
I will update it in the next version. But for now have fun with it. :)


Voronoi Diagram v1.0.0
Voronoi_Diagram.Fuse


Voronoi_diagram_WIP_1a.png
Voronoi_diagram_WIP_1b.png
Voronoi_diagram_WIP_1c.png
:)
You do not have the required permissions to view the files attached to this post.
Last edited by Dunn on Mon Feb 06, 2017 3:04 pm, edited 1 time in total.

Tags:

User avatar
SecondMan
Site Admin
Posts: 3478
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 5
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: [Fuse] Voronoi Diagram

#2

Post by SecondMan » Mon Feb 06, 2017 12:24 pm

Ooooh! Nice! :)

Toys! Give us all the toys! :D

User avatar
Dunn
Moderator
Posts: 477
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 2 times
Contact:

Re: [Fuse] Voronoi Diagram

#3

Post by Dunn » Mon Feb 06, 2017 2:59 pm

Thanx ;)

:arrow: Added the Fuse to the first post. It´s not complete .. still missing the classic flat block style :oops:

Here it is.. in action:


User avatar
Midgardsormr
Fusionator
Posts: 1106
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 2
Location: Los Angeles, CA, USA
Been thanked: 75 times
Contact:

Re: [Fuse] Voronoi Diagram

#4

Post by Midgardsormr » Wed Mar 01, 2017 2:05 pm

I recently knocked together a brute-force raster method for Voronoi. It should be available on the MuseVFX website eventually, but I'll also release it here since I don't know how long it will take before it appears in its official location.

It's pretty slow due to my naive algorithm. I am attempting to put it into OpenCL but haven't had much luck so far.
You do not have the required permissions to view the files attached to this post.

User avatar
bfloch
Fusioneer
Posts: 91
Joined: Wed Aug 06, 2014 4:25 pm
Been thanked: 4 times

Re: [Fuse] Voronoi Diagram

#5

Post by bfloch » Wed Feb 21, 2018 9:14 pm

@Midgardsormr
Beautiful. Exactly what I needed.

I hope you don't mind I've contributed Manhattan, Chebyshev and everything in between ;) via the Minkowski distance to this fuse.
I would really love to see this one on Reactor.
MT_Voronoi.fuse
You do not have the required permissions to view the files attached to this post.

User avatar
SecondMan
Site Admin
Posts: 3478
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 5
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: [Fuse] Voronoi Diagram

#6

Post by SecondMan » Wed Feb 21, 2018 9:39 pm

@bfloch welcome back! :cheer:

And thanks! :)

User avatar
Midgardsormr
Fusionator
Posts: 1106
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 2
Location: Los Angeles, CA, USA
Been thanked: 75 times
Contact:

Re: [Fuse] Voronoi Diagram

#7

Post by Midgardsormr » Wed Feb 21, 2018 9:52 pm

I don't mind at all, although you should update v2, available in its own topic:
viewtopic.php?f=17&t=1833

That one stores the sites list in the node's CustomData so it doesn't have to be recalculated every frame, and the point data is available to other tools and scripts.

As I have time, I've been trying to implement the improved rendering described by Inigo Quilez:
http://www.iquilezles.org/www/articles/ ... ilines.htm

It's nearly there, but the last trip through broke something, and I haven't been able to put my finger on what I did wrong. I also improved the data structures such that all of the properties of a cell are stored in a single entry of a table, instead of having discrete tables for every single parameter.

Once I find the time to fix what I broke, I will definitely re-add it to Reactor. It was there briefly, but I had a Git snafu, and the contribution got rolled back. I haven't found the opportunity to sort that out.

I have too many half-finished projects…