Open Sinasta opened 2 years ago
Sorry, I am a bit confused. So, you have a dataset for each of every vertex of a Surface, and you want to inject those data into Vertex Weights or something else, am I right?
I am sorry if i did not state my question correctly. As far as i understood the Voronoi lines are drawn be calculating the mean distance between each point. What i would like to be able to is to have an influance over the weight ( or in other word radius) of each of those points. In application this would mean if all the points have the same weight(radius) except one with a bigger weight, the created voronoi cell's surface of this point would be bigger than if it would have the same weight as the others.
I guess this Wikipedia article describes it better: https://en.wikipedia.org/wiki/Weighted_Voronoi_diagram
Oh, I see. Thanks for the information.
So, based on what you've stated above, I think you should take a look at Voronoi on Mesh Node.
Does that fit your needs?
Yes i am using Voronoi on mesh (well Voronoi on solid because Voronoi on mesh creates overlapping faces sometimes). How are you able to do weighted Voronoi diagrams with the Voronoi on mesh Node. Maybe I am missing something.
This here is probably the closest example to what i am looking for:
https://youtu.be/wKfIddiuG58?t=75
https://github.com/DanielAbalde/PowerDiagrams
OK. I see. I didn't look closely. I used to think the "Voronoi on Mesh" node has controls over Weight, But clearly, it doesn't. So... I think the best way to do it may be the "sn-lite" node : )
Here is my solution. The idea is to use slice of 3D dimensional Voronoi diagram with Z dimension as weight.
Thank you very much for your answer. Coincidently i found out yesterday that a unweighted Voronoi of N-dimensions is a weighted diagram of N-1 dimension which makes a lot of sens. Somehow it would still be nice if weights could be implemented in the Voronoi node (But this would probably need a switch from Scipy to Cgal). Anyhow the 2d to 3d will do the trick for now. This will only get a problem as soon as somebody needs a weighted 3D Voronoi.
Scipy supports n-dimensional voronoi. Just need to try...
That's great. I will see if i figure out a way to weight 3D Voronois. By the way for those that will use this method: For me it seems that there is no need to bisect the Voronoi if you use 2D Voronoi instead of 3D Voronoi node.
Yes i am using Voronoi on mesh (well Voronoi on solid because Voronoi on mesh creates overlapping faces sometimes).
Hi @Sinasta. Nodes "Voronoi on Mesh" and "Voronoi on Solid" are fixed now. Can you try them if you are using sverchok? You can use any configuration of sites: lines, planes, circles, spheres without restrictions.
Update for the future:
http://www.qhull.org/
So it is not possible realize weighted Voronoi with scipy.spatial.Voronoi (it use qhull). Need something another or some tricks...
I would like to know if there is any way to divide a surface into a weighted voronoi. More precisely i would like to have control over the surface of the different cells which could maybe be done by adding a weight or radius to the site vertex. Would this be possible somehow?