From ae2c59100d965b4be0feeb77295c2ea83c3d0203 Mon Sep 17 00:00:00 2001 From: Lingjie Zhu Date: Thu, 7 Dec 2017 20:10:12 +0800 Subject: [PATCH] check meshing with visibility --- .../surface_mesh_approximation.txt | 19 ++++++++++++------- .../doc/Surface_mesh_approximation/tofix.txt | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt index 66290139385..1ebe439466b 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt @@ -80,7 +80,6 @@ As depicted by Figure \cgalFigureRef{nb_proxies}, specifying a minimum error dro Using different number of proxies to approximate the plane-sphere model. From left to right: 8, 14, 20 proxies. We plot right the error against the number of proxies. \cgalFigureEnd - \subsection sma_operations Operations For interactive use, the approach can yield better approximations of the geometry via adding/removing proxies and tunneling out of local minima via additional operations: @@ -97,11 +96,9 @@ As depicted in Figure \cgalFigureRef{operations}, teleportation provides a means \subsection sma_meshing Meshing -This package implements the meshing algorithm described in \cgalCite{cgal:cad-vsa-04} by generating a triangle mesh approximation of the clustering partition. Intuitively, the triangulation is generated by computing a discrete analog of a 2D Delaunay triangulation, where distances are measured on the graph of the input triangulation. - -\cgalFigureBegin{triangulation, triangulation.png} -Discrete constrained triangulation. The triangulation process first constructs constrained edges between anchor vertices, by 'flooding' along the interface edges (black arrows, upper left). It then floods the inner vertices (black arrows, upper right). Triangles (lower left) are formed by connecting the sources of the flooding process (red triangle, lower right). -\cgalFigureEnd +This package implements the meshing algorithm described in \cgalCite{cgal:cad-vsa-04} by generating a triangle mesh approximation of the clustering partition. The meshing algorithm has two major steps: +- Generating anchors. Anchors are generated on the boundaries of each connected proxy region. +- Discrete constrained 2D Delaunay triangulation. Connecting the anchors to generate the final approximated triangle mesh. \subsubsection sma_anchors Anchors @@ -129,7 +126,15 @@ For a boundary cycle without any anchor (like a hole, Figure \cgalFigureRef{oper \subsubsection sma_mesh_extraction Mesh Extraction -Each clustering region delineated by anchor vertices boundary is then triangulated (\cgalFigureRef{triangulation}) and the final anchor locations (not necessarily coinciding with the anchor vertices) are computed by averaging the projection of the anchor vertices on their respective proxies. +With the anchor vertices and edges defined, we need to triangulate this initial graph in order to be able to truly call it a mesh. Intuitively, the triangulation is generated by computing a discrete analog of a constrained 2D Delaunay triangulation, where distances are measured on the graph of the input triangulation. + +\cgalFigureBegin{triangulation, triangulation.png} +Discrete constrained triangulation on a sphere model. The triangulation process first floods the inner vertices (red arrows, 2nd) to simulate the Voronoi diagram. It then constructs constrained edges between anchor vertices, by 'flooding' along the interface edges (red arrows, 3rd). Finally, triangles (red hollow triangle, 4th) are formed by connecting the source anchors (black arrows, 4th) of the faces where 3 Voronoi cells meets (red solid triangle, 4th). +\cgalFigureEnd + +The first figure in Figure \cgalFigureRef{triangulation} shows how we can easily extract the Delaunay triangulation of set of points (colored disks) from the Voronoi diagram (colored regions separated by blue lines) by connecting the points indicated by the vertices (red circles) where 3 Voronoi cells incident. In similar spirit, we construct discrete Voronoi cells from which the triangulation is easily extracted. In a first step, we start a flooding of the interior of the region, coloring the vertices also according to their closest anchor vertex. We then only flood the boundary of a region so that every vertex on it is colored depending on the closest anchor vertex: this will enforce the constrained triangulation by forcing the boundary to be in it. + +Each clustering region delineated by anchor vertices boundary is triangulated and the final anchor locations (not necessarily coinciding with the anchor vertices) are computed by averaging the projection of the anchor vertices on their respective proxies. In \cgalFigureRef{meshing}, the bear model is approximated through \f$ \mathcal{L}^{2,1} \f$ metric and the final number of proxies is determined by monitoring the error drop. diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/tofix.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/tofix.txt index 18603aff0dc..d0e4d49fdbc 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/tofix.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/tofix.txt @@ -5,4 +5,5 @@ - verify that teleport can be forced even when heuristic test fails. about the test: why not simply comparing increase of error and decrease of error ? -- checked - when meshing, use discrete analog of a *constrained* 2D Delaunay triangulation ? (involving visibility) +-- checked - add option to optimize the vertex locations of the output mesh