how to make a voronoi surface from an existant mesh?

hi everybody
does anyone know any way to create a voronoi surface from an existant mesh(maybe by using the vertex of the mesh as centers for the voronoi cells)?
anybody has still worked on stuff like this?
thanks for helping?

Hi,

I don’t if this will help you, but anyway.

If you have qhull and its related programs, you can pipe the coordinates of your mesh into qvoronoi and let that compute the voronoi surface.


import Blender
from Blender import Object

from subprocess import Popen,PIPE
from os import system

thisData = Object.GetSelected()[0].getData()

allvert_coords = []
for vert in thisData.verts:
	allvert_coords.append(vert.co)


cmd='qvoronoi s o'

dims = 3

coords = str(dims)+'
'+str(len(allvert_coords))+'
'

p1 = Popen(cmd,stdin=PIPE,shell=True)

for c in allvert_coords:
	vec = ''
	for i in c:
		vec = vec+str(i)+' '
	coords = coords+vec+'
'

p1.stdin.write(coords)

p1.communicate()

The above code pipes the coordinates of the verts of the selected mesh to qvoronoi in a suitable format and prints the results to stdout.

You would have to get the data produced by qvoronoi back into blender somehow.

Hope this is of some use to you.

Greetings,

Wim

hi, the script ANT landscape creator, has a voronoi turbulence setting that may be useful to you, it has many variable settings for types, size, depth & more.
You can find the script by following the Wiki link in my sig.
Scripts/Catalog/Wizards is the section.
Also if you search the forum there is a thread for ANT landscape.
Hope this helps, the settings work very well.
You could also map a voronoi image to a plane and use nor or displace the mesh to the image.
Thanks M.A.