%% Build Cpp MEX File with CGAL library opt_load = 0; if opt_load ==0 include1 = ['-I', 'C:\dev\vcpkg\installed\x64-windows\include']; include2 = ['-I', 'C:\dev\vcpkg\installed\x64-windows\include\eigen3']; include3 = ['-I', 'D:\software\libigl\external\glfw\include']; lib1 = ['-L', 'C:\dev\vcpkg\installed\x64-windows\lib']; lib11 = ['-l', 'mpfr.lib']; lib12 = ['-l', 'gmp.lib']; lib2 = ['-L', 'D:\software\glfw-3.3.6.bin.WIN64\lib-vc2019']; lib21 = ['-l', 'glfw3.lib']; mex('-v', include1, lib1,lib11,lib1,lib12, 'mexDT.cpp'); % mex('-v', include1, 'mexDT.cpp'); % mex('-v', include1, lib1,lib11,lib1,lib12, 'mexCVT_cell.cpp'); % mex -v CXXFLAGS="$CXXFLAGS -Wall" ... % '-IC:\dev\vcpkg\installed\x64-windows\include' ... % '-IC:\dev\vcpkg\installed\x64-windows\lib\auxiliary\gmp\include' ... % '-LC:\dev\vcpkg\installed\x64-windows\lib\auxiliary\gmp\lib' ... % '-llibgmp-10.lib' '-llibmpfr-4.lib' ... % COMPFLAGS='$COMPFLAGS /openmp' ... % 'mexCVT.cpp'; end %% test mexDT x = 128; y = 128; pnts = [-x, -y; x,-y; x, 0; 0, 0; 0, y; -x, y]; nodes = mexDT(pnts, 2); figure; DT = delaunayTriangulation(nodes); triplot(DT); %% test interPoly % load datas % tic % res = mexInterPoly(MMCs_poly, poly_cell); % toc %% test mexCVT load seeds bnodes = seeds_minus; figure c_nodes = mexCVT_cell(bnodes, int32([2,5,6,1]'), 256, 128); for i = 1:size(c_nodes, 1) nodes = c_nodes{i}; scatter(nodes(:,1),nodes(:,2)); hold on; scatter(nodes(:,3),nodes(:,4)); hold on; end % nodes = mexCVT(bnodes, int32([2,5,6,1]'), 256, 128); % for j = 1:2 % scatter(nodes(:,1),nodes(:,2)); hold on; % scatter(nodes(:,3),nodes(:,4)); hold on; % end hold on; voronoi(bnodes(:,1), bnodes(:,2));