A wrapper to perform 2D/3D Delaunay triangulation using CGAL with pybind11 and CMake. Supports distributed memory parallel Delaunay triangulation using (for now qhull)
- clone the repo:
git clone https://github.com/krober10nd/simple_cgal.git
- pull the submodules:
git submodule update --init --recursive
- run:
pip install simple_cgal
- CGAL>=5.0
- cmake>=2.8
- numpy>=1.0
import random
import numpy
import simple_cgal
import time
num_points = 1000
points = numpy.array([(random.random()*1.0, random.random()*1.0) for _ in range(num_points)])
t1 = time.time()
faces = simple_cgal.delaunay2(points[:,0],points[:,1])
print('elapsed time is '+str(time.time()-t1))
import matplotlib.pyplot as plt
plt.triplot(points[:,0], points[:,1], faces)
plt.show()