10
$\begingroup$

I would like to implement a Maya plugin (this question is independent from Maya) to create 3D Voronoi patterns, Something like

enter image description here

I just know that I have to start from point sampling (I implemented the adaptive poisson sampling algorithm described in this paper).

I thought that, from those points, I should create the 3D wire of the mesh applying Voronoi (I tried to use (Python) scipy.spatial.Voronoi but the result was something different from what I expected).

I am missing something? Can anyone suggest the proper pipeline and algorithms I have to implement to create such patterns?

[EDIT] Here are a few example of what I get handling the result i get from scipy.spatial.Voronoi like this (as suggested here):

vor = Voronoi(points)
for vpair in vor.ridge_vertices:
    for i in range(len(vpair) - 1):
        if all(x >= 0 for x in vpair):
            v0 = vor.vertices[vpair[i]]
            v1 = vor.vertices[vpair[i+1]]
            create_line(v0.tolist(), v1.tolist())

The grey vertices are the sampled points (the original shape was a simple sphere): enter image description here

Here is a more complex shape (an arm) enter image description here

$\endgroup$
10
  • $\begingroup$ Thank you for the reply. I am going to replicate what I did and post a screen as suggested. Anyway the final intent of this question isn't to debug my code, but to understand if what I am doing is right or there are others steps that I am missing in between! $\endgroup$
    – Jiloc
    Commented Oct 20, 2015 at 15:55
  • $\begingroup$ added examples as suggested! $\endgroup$
    – Jiloc
    Commented Oct 21, 2015 at 11:38
  • $\begingroup$ The points from the poisson sampling are right. The algorithm that generates them is fully unit tested and the ones you see in the screens are spheres with the center in the sampled point which i programmatically created before calling Voronoi(points)! I am worried that I am not following the proper path or I am handling the Voronoi result in a wrong way $\endgroup$
    – Jiloc
    Commented Oct 21, 2015 at 20:10
  • $\begingroup$ The images you show have done the voronoi on the 2d function. $\endgroup$
    – joojaa
    Commented Oct 22, 2015 at 3:57
  • $\begingroup$ @joojaa From the example images I expected that the Voronoi cell edges on the 2D surface were what was required (to give a collection of line segments connecting points on the sphere surface, rather than the collection of plane sections that would be given in 3D). However, scipy.spatial.Voronoi seems to be designed for N dimensional spaces rather than surfaces embedded in them. I can't immediately see how it would be used for 3D points constrained to a 2D surface. $\endgroup$ Commented Oct 22, 2015 at 10:07

1 Answer 1

1
$\begingroup$

http://www.cs.sandia.gov/~samitch/papers/vor_final.pdf There isn't the computer algorithm in any programming languague, but u should be able to replicate it easily with some Plane Reflections and the algorithms from the above link.

$\endgroup$
1
  • $\begingroup$ Welcome to ComputerGraphics.SE! It's normally a good idea to make answers on Stack Exchange self contained (e.g. in case links go down and also in general so that people don't have to follow links to be able to tell if an answer is useful to them). You might want to improve your answer by including a short summary of the contents of the paper. $\endgroup$ Commented Oct 13, 2016 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.