Can anybody point me in a direction that will guide me to extend the VoronoiDiagram function in Mathematica to handle 3D (three dimensional) situations (i.e. points in 3D)? Any help will be greatly appreciated.
Using version-9 built-in
Mathematica ships with a TetGen interface called TetGenLink. To learn how to use TetGenLink is a bit more work than using the usual Mathematica functions, so I am not going to post a complete solution now.
But the way to go is using TetGenLink. It can compute a Delaunay tetrahedral mesh, which is the dual of the Voronoi partitioning. TetGen can also compute Voronoi partitions, but I am not sure if this function is exposed in TetGenLink, you'd have to check.
I have used this package with Mathematica 7 and 8 regularly on both Mac and Windows. let' do a testing installation with Mathematica 9 on Mac 10.8, you can just delete the folder directly after testing
for Windows binary, you can grab it directly from qhull.org
uzip both packages, create a folder "qhull" under mpower folder, then copy "bin" folder from uzipped qhull package, put it under qhull folder you just created
in mPower folder open mPower.m in Mathematica
modify it to
or you can use absolute path directly
then create a new notebook file "test.nb" at the mPower folder
you will get two warnings
Warning: regtet binary not found. Expected location: /mPower-1.0-11-May-2008-1631/qhull/bin/
Warning: pwrvtx binary not found. Expected location: /mPower-1.0-11-May-2008-1631/qhull/bin/
ignore them, you are ready to use qhull interface now.
run the following code for testing:
|show 6 more comments|
It would help if you gave an example of a 3D Voronoi diagram.
Perhaps you want something like this, using
Warning: this is very slow and uses a lot of memory!
Is that roughly what you want?
The extension to 3D is quite non-trivial, and although Wizard's contour plot is impressive, it is an approximation. What you want does not exist in Mathematica. I might suggest Manifold Lab, which has its own issues but some incredible capabilities as well:
|show 5 more comments|