I don't know an explicit formula (and if one exists, it's probably not easy to digest), but it's easy to get the center as a result of solving a small linear system -- without optimization algorithms. Given points P1, P2, P3, P4, apply translation so that P1 becomes the origin....

The 2D Periodic triangulation package in CGAL only handle periodicity in the x and y direction (i.e triangulation in the two dimensional flat torus).

Let's consider an edge in the Delaunay triangulation. Assume for now it is not on the convex hull of the input points. Consider one tetrahedron incident to that edge. You get the first point of the dual face. Then choose one of the two triangles in the tetrahedron incident to...

You can give the Delaunay triangulation to scipy.interpolate.LinearNDInterpolator together with the set of Z-values, and it should do the job for you. If you really want to do the interpolation yourself, you can build it up from find_simplex and transform....

python,3d,scipy,delaunay,convex-hull

Some things: You give points[hull.vertices] as an argument to Delaunay, so the integers in tri.simplices are indices into points[hull.vertices], not into points, so that you end up plotting the wrong points Tetrahedra have 6 ridges, but you are only plotting 4 If you need just the triangulation of the convex...

This is the infinite vertex, which has unspecified coordinates and happens to be the origin here. You should iterate using finite_vertices_begin()/finite_vertices_end() instead. See http://doc.cgal.org/latest/Triangulation_3/ for information about the infinite vertex.

matlab,geometry,computational-geometry,delaunay,voronoi

Looking at your files, you have a set of points P in R^3 and a (2-manifold) surface triangulation T of your geometry: This can easily be turned into a surface voronoi complex V by noting that the voronoi complex is dual to the underlying triangulation T. This means the following:...

Finally got it working. This is the correct link for delaunay triangulation using OpenCV 2.4.9: https://github.com/Itseez/opencv_attic/blob/master/opencv/samples/c/delaunay.c...

algorithm,d3.js,geometry,computational-geometry,delaunay

Create a graph in which the nodes correspond to Delaunay triangles and in which there is a graph edge between two triangles if and only if they share two vertices. Compute the connected components of the graph. For each connected component, find all of the nodes that have less...

c++,infinite-loop,triangulation,cgal,delaunay

I think the bug is in your struct adjacent_vertex_back_inserter_t The operator= should be as follows: inline void operator=(const vertex_handle_t& w) { assert(! delaunay.is_infinite(v)) if ( !delaunay.is_infinite(w) && (delaunay.geom_traits().compare_distance_3_object()(p, w->point(), v->point()) == CGAL::SMALLER)){ v = w; } ...

The problem is that your data set is not centered. Qhull (used to do the Delaunay triangulation) does not center the data set for you under the default options, so it runs to rounding errors far away from origin. You can center it yourself before triangulation points -= points.mean(axis=0) tri...

You need to find the tetrahedons on the surface of the shape first. Then you can try alpha shapes and remove the edges exceeding alpha. In CGAL you Then check all tetrahedons if they are connected with a super tetrahedon. These are the tetrahedons on the surface of the shape....

Turning a triangulation into a delaunayTriangulation: Certainly not possible for all triangulations, as they don't fulfill the Delaunay property. Constrained Delaunay triangulation might work if your trep is well behaved, but might possibly add additional triangles and shuffle nodes: delaunayTriangulation(trep.Points, trep.edges); Therefore I would suggest to you the following Workaround:...

python,scipy,triangulation,delaunay

What you are looking for is called constrained Delaunay triangulation, and unfortunately the scipy.spatial implementation does not support it. As you pointed out, triangle does have that feature -- why not use it instead?...

You can use Fade 2.5D, it uses triangles to mesh surface points: http://www.geom.at/fade2d/html/ The library is free for scientific use, you can find a code example in Example7 (I'm the author)....

python,scipy,interpolation,delaunay

After some experimenting, the solution looks simple (this post was quite helpful): # dimension of the problem (in this example I use 3D grid, # but the method works for any dimension n>=2) n = 3 # my array of grid points (array of n-dimensional coordinates) points = [[1,2,3], [2,3,4],...