MATLAB implementation of "PH-CPF: Planar Hexagonal Meshing using Coordinate Power Fields" by Kacper Pluta, Michal Edelstein, Amir Vaxman and Mirela Ben-Chen.
If you have any questions or issues running the code, please open an issue or contact [email protected]
- Clone this repository:
git clone https://github.com/michaled/PH-CPF.git- Run the
runme.mscript in MATLAB
-
This is a MATLAB implementation and requires MATLAB 2019a or newer
-
This code includes Windows precompiled binaries. The source code and versions for MacOS and Linux are coming soon!
- meshname.out.off - the primal mesh
- meshname.out_d.off - the dualized mesh (if requested)
- meshname.out_d_p.off - the planarized mesh (or meshname.out_p.off without dualization)
- meshname.out_d_p_tri.off - the triangulated planarized mesh (or meshname.out_p_tri.off without dualization)
- meshname.obj - the cut mesh with texture coordinates
Most of the rendering software packages triangulate a polygonal input mesh to render it. Therefore, if the triangulation fails, the mesh will not be displayed or it might show visual artifacts such as holes and inverted triangles. Hence, we additionally provide as output a triangulated version for rendering purposes. However, please note, that our triangulation algorithm is also not perfect, and thus may lead to self intersections (even in cases when the input polygonal faces were intersection-free).
Our project was built using the following open source projects:
libigl, Directional, libhedra, Ceres Solver, CGAL, Eigen, Boost, SuiteSparse, GMP, MPFR, Cygwin, gptoolbox, geom3d, WOBJ_toolbox_Version2b
If you find this code useful, please cite our paper:
@article{pluta2021ph,
title={PH-CPF: planar hexagonal meshing using coordinate power fields},
author={Pluta, Kacper and Edelstein, Michal and Vaxman, Amir and Ben-Chen, Mirela},
journal={ACM Transactions on Graphics (TOG)},
year={2021},
}
