start using new figure macros.

For Combinatorial maps, I reintroduced the original anchor names as they
were still in use in the reference manual.
This commit is contained in:
Sébastien Loriot 2012-11-08 10:55:09 +00:00
parent 83ccea3221
commit 974621b58f
10 changed files with 249 additions and 323 deletions

View File

@ -41,8 +41,9 @@ well the as id (here the face handle) of the intersected
primitives. Similarly, each distance query can return the closest
point from the point query as well as the id of the closest primitive.
\image latex anchor.png "AABB tree. Left: surface triangle mesh of a mechanical part. Right AABB tree constructed."
\image html anchor.png "AABB tree. Left: surface triangle mesh of a mechanical part. Right AABB tree constructed."
\cgal_figure_begin{aabbtree_meca,anchor.png}
Left: surface triangle mesh of a mechanical part. Right AABB tree constructed.
\cgal_figure_end
\section aabb_tree_interface Interface
@ -190,8 +191,8 @@ option which maximizes speed.
\subsection aabb_tree_perf_cons Construction
The surface triangle mesh chosen for benchmarking the tree
construction is the knot model (14,400 triangles) depicted by Figure
\ref figAABB-tree-bench. We measure the tree construction time (both
construction is the knot model (14,400 triangles) depicted by
\cgal_figure_ref{figAABB-tree-bench}. We measure the tree construction time (both
AABB tree alone and AABB tree with internal KD-tree) for this model as
well as for three denser versions subdivided through the Loop
subdivision scheme which multiplies the number of triangles by four.
@ -259,15 +260,15 @@ the intersection functions which enumerate all intersections.
| AABB_tree::all_intersections() | 46,507 | 38,471 | 36,374 | 2,644 |
Curve \ref figAABB-tree-bench plots the number of queries per second
Curve of \cgal_figure_ref{figAABB-tree-bench} plots the number of queries per second
(here the `AABB_tree::all_intersections()` function with random segment
queries) against the number of input triangles for the knot triangle
surface mesh.
\anchor figAABB-tree-bench
\image latex bench.png "Number of queries per second against number of triangles for the knot model with 14K (shown), 57K, 230K and 921K triangles. We call the `all_intersections` function with segment queries randomly chosen within the bounding box."
\image html bench.png "Number of queries per second against number of triangles for the knot model with 14K (shown), 57K, 230K and 921K triangles. We call the `all_intersections` function with segment queries randomly chosen within the bounding box."
\cgal_figure_begin{figAABB-tree-bench,bench.png}
Number of queries per second against number of triangles for the knot model with 14K (shown), 57K, 230K and 921K triangles. We call the `all_intersections` function with segment queries randomly chosen within the bounding box.
\cgal_figure_end
The following table measures the number of `AABB_tree::all_intersections()`
queries per second against several kernels. We use the 14,400 triangle

View File

@ -31,10 +31,11 @@ it was not desirable to cover all known algebraic structures,
e.g., we did not introduce concepts for such basic structures as <I>groups</I> or
exceptional structures as <I>skew fields</I>.
\anchor figConceptHierarchyOfAlgebraicStructures
\image html AlgebraicConceptHierarchy.gif "Concept Hierarchy of Algebraic Structures"
\cgal_figure_begin{figConceptHierarchyOfAlgebraicStructures,AlgebraicConceptHierarchy.gif}
Concept Hierarchy of Algebraic Structures
\cgal_figure_end
Figure \ref figConceptHierarchyOfAlgebraicStructures shows the refinement
\cgal_figure_ref{figConceptHierarchyOfAlgebraicStructures} shows the refinement
relationship of the algebraic structure concepts.
`IntegralDomain`, `UniqueFactorizationDomain`, `EuclideanRing` and
`Field` correspond to the algebraic structures with the
@ -176,7 +177,7 @@ concepts `Field` and `RealEmbeddable`, while
`RingNumberType` combines `IntegralDomainWithoutDivision` and
`RealEmbeddable`. Algebraically, the real number types do not form
distinct structures and are therefore not listed in the concept
hierarchy of Figure \ref figConceptHierarchyOfAlgebraicStructures.
hierarchy of \cgal_figure_ref{figConceptHierarchyOfAlgebraicStructures}.
\section Algebraic_foundationsInteroperability Interoperability

View File

@ -74,16 +74,13 @@ Note that a hole does not necessarily correspond to a single face,
as it may have no area, or alternatively it may consist of several
connected faces. Every face can have several holes contained in its
interior (or no holes at all). In addition, every face may contain
isolated vertices in its interior. See Figure \ref arr_figseg_dcel
isolated vertices in its interior. See \cgal_figure_ref{arr_figseg_dcel}
for an illustration of the various \sc{Dcel} features. For more details
on the \sc{Dcel} data structure see \cite bkos-cgaa-00 Chapter 2.
\anchor arr_figseg_dcel
\image html arr_segs.gif
<center><b>
\cgal_figure_begin{arr_figseg_dcel,arr_segs.gif}
An arrangement of interior-disjoint line segments with some of the \sc{Dcel} records that represent it. The unbounded face \f$ f_0\f$ has a single connected component that forms a hole inside it, and this hole is comprised if several faces. The half-edge \f$ e\f$ is directed from its source vertex \f$ v_1\f$ to its target vertex \f$ v_2\f$. This edge, together with its twin \f$ e'\f$, correspond to a line segment that connects the points associated with \f$ v_1\f$ and \f$ v_2\f$ and separates the face \f$ f_1\f$ from \f$ f_2\f$. The predecessor \f$ e_{\rm prev}\f$ and successor \f$ e_{\rm next}\f$ of \f$ e\f$ are part of the chain that form the outer boundary of the face \f$ f_2\f$. The face \f$ f_1\f$ has a more complicated structure as it contains two holes in its interior: One hole consists of two adjacent faces \f$ f_3\f$ and \f$ f_4\f$, while the other hole is comprised of two edges. \f$ f_1\f$ also contains two isolated vertices \f$ u_1\f$ and \f$ u_2\f$ in its interior.
</b></center>
\cgal_figure_end
The \f$ x\f$-monotone curves of an arrangement are embedded in an
rectangular two-dimensional area called the parameter
@ -483,11 +480,11 @@ the arrangement and the inserted curve(s); see Section \ref arr_secgl_funcs
for more details and examples.
\footnote{You may skip to Section \ref arr_secgl_funcs, and return to this subsection at a later point in time.}
\anchor arr_figex_1
\image html insert.gif
<center><b>
\cgal_figure_begin{arr_figex_1,insert.gif}
The various specialized insertion procedures. The inserted \f$ x\f$-monotone curve is drawn with a light dashed line, surrounded by two solid arrows that represent the pair of twin half-edges added to the \sc{Dcel}. Existing vertices are shown as black dots while new vertices are shown as light dots. Existing half-edges that are affected by the insertion operations are drawn as dashed arrows. (a) Inserting a curve as a new hole inside the face \f$ f\f$. (b) Inserting a curve from an existing vertex \f$ u\f$ that corresponds to one of its endpoints. (c) Inserting an \f$ x\f$-monotone curve whose endpoints are the already existing vertices \f$ u_1\f$ and \f$ u_2\f$. In our case, the new pair of half-edges close a new face \f$ f'\f$, where the hole \f$ h_1\f$, which used to belong to \f$ f\f$, now becomes an enclave in this new face.
</b></center>
\cgal_figure_end
When an \f$ x\f$-monotone curve is inserted into an existing arrangement, such
that the interior of this curve is disjoint from any arrangement feature,
@ -551,15 +548,13 @@ that has just been created.
from \f$ v_1\f$ to \f$ v_2\f$.
</UL>
\anchor arr_figex_2
\image html ex_1.gif
<center><b>
\cgal_figure_begin{arr_figex_2,ex_1.gif}
The arrangement of the line segments \f$ s_1, \ldots, s_5\f$ constructed in `edge_insertion.cpp`. The arrows mark the direction of the halfedges returned from the various insertion functions.
</b></center>
\cgal_figure_end
The following program demonstrates the usage of the four insertion
functions. It creates an arrangement of five line segments, as
depicted in Figure \ref arr_figex_1.\footnote{Notice that in all figures in the rest of this chapter the coordinate axes are drawn only for illustrative purposes and are <I>not</I> part of the arrangement.} As the arrangement is very
depicted in \cgal_figure_ref{arr_figex_1}.\footnote{Notice that in all figures in the rest of this chapter the coordinate axes are drawn only for illustrative purposes and are <I>not</I> part of the arrangement.} As the arrangement is very
simple, we use the simple Cartesian kernel of \cgal with integer
coordinates for the segment endpoints. We also use the
`Arr_segment_traits_2` class that enables the efficient
@ -596,18 +591,16 @@ containing an isolated vertex handle \f$ v\f$ by calling `v->face()`.
The function `remove_isolated_vertex(v)` receives a handle to
an isolated vertex and removes it from the arrangement.
\anchor arr_figex_3
\image html ex_2.gif
<center><b>
\cgal_figure_begin{arr_figex_3,ex_2.gif}
An arrangement of line segments containing three isolated vertices, as constructed in `isolated_vertices.cpp`. The vertices \f$ u_2\f$ and \f$ u_3\f$ are eventually removed from the arrangement.
</b></center>
\cgal_figure_end
The following program demonstrates the usage of the arrangement
member-functions for manipulating isolated vertices. It first
inserts three isolated vertices located inside the unbounded face, then
it inserts four line segments that form a rectangular hole inside the
unbounded face (see Figure \ref arr_figex_2 for an
unbounded face (see \cgal_figure_ref{arr_figex_2} for an
illustration). Finally, it traverses the vertices and removes those
isolated vertices that are still contained in the unbounded face
(\f$ u_2\f$ and \f$ u_3\f$ in this case):
@ -655,16 +648,13 @@ isolated vertices by supplying additional Boolean flags to
`remove_edge()` indicating whether the source and the target vertices
are to be removed should they become isolated.
\anchor arr_figex_4
\image html ex_3.gif
<center><b>
\cgal_figure_begin{arr_figex_4,ex_3.gif}
An arrangement of line segments as constructed in `edge_manipulation.cpp`. Note that the edges \f$ e_7\f$ and \f$ e_8\f$ and the vertices \f$ w_1\f$ and \f$ w_2\f$, introduced in step (b) are eventually removed in step (c).
</b></center>
\cgal_figure_end
In the following example program we show how the edge-manipulation
functions can be used. The program works in three
steps, as demonstrated in Figure \ref arr_figex_3. Note that
steps, as demonstrated in \cgal_figure_ref{arr_figex_3}. Note that
here we still stick to integer coordinates, but as we work on a
larger scale we use an unbounded integer number-type (in this
case, the `Gmpz` type taken from the <span class="textsc">Gmp</span> library)
@ -721,7 +711,7 @@ list of halfedges incident to \f$ v\f$. More precisely, it is sufficient
to locate one of the halfedges `pred` directed toward \f$ v\f$ such
that \f$ c\f$ is located between `pred` and `pred->next()` in
clockwise order around \f$ v\f$, in order to complete the insertion
(see Figure \ref arr_figex_1 for an illustration). This may
(see \cgal_figure_ref{arr_figex_1} for an illustration). This may
take \f$ O(d)\f$ time where \f$ d\f$ is the degree of the vertex. However,
if the halfedge `pred` is known in advance, the insertion can
be carried out in constant time.
@ -745,14 +735,12 @@ correspond to the curve endpoints, and one that accepts a handle
for one vertex and a predecessor halfedge around the other
vertex.
\anchor arr_figex_5
\image html ex_4.gif
<center><b>
\cgal_figure_begin{arr_figex_5,ex_4.gif}
An arrangement of line segments, as constructed in `special_edge_insertion.cpp`. Note that \f$ p_0\f$ is initially inserted as an isolated point and later on connected to the other four vertices.
</b></center>
\cgal_figure_end
\advanced The following program shows how to construct the arrangement
depicted in Figure \ref arr_figex_4 using the specialized
depicted in \cgal_figure_ref{arr_figex_4} using the specialized
insertion functions that accept predecessor halfedges:
\cgalexample{Arrangement_on_surface_2/special_edge_insertion.cpp}
@ -962,16 +950,13 @@ selected point-location strategy.
\subsection arr_sssecpl_ex An Example
\anchor arr_figex_8
\image html ex_5.gif
<center><b>
\cgal_figure_begin{arr_figex_8,ex_5.gif}
The arrangement of line segments, as constructed in `point_location.cpp`, `vertical_ray_shooting.cpp`, and `batched_point_location.cpp`. The arrangement vertices are drawn as small discs, while the query points \f$ q_1, \ldots, q_6\f$ are marked with crosses.
</b></center>
\cgal_figure_end
The following program constructs a simple arrangement of five line
segments that form a pentagonal face, with a single isolated
vertex in its interior, as depicted in Figure \ref arr_figex_5
vertex in its interior, as depicted in \cgal_figure_ref{arr_figex_5}
(the arrangement construction is performed by the function
`construct_segment_arr()` whose listing is omitted here and
can be found in `point_location_utils.h`).
@ -1054,7 +1039,7 @@ void vertical_ray_shooting_query
The following program uses the auxiliary function listed above to
perform vertical ray-shooting queries on an arrangement.
The arrangement and the query points are exactly the same as in
`point_location.cpp` (see Figure \ref arr_figex_5):
`point_location.cpp` (see \cgal_figure_ref{arr_figex_5}):
\cgalexample{Arrangement_on_surface_2/vertical_ray_shooting.cpp}
@ -1246,11 +1231,9 @@ insertion operation may involve splitting curves.
\subsection arr_sssecinsert_ex An Example
\anchor arr_figex_10
\image html ex_8.gif
<center><b>
\cgal_figure_begin{arr_figex_10,ex_8.gif}
An arrangement of five intersecting line segments, as constructed in `incremental_insertion.cpp` and `aggregated_insertion.cpp`. The segment endpoints are marked by black disks and the arrangement vertices that correspond to intersection points are marked by circles. The query point \f$ q\f$ is marked with a cross and the face that contains it is shaded.
</b></center>
\cgal_figure_end
The program below constructs an arrangement of intersecting
@ -1259,7 +1242,7 @@ we use `insert_non_intersecting_curve()` to insert them into the
empty arrangement. The rest of the segments are inserted using
`insert()`. The resulting arrangement consists
of \f$ 13\f$ vertices, \f$ 16\f$ edges, and \f$ 5\f$ faces, as can be seen in
Figure \ref arr_figex_8.
\cgal_figure_ref{arr_figex_8}.
In the earlier examples, all arrangement vertices corresponded to
segment endpoints. In this example we have additional vertices that
@ -1358,7 +1341,7 @@ incremental insertion process. Naturally, this trade-off is irrelevant
in case of aggregated insertion as above.
The example below shows how to construct the arrangement of
line segments depicted in Figure \ref arr_figex_8 and built
line segments depicted in \cgal_figure_ref{arr_figex_8} and built
incrementally in `incremental_insertion.cpp`, as shown in the previous
section. We use the aggregated insertion function
`insert()` as we deal with line segments.
@ -1372,11 +1355,9 @@ arrangement, where we denote the number of edges in the arrangement by \f$ N\f$.
As a rule of thumb, if \f$ m = o(\sqrt{N})\f$, we insert the curves one by
one. For larger input sets, we use the aggregated insertion procedures.
\anchor arr_figex_unb1
\image html ex_10.gif
<center><b>
\cgal_figure_begin{arr_figex_unb1,ex_10.gif}
An arrangement of intersecting line segments, as constructed in `global_insertion.cpp`. The segments of \f$ {\mathcal S}_1\f$ are drawn in solid lines and the segments of \f$ {\mathcal S}_2\f$ are drawn in dark dashed lines. Note that the segment \f$ s\f$ (light dashed line) overlaps one of the segments in \f$ {\mathcal S}_1\f$.
</b></center>
\cgal_figure_end
In the example below we aggregately construct an arrangement of a set
\f$ {\mathcal S}_1\f$ containing five line segments. Then we insert a single
@ -1489,8 +1470,9 @@ endpoint of \f$ r\f$ is already associated with an arrangement vertex.
Other edge-manipulation functions can also be applied on edges
associated with unbounded curves.
\anchor arr_figunb_dcel
\image html ex_unb1.gif "An arrangement of unbounded linear objects, as constructed in unbounded_non_intersecting.cpp."
\cgal_figure_begin{arr_figunb_dcel,ex_unb1.gif}
An arrangement of unbounded linear objects, as constructed in unbounded_non_intersecting.cpp.
\cgal_figure_end
The following example demonstrates the use of the insertion function
for pairwise interior-disjoint unbounded curves. In this example
@ -1512,7 +1494,7 @@ Section \ref arr_sssecmf_insert_cv). Then, three additional rays are
inserted incrementally, using the insertion function for \f$ x\f$-monotone
curves whose interior is disjoint from all arrangement features.
Finally, the program prints the size of the arrangement (compare to
the illustration in Figure \ref arr_figex_unb1) and the outer
the illustration in \cgal_figure_ref{arr_figex_unb1}) and the outer
boundaries of its six unbounded faces:
\cgalexample{Arrangement_on_surface_2/unbounded_non_intersecting.cpp}
@ -1552,11 +1534,9 @@ exists. This implied that collinearity indeed exists as explained above.
\subsection arr_ssecunb_rep Representation of Unbounded Arrangements
\anchor typenormal
\image html unb_dcel.gif
<center><b>
\cgal_figure_begin{typenormal,unb_dcel.gif}
A \sc{Dcel} representing an arrangement of four lines. Halfedges are drawn as thin arrows. The vertices \f$ v_1, \ldots, v_8\f$ lie at infinity, and are not associated with valid points. The halfedges that connect them are fictitious, and are not associated with concrete curves. The face denoted \f$ f_0\f$ (lightly shaded) is the fictitious "unbounded face" which lies outside the bounding rectangle (dashed) that bounds the actual arrangement. The four fictitious vertices \f$ v_{\rm bl}, v_{\rm tl}, v_{\rm br}\f$ and \f$ v_{\rm tr}\f$ represent the four corners of the bounding rectangle.
</b></center>
\cgal_figure_end
Given a set \f$ \cal C\f$ of unbounded curves, a simple approach for
@ -1569,7 +1549,7 @@ straightforward to compute the arrangement induced by this set.
However, we would like to operate directly on the unbounded curves
without having to preprocess them. Therefore, we use an implicit
bounding rectangle embedded in the \sc{Dcel} structure.
Figure \ref arr_figunb_dcel shows the arrangement of four lines
\cgal_figure_ref{arr_figunb_dcel} shows the arrangement of four lines
that subdivide the plane into eight unbounded faces and two bounded
ones. Notice that in this case the unbounded faces have outer
boundaries, and the halfedges along these outer CCBs are drawn as
@ -1606,10 +1586,10 @@ bounding rectangle.
that is defined at \f$ x = -\infty\f$ or at \f$ x = \infty\f$. In case of
a horizontal line or a curve with a horizontal asymptote, the
\f$ y\f$-coordinate of the curve end may be finite (see for example the
vertices \f$ v_2\f$ and \f$ v_7\f$ in Figure \ref arr_figunb_dcel), but in
vertices \f$ v_2\f$ and \f$ v_7\f$ in \cgal_figure_ref{arr_figunb_dcel}), but in
general the curve end also goes to \f$ y = \pm\infty\f$ (see for instance
the vertices \f$ v_1\f$, \f$ v_3\f$, \f$ v_6\f$ and \f$ v_8\f$ in
Figure \ref arr_figunb_dcel). For our convenience, we will always
\cgal_figure_ref{arr_figunb_dcel}). For our convenience, we will always
take a "tall" enough bounding rectangle and treat such vertices as
lying on either the left or right rectangle edges (that is, if a curve
is defined at \f$ x = -\infty\f$, its left end will be represented by
@ -1621,7 +1601,7 @@ curve with a vertical asymptote (finite \f$ x\f$-coordinate and an
unbounded \f$ y\f$-coordinate). Such a vertex always lies on one of the
horizontal edges of the bounding rectangle (either the bottom one if
\f$ y = -\infty\f$, or the top one if \f$ y = \infty\f$). The vertices \f$ v_4\f$
and \f$ v_5\f$ in Figure \ref arr_figunb_dcel are of this type.
and \f$ v_5\f$ in \cgal_figure_ref{arr_figunb_dcel} are of this type.
<LI>The \anchor typefictitious fictitious vertices that represent the four corners of the
bounding bounding rectangle.
</OL>
@ -1638,7 +1618,7 @@ incident to any true vertex at infinity.
The nested types defined in the `Arrangement_2` class support the
following methods, in addition to the ones listed in
Section \ref arr_ssectraverse:
Section \ref arr_ssectraverse :
<UL>
<LI>The `Vertex` class provides three-valued predicates
`parameter_space_in_x()` and `parameter_space_in_y()`, which
@ -2053,20 +2033,9 @@ relatively small - then filtered computation incur only a minor
overhead compared to the floating-point arithmetic, while ensuring
the correctness of the computation results.
\anchor arr_figpredef_kernels
<center>
<table>
<tr><td><img src="fan_grids.gif" border=0 alt="fan grids"></td>
<td><img src="Europe.gif" border=0 alt="Europe"></td>
</tr>
<tr align="center"><td>(a)</td><td>(b)</td></tr>
</table>
<b>
\cgal_figure_begin{arr_figpredef_kernels,fan_grids.gif,Europe.gif}
(a) An arrangement of \f$ 104\f$ line segments from the input file `fan_grids.dat`. (b) An arrangement of more than \f$ 3000\f$ interior disjoint line segments, defined in the input file `Europe.dat`.
</b>
</center>
\cgal_figure_end
In the following example we use the predefined
`Exact_predicates_exact_constructions_kernel` for instantiating our
@ -2076,7 +2045,7 @@ coordinates from a file and computes their arrangement. By default it
opens the `fan_grids.dat` input-file, located in the examples folder,
which contains \f$ 104\f$ line segments that form four "fan-like" grids and
induce a dense arrangement, as illustrated in
Figure \ref arr_figpredef_kernels(a):
\cgal_figure_ref{arr_figpredef_kernels} (a):
\cgalexample{Arrangement_on_surface_2/predefined_kernel.cpp}
@ -2115,7 +2084,7 @@ arrangement.
By default, the example opens the `Europe.dat` input-file,
located in the examples folder, which contains more than \f$ 3000\f$ line segments
with floating-point coordinates that form the map of Europe, as depicted in
Figure \ref arr_figpredef_kernels(b):
\cgal_figure_ref{arr_figpredef_kernels} (b):
\cgalexample{Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp}
@ -2163,15 +2132,13 @@ from `Curve_2`. The points in an \f$ x\f$-monotone curve are
always stored in lexicographically increasing order of their
coordinates.
\anchor arr_figex_12
\image html ex_12.gif
<center><b>
\cgal_figure_begin{arr_figex_12,ex_12.gif}
An arrangement of three polylines, as constructed in `polylines.cpp`. Disks mark vertices associated with polyline endpoints, while circles mark vertices that correspond to intersection points. Note that \f$ \pi_2\f$ is split into three \f$ x\f$-monotone polylines, and that \f$ \pi_1\f$ and \f$ \pi_3\f$ have two overlapping sections.
</b></center>
\cgal_figure_end
The following example program constructs an arrangement of three
polylines, as depicted in Figure \ref arr_figex_12. Note that
polylines, as depicted in \cgal_figure_ref{arr_figex_12}. Note that
most points defining the polylines are not associated with arrangement
vertices. The arrangement vertices are either the extreme points of
each \f$ x\f$-monotone polyline or the intersection points between two
@ -2218,15 +2185,13 @@ is <I>not</I> the same as the `Kernel::Point_2` type, which is capable of
representing a point with rational coordinates. The coordinates of a
point are represented using the nested `CoordNT` number-type.
\anchor arr_figex_13
\image html ex_13.gif
<center><b>
\cgal_figure_begin{arr_figex_13,ex_13.gif}
An arrangement of three circles constructed in `circles.cpp`. Each circle is split into two \f$ x\f$-monotone circular arcs, whose endpoints are drawn as disks. Circles mark vertices that correspond to intersection points. The vertex \f$ v_{\rm max}\f$ is a common intersection point of all three circles.
</b></center>
\cgal_figure_end
In the following example an arrangement of three full circles is
constructed, as shown in Figure \ref arr_figex_13. Then, the vertex
constructed, as shown in \cgal_figure_ref{arr_figex_13}. Then, the vertex
of maximal degree is searched for. The geometric mapping of this
vertex is the point \f$ (4,3)\f$, as all three circles intersect at this point
and the associated vertex has six incident edges:
@ -2375,13 +2340,14 @@ also support basic access functions such as `source()`,
\subsection Arrangement_on_surface_2ExamplesforArrangements Examples for Arrangements of Conics
\anchor arr_figex_14
\image html ex_14.gif "An arrangement of mixed conic arcs, as constructed in conics.cpp"
\cgal_figure_begin{arr_figex_14,ex_14.gif}
An arrangement of mixed conic arcs, as constructed in conics.cpp
\cgal_figure_end
The following example demonstrates the usage of the various
constructors for conic arcs. The resulting arrangement is depicted
in Figure \ref arr_figex_14. Especially noteworthy are the
in \cgal_figure_ref{arr_figex_14}. Especially noteworthy are the
constructor of a circular arc that accepts three points and the
constructor that allows specifying approximate endpoints, where the
exact endpoints are given explicitly as intersections of
@ -2486,22 +2452,24 @@ providing the coefficients of \f$ P'\f$ and \f$ Q'\f$ to the constructor. In thi
case the constructor normalizes the coefficients and stores the desired
polynomials \f$ P\f$ and \f$ Q\f$.
\anchor arr_figex_16
\image html ex_16.gif "An arrangement of four arcs of rational functions, as constructed in rational_functions.cpp."
\cgal_figure_begin{arr_figex_16,ex_16.gif}
An arrangement of four arcs of rational functions, as constructed in rational_functions.cpp.
\cgal_figure_end
The following example demonstrates the construction of an
arrangement of rational arcs depicted in
Figure \ref arr_figex_16. Note the usage of the two
\cgal_figure_ref{arr_figex_16}. Note the usage of the two
constructors, for polynomial arcs and for rational arcs:
\cgalexample{Arrangement_on_surface_2/rational_functions.cpp}
\anchor arr_figex_unb_rat
\image html ex_unb_rat.gif "An arrangement of six arcs of rational functions, as constructed in unbounded_rational_functions.cpp"
\cgal_figure_begin{arr_figex_unb_rat,ex_unb_rat.gif}
An arrangement of six arcs of rational functions, as constructed in unbounded_rational_functions.cpp
\cgal_figure_end
The following example demonstrates the construction of an
arrangement of six rational arcs - four unbounded arcs and two
bounded ones - as depicted in Figure \ref arr_figex_unb_rat. Note
bounded ones - as depicted in \cgal_figure_ref{arr_figex_unb_rat}. Note
the usage of the constructors of an entire rational function and of
an infinite "ray" of such a function. Also observe that the hyperbolas
\f$ y = \pm\frac{1}{x}\f$ and \f$ y = \pm\frac{1}{2x}\f$ never intersect, although
@ -2558,11 +2526,9 @@ The `Arr_Bezier_curve_traits_2` is a model of the
to use the landmark point-location strategy for arrangements of
rational arcs).
\anchor arr_figex_bez
\image html Bezier_arr.gif
<center><b>
\cgal_figure_begin{arr_figex_bez,Bezier_arr.gif}
An arrangement of ten B&eacute;zier curves of degree \f$ 5\f$, as constructed in `Bezier_curves.cpp`.
</b></center>
\cgal_figure_end
The following example reads a set of B&eacute;zier curves from an input
@ -2571,7 +2537,7 @@ of control points, followed by the sequence of control points, given
in integer or rational coordinates. By default, the program uses
the `Bezier.dat` file, which contains ten curves of degree \f$ 5\f$
each; their resulting arrangement is depicted in
Figure \ref arr_figex_bez.
\cgal_figure_ref{arr_figex_bez}.
\cgalexample{Arrangement_on_surface_2/Bezier_curves.cpp}
@ -2610,14 +2576,12 @@ This polynomial type is also available by the traits class
and constitutes a valid model
of the concept `Polynomial_d` with two variables (see ??).
\anchor arr_figex_alg_curves
\image html algebraic_curves.gif
<center><b>
\cgal_figure_begin{arr_figex_alg_curves,algebraic_curves.gif}
An arrangement of algebraic curves of degrees \f$ 1\f$, \f$ 2\f$, \f$ 3\f$, and \f$ 6\f$, as constructed in `algebraic_curves.cpp`.
</b></center>
\cgal_figure_end
The following examples computes the arrangement induced by the four curves
in Figure \ref arr_figex_alg_curves
in \cgal_figure_ref{arr_figex_alg_curves}
\cgalexample{Arrangement_on_surface_2/algebraic_curves.cpp}
@ -2661,16 +2625,14 @@ Between two consecutive critical \f$ x\f$-coordinates, the curve decomposes
into a finite number of \f$ x\f$-monotone segments (the same is true on the left
of the leftmost, and on the right of the rightmost critical \f$ x\f$-coordinate).
The type `X_monotone_curve_2` is only able to represent such segments
(and sub-segments of them). See Figure \ref arr_figcylindrical_decomposition
(and sub-segments of them). See \cgal_figure_ref{arr_figcylindrical_decomposition}
for an example of a decomposition into terminal segments. Formally,
a terminal segment is a weakly \f$ x\f$-monotone segment that is either vertical, or
its \f$ x\f$-range contains no critical point in its interior.
\anchor arr_figcylindrical_decomposition
\image html cylindrical_decomposition.gif
<center><b>
\cgal_figure_begin{arr_figcylindrical_decomposition,cylindrical_decomposition.gif}
The critical \f$ x\f$-coordinates of an algebraic curve (dashed lines), and its decomposition into terminal segments (in different colors). The segment from \f$ p\f$ to \f$ q\f$ consists of the union of three terminal segments.
</b></center>
\cgal_figure_end
Coordinates of points are represented by the type `Algebraic_real_1`,
@ -2685,7 +2647,7 @@ One can construct an object of type `Point_2` by a triple
(\f$ x_0\f$,cv,i), which means that the \f$ i\f$-th point (counted from below)
in the fiber of cv at the \f$ x\f$-coordinate \f$ x_0\f$ is constructed.
This is also how points are presented internally.
In the example displayed in Figure \ref arr_figcylindrical_decomposition,
In the example displayed in \cgal_figure_ref{arr_figcylindrical_decomposition},
if \f$ x_1\f$ denotes the \f$ x\f$-coordinate of \f$ p\f$, and \f$ cv\f$ represents the algebraic
curve, then \f$ p\f$ could be represented by \f$ (x_1,cv,3)\f$. If \f$ x_2\f$
is the \f$ x\f$-coordinate of \f$ q\f$,
@ -2695,15 +2657,13 @@ we recommend to be careful with that option, since computing an explicit
representation of the \f$ y\f$-coordinate as an `Algebraic_real_1` object
can become rather expensive.
\anchor arr_figex_alg_segments
\image html algebraic_segments.gif
<center><b>
\cgal_figure_begin{arr_figex_alg_segments,algebraic_segments.gif}
An arrangement of algebraic segments (solid lines), as constructed in `algebraic_segments.cpp`. The supporting curves are drawn in dashed lines.
</b></center>
\cgal_figure_end
The following code exemplifies various methods to construct
algebraic segments. The computed arrangement is displayed in
Figure \ref arr_figex_alg_segments.
\cgal_figure_ref{arr_figex_alg_segments}.
\cgalexample{Arrangement_on_surface_2/algebraic_segments.cpp}
@ -2782,29 +2742,25 @@ the consolidated set \f$ S_1 \cup S_2\f$.
\subsection Arrangement_on_surface_2Examples Examples
\anchor arr_figex_17
\image html ex_17.gif
<center><b>
\cgal_figure_begin{arr_figex_17,ex_17.gif}
An arrangement of six red and blue segments, as constructed in `consolidated_curve_data.cpp`. Disks correspond to red-blue intersection points, while circles mark the endpoints of red-blue overlaps.
</b></center>
\cgal_figure_end
In the following example, we use `Arr_segment_traits_2` as our
base-traits class, attaching an additional <I>color</I> field to
the segments using the consolidated curve-data traits class. A
color may be either <I>blue</I> or <I>red</I>. Having constructed
the arrangement of colored segments, as depicted in
Figure \ref arr_figex_17, we detect the vertices that have incident
\cgal_figure_ref{arr_figex_17}, we detect the vertices that have incident
edges mapped to both blue and red segments. Thus, they correspond
to red-blue intersection points. We also locate the edge that
corresponds to overlaps between red and blue line segments:
\cgalexample{Arrangement_on_surface_2/consolidated_curve_data.cpp}
\anchor arr_figex_18
\image html ex_18.gif
<center><b>
\cgal_figure_begin{arr_figex_18,ex_18.gif}
An arrangement of four polylines, named A-D, as constructed in `generic_curve_data.cpp`.
</b></center>
\cgal_figure_end
In the following example, we use `Arr_polyline_traits_2` as
our base-traits class, attaching an additional <I>name</I> field to
@ -2929,18 +2885,16 @@ classes, by inheriting from the base observer class and overriding
the relevant notification functions, as required by their
applications.
\anchor arr_figex_19
\image html ex_19.gif
<center><b>
\cgal_figure_begin{arr_figex_19,ex_19.gif}
An arrangement of five line segments, as constructed in `observer.cpp`. The halfedge \f$ e_v\f$ (dashed) is eventually removed, so that the final arrangement consists of four faces (one unbounded and three bounded ones).
</b></center>
\cgal_figure_end
The following example shows how to define and use an observer
class. The observer in the example keeps track of the arrangement
faces, and prints a message whenever a face is split into two due
to the insertion of an edge, and whenever two faces merge into one
due to the removal of an edge. The layout of the arrangement is
depicted in Figure \ref arr_figex_19:
depicted in \cgal_figure_ref{arr_figex_19} :
\cgalexample{Arrangement_on_surface_2/observer.cpp}
@ -2994,15 +2948,13 @@ with another face). In such cases one can use an arrangement observer
tailored for this task, which receives updates whenever a face is
modified and sets its data field accordingly.
\anchor arr_figex_20
\image html ex_20.gif
<center><b>
\cgal_figure_begin{arr_figex_20,ex_20.gif}
An arrangement of six line segments, as constructed in `face_extension.cpp` and `dcel_extension.cpp` (in `dcel_extension.cpp` we treat the segments as directed, so they are drawn as arrows directed from the source to the target). The indices associated with the halfedges in `face_extension.cpp` are shown in brackets.
</b></center>
\cgal_figure_end
The next example constructs an arrangement that contains seven bounded
faces induced by six line segments (see Figure \ref arr_figex_20). An
faces induced by six line segments (see \cgal_figure_ref{arr_figex_20}). An
observer gets notified each time a new face \f$ f\f$ is created and it associates
\f$ f\f$ with a running index, (where the index of the unbounded face
is 0). As a result, the faces are numbered according to their creation
@ -3033,7 +2985,7 @@ direction of its associated segment (in this example segments are
treated as directed objects). Each face is also extended to store the
size of its outer boundary.
The constructed arrangement, depicted in Figure \ref arr_figex_20, is
The constructed arrangement, depicted in \cgal_figure_ref{arr_figex_20}, is
similar to the arrangement constructed in the previous example.
Note that all auxiliary data fields are set during the construction phase.
Also note that the data fields are properly maintained when the arrangement
@ -3130,14 +3082,12 @@ concept. The details of this concept are given in the Reference Manual.
\subsection arr_ssecsimp_ovl Example for a Simple Overlay
\anchor arr_figex_22
\image html ex_22.gif
<center><b>
\cgal_figure_begin{arr_figex_22,ex_22.gif}
Overlaying two simple arrangements of line segments, as done in `overlay.cpp` and `ex_face_extension_overlay.cpp`. In `face_extension_overlay.cpp` the two bounded faces are considered as <I>marked</I>, and the octagonal face which is the intersection of the two marked faces is denoted by \f$ f_0\f$.
</b></center>
\cgal_figure_end
The next program constructs two simple arrangements, as depicted in
Figure \ref arr_figex_22 and computes their overlay:
\cgal_figure_ref{arr_figex_22} and computes their overlay:
\cgalexample{Arrangement_on_surface_2/overlay.cpp}
@ -3155,7 +3105,7 @@ arrangements. Namely, it is part of the intersection of the two polygons.
The example computes the intersection between a square and a rhombus, (which is
actually also a square). The resulting polygon is an octagon, denoted
by \f$ f_0\f$ in Figure \ref arr_figex_22:
by \f$ f_0\f$ in \cgal_figure_ref{arr_figex_22} :
\cgalexample{Arrangement_on_surface_2/face_extension_overlay.cpp}
@ -3307,14 +3257,12 @@ the details).
\subsection arr_ssecarr_hist_ex Examples
\anchor arr_figex_24
\image html ex_24.gif
<center><b>
\cgal_figure_begin{arr_figex_24,ex_24.gif}
An arrangement with history as constructed in `curve_history.cpp`. Note that \f$ s_1\f$ and \f$ s_3\f$ overlap over two edges. The point-location query points are drawn as lightly shaded dots.
</b></center>
\cgal_figure_end
In the following example we construct a simple arrangement of six line
segments, as depicted in Figure \ref arr_figex_24, while maintaining
segments, as depicted in \cgal_figure_ref{arr_figex_24}, while maintaining
the curve history. The example demonstrates the usage of the special
traversal functions. It also shows how to issue point-location queries
on the resulting arrangement, using the auxiliary function
@ -3323,16 +3271,14 @@ on the resulting arrangement, using the auxiliary function
\cgalexample{Arrangement_on_surface_2/curve_history.cpp}
\anchor arr_figex_25
\image html ex_25.gif
<center><b>
\cgal_figure_begin{arr_figex_25,ex_25.gif}
An arrangement with history of nine circle as constructed in `edge_manipulation_curve_history.cpp`. Note the vertical tangency points of \f$ C_0\f$, marked as dark dots, which subdivide this circle into an upper half and a lower half, each consists of 9 edges. The large circle \f$ C_0\f$ is eventually removed from the arrangement, with all 18 edges it induces.
</b></center>
\cgal_figure_end
The following example demonstrates the usage of the free `remove()`
function. We construct an arrangement of nine circles, while keeping a handle
to each inserted circle. We then remove the large circle \f$ C_0\f$, which induces
\f$ 18\f$ edges, as depicted in Figure \ref arr_figex_25. The example also shows
\f$ 18\f$ edges, as depicted in \cgal_figure_ref{arr_figex_25}. The example also shows
how to use the `split_edge()` and `merge_edge()` functions when
operating on an arrangement-with-history instance:
@ -3375,7 +3321,7 @@ Thus, only arrangements of line segments or of polylines can be written or
read.
The following example constructs the arrangement depicted in
Figure \ref arr_figex_5 and writes it to an output file. It also
\cgal_figure_ref{arr_figex_5} and writes it to an output file. It also
demonstrates how to re-read the arrangement from a file:
\cgalexample{Arrangement_on_surface_2/io.cpp}
@ -3421,7 +3367,7 @@ and faces, provided that the `VertexData`, `HalfedgeData` and
\advanced The following example constructs the same arrangement as the
example `dcel_extension` does
(see Section \ref arr_ssecex_dcel_all), depicted in
Figure \ref arr_figex_20, and writes it to an output file. It also
\cgal_figure_ref{arr_figex_20}, and writes it to an output file. It also
demonstrates how to re-read the arrangement from a file:
\cgalexample{Arrangement_on_surface_2/dcel_extension_io.cpp}
@ -3453,7 +3399,7 @@ types - support the `<<` and`>>` operators.
The following example constructs the same arrangement as example
`curve_history` does
(see Section \ref arr_ssecarr_hist_ex), depicted in
Figure \ref arr_figex_24, and writes it to an output file. It also
\cgal_figure_ref{arr_figex_24}, and writes it to an output file. It also
demonstrates how to re-read the arrangement-with-history from a file:
\cgalexample{Arrangement_on_surface_2/io_curve_history.cpp}
@ -3564,14 +3510,12 @@ kept synchronized with the number of vertices in the arrangement, so it
should not be reused in calls to <span class="textsc">bgl</span> functions in case the arrangement
is modified in between these calls.
\anchor arr_figex_bgl
\image html ex_bgl.gif
<center><b>
\cgal_figure_begin{arr_figex_bgl,ex_bgl.gif}
An arrangement of 7 line segments, as constructed by `bgl_primal_adapter.cpp` and `bgl_dual_adapter.cpp`. The breadth-first visit times for the arrangement faces, starting from the unbounded face \f$ f_0\f$, are shown is brackets.
</b></center>
\cgal_figure_end
In the following example we construct an arrangement of 7 line segments,
as shown in Figure \ref arr_figex_bgl,
as shown in \cgal_figure_ref{arr_figex_bgl},
then use Dijkstra's shortest-paths algorithm from the <span class="textsc">bgl</span> to compute
the graph distance of all vertices from the leftmost vertex in the
arrangement \f$ v_0\f$. Note the usage of the `Arr_vertex_index_map` and
@ -3608,7 +3552,7 @@ efficient mapping of face handles to indices. We also provide the template
data with the arrangement faces.
In the following example we construct the same arrangement as in
example `bgl_primal_adapter.cpp` (see Figure \ref arr_figex_bgl),
example `bgl_primal_adapter.cpp` (see \cgal_figure_ref{arr_figex_bgl}),
and perform breadth-first search on the graph faces, starting from the
unbounded face. We extend the \sc{Dcel} faces
with an unsigned integer, marking the discover time of the face and use a

View File

@ -41,10 +41,11 @@ intersection points induced by these curves.
\section Sweep_line_2Example Example
The simple program listed below computes intersection points induced by
a set of four input segments illustrated in figure \ref SL_secsimple.
a set of four input segments illustrated in \cgal_figure_ref{SL_secsimple}.
\anchor SL_secsimple
\image html sl_simple.gif "Four input segments"
\cgal_figure_begin{SL_secsimple,sl_simple.gif}
Four input segments
\cgal_figure_end
\cgalexample{Arrangement_on_surface_2/sweep_line.cpp}

View File

@ -284,14 +284,12 @@ kept synchronized with the number of vertices in the arrangement, so it
should not be reused in calls to \sc{Bgl} functions in case the arrangement
is modified in between these calls.
\anchor figex_bgl
\image html ex_bgl.gif
<center><b>
\cgal_figure_begin{figex_bgl,ex_bgl.gif}
An arrangement of 7 line segments, as constructed by `ex_bgl_primal_adapter.cpp` and `ex_bgl_dual_adapter.cpp`. The breadth-first visit times for the arrangement faces, starting from the unbounded face \f$ f_0\f$, are shown is brackets.
</b></center>
\cgal_figure_end
In the following example we construct an arrangement of 7 line segments,
as shown in Figure \ref figex_bgl,
as shown in \cgal_figure_ref{figex_bgl},
then use Dijkstra's shortest-paths algorithm from the \sc{Bgl} to compute
the graph distance of all vertices from the leftmost vertex in the
arrangement \f$ v_0\f$. Note the usage of the `Arr_vertex_index_map` and
@ -328,7 +326,7 @@ efficient mapping of face handles to indices. We also provide the template
data with the arrangement faces.
In the following example we construct the same arrangement as in
example `ex_bgl_primal_adapter.cpp` (see Figure \ref arr_figex_bgl),
example `ex_bgl_primal_adapter.cpp` (see \cgal_figure_ref{arr_figex_bgl}),
and perform breadth-first search on the graph faces, starting from the
unbounded face. We extend the \sc{Dcel} faces
with an unsigned integer, marking the discover time of the face and use a

View File

@ -11,13 +11,15 @@ namespace CGAL {
\section bso_secintro Introduction
\image html teaser.gif "Examples of Boolean set-operations on general polygons."
\cgal_figure_begin{figteaser,teaser.gif}
Examples of Boolean set-operations on general polygons.
\cgal_figure_end
This package consists of the implementation of Boolean set-operations
on point sets bounded by weakly \f$ x\f$-monotone curves\footnote{A continuous planar curve \f$ C\f$ is <I>weakly \f$ x\f$-monotone</I> if every vertical line intersects it at most once, or if it is vertical. Hereafter we refer to weakly \f$ x\f$-monotone curves as \f$ x\f$-monotone curves.} in 2-dimensional Euclidean space. In particular,
it contains the implementation of <I>regularized</I> Boolean set-operations,
intersection predicates, and point containment predicates.
Figure \ref figteaser shows simple examples of such operations.
\cgal_figure_ref{figteaser} shows simple examples of such operations.
Ordinary Boolean set-operations, which distinguish between the
interior and the boundary of a polygon, are not implemented within this
@ -60,8 +62,9 @@ can be arbitrary weakly \f$ x\f$-monotone curves.
\section bso_secbso_def Terms and Definitions
\anchor figsimpleDefsExamples
\image html simpleDefsExamples.gif "Examples of polygons. (a) A simple polygon. (b) A relatively simple polygon (c) A polygon that is neither simple nor relatively simple."
\cgal_figure_begin{simpleDefsExamples,simpleDefsExamples.gif}
Examples of polygons. (a) A simple polygon. (b) A relatively simple polygon (c) A polygon that is neither simple nor relatively simple.
\cgal_figure_end
<UL>
@ -173,7 +176,6 @@ following sections.
\subsection Boolean_set_operations_2ASimpleExample A Simple Example
\anchor figexample
\image html triangles.gif
Testing whether two polygons intersect results with a Boolean value,
@ -192,17 +194,17 @@ which is located in the header file `print_utils.h`.
\subsection bso_ssecpolygons_with_holes Polygons with Holes
\anchor figsimple
\image html simple.gif "Operations on simple polygons. (a) The union of two polygons, resulting in a point set whose outer boundary is defined by a simple polygon and contains a polygonal hole in its interior. (b) The intersection (darkly shaded) of two polygons (lightly shaded), resulting in two disjoint polygons. (c) The complement (darkly shaded) of a simple polygon (lightly shaded)."
\cgal_figure_begin{figsimple,simple.gif}
Operations on simple polygons. (a) The union of two polygons, resulting in a point set whose outer boundary is defined by a simple polygon and contains a polygonal hole in its interior. (b) The intersection (darkly shaded) of two polygons (lightly shaded), resulting in two disjoint polygons. (c) The complement (darkly shaded) of a simple polygon (lightly shaded).
\cgal_figure_end
In many cases a binary operation that operates on two simple
polygons that have no holes may result in a set of polygons that
contain holes in their interior (see Figure \ref figsimple (a)),
or a set of disjoint polygons (see Figure \ref figsimple (b); a similar
contain holes in their interior (see \cgal_figure_ref{figsimple} (a)),
or a set of disjoint polygons (see \cgal_figure_ref{figsimple} (b); a similar
set may result from the union, or the symmetric difference, of two disjoint
polygons). Moreover, the complement of a simple polygon is an unbounded set
that contains a hole; see Figure \ref figsimple (c).
that contains a hole; see \cgal_figure_ref{figsimple} (c).
Regular sets are closed under regularized Boolean set-operations.
These operations accept as input, and may result as output, polygons
@ -226,7 +228,6 @@ related to the definition of regularized Boolean set-operations, being
the closure of the interior of the corresponding ordinary operation as
explained next.
\anchor figunique
\image html unique.gif
Consider, for example, the regular set depicted on the right, which is
@ -311,7 +312,7 @@ output polygons to its associated container.
The following example demonstrates the usage of the free functions
`join()` and `intersection()` for computing the union and the
intersection of the two simple polygons depicted in
Figure \ref figsimple (b). The example uses the auxiliary function
\cgal_figure_ref{figsimple} (b). The example uses the auxiliary function
`print_polygon_with_holes()` listed above, which is located in
the header file `print_utils.h` under the examples folder.
@ -328,7 +329,6 @@ on simple polygons. The only exception is `complement(P, oi)`, which
outputs a range of polygons with holes that represents the complement
of the polygon with holes \f$ P\f$.
\anchor figsym_diff
\image html symm_diff.gif
The following example demonstrates how to compute the symmetric
@ -420,12 +420,11 @@ representation for some operation, and the reconstruction of the
internal representation for the succeeding operation could be time
consuming.
\anchor figsequence
\image html sequence.gif
The next example performs a sequence of three Boolean set-operations.
First, it computes the union of two simple polygons depicted in
Figure \ref figsimple (a). It then computes the complement of the result
\cgal_figure_ref{figsimple} (a). It then computes the complement of the result
of the union operation. Finally, it computes the intersection of the result
of the complement operation with a rectangle, confining the final result to
the area of the rectangle. The resulting set \f$ S\f$ is comprised of two
@ -517,7 +516,6 @@ S.join (begin, end);
\section bso_secbso_gen Boolean Set-Operations on General Polygons
\anchor figgeneral_polygon
\image general_polygon.gif
In previous sections only ordinary (linear) polygons were dealt with. Namely, closed
@ -544,7 +542,6 @@ defines the \f$ k\f$th polygon vertex.
edges of a general polygon.
</UL>
\anchor figgeneral_polygon_with_holes
\image html general_polygon_with_holes.gif
The concept `GeneralPolygonWithHoles_2` is defined in an analogous
@ -655,7 +652,6 @@ The circle-segment traits class provides predicates and constructions
on non-linear objects; yet, it uses only rational arithmetic and is
very efficient as a consequence.
\anchor figcircle_recs
\image html circles_rects.gif
The following example uses the `Gps_circle_segment_traits_2` class
@ -723,7 +719,6 @@ typedef CGAL::Gps_traits_2<Arr_traits_2, General_polygon_2> Traits_2;
typedef CGAL::General_polygon_set_2<Traits_2> General_polygon_set_2;
\endcode
\anchor figconics
\image html tnr_m_g.gif
Instantiating the arrangement-traits `Arr_traits_2` above with the
@ -766,7 +761,6 @@ is of the same order of magnitude as the complexity of the result. If
this is not the case, computing the result incrementally may prove
faster.
\anchor figdisks
\image html disks.gif
The next example computes the union of eight unit discs whose centers are

View File

@ -381,14 +381,15 @@ box intersection is reported to an empty dummy callback.
For each box set, a near-optimal cutoff parameter is determined using
an adaptive approximation. The runtime required for streaming is
compared against usual scanning. Results on a Xeon 2.4GHz with 4GB
main memory can be seen in Figure \ref fig_benchmark. For a small
main memory can be seen in \cgal_figure_ref{fig_benchmark}. For a small
number of boxes, pure scanning is still faster than streaming with
optimal cutoff, which would just delegate the box sets to the scanning
algorithm. As there are more and more boxes, the overhead becomes less
important.
\anchor fig_benchmark
\image html benchmark.gif "Runtime comparison between the scanning and the streaming algorithm."
\cgal_figure_begin{fig_benchmark,benchmark.gif}
Runtime comparison between the scanning and the streaming algorithm.
\cgal_figure_end
\section Box_intersection_dExample_3 Example Using a Custom Box Implementation

View File

@ -79,13 +79,10 @@ of the line passing through the poles. A vector \f$ M\f$ whose direction is diff
line defines a unique meridian on that sphere. The plane of that meridian is defined by the
direction of \f$ M\f$ and the two poles. The sense of \f$ M\f$ disambiguates the choice among the
pair of meridians thus defined.
On Fig. \ref figdefmeridian, the normal vectors \f$ n_0\f$ and \f$ n_1\f$ define
On \cgal_figure_ref{figdefmeridian}, the normal vectors \f$ n_0\f$ and \f$ n_1\f$ define
two meridians of \f$ S\f$: the circular arcs \f$ A_0\f$ and \f$ A_1\f$ respectively.
\anchor figdefmeridian
\image html def_meridian.png
<center><b>
\cgal_figure_begin{figdefmeridian,def_meridian.png}
Definition of two meridians on \f$ S\f$, a sphere of center \f$
c\f$. The intersection of the plane \f$ P\f$ (passing through the two
poles of \f$ S\f$) and the sphere \f$ S\f$ is a circle. The two poles
@ -93,7 +90,7 @@ of \f$ S\f$ split that circle into two circular arcs \f$ A_0\f$ and
\f$ A_1\f$, each being a meridian of \f$ S\f$. The \f$
\theta\f$-coordinates of meridians \f$ A_0\f$ and \f$ A_1\f$ are \f$
\theta_0\f$ and \f$ \theta_1= \theta_0 + \pi\f$ respectively.
</b></center>
\cgal_figure_end
<I>Types of circles on a sphere.</I>
Given a sphere, a circle on that sphere is termed
@ -101,13 +98,11 @@ Given a sphere, a circle on that sphere is termed
it goes through the two poles of that sphere and <I>threaded</I> if
it separates the sphere into two connected components, each
containing one pole. Any other circle is termed <I>normal</I>. These
definitions are illustrated on Fig. \ref figdefcircles.
definitions are illustrated on \cgal_figure_ref{figdefcircles}.
\anchor figdefcircles
\image html def_circles_extreme_pt.png
<center><b>
\cgal_figure_begin{figdefcircles,def_circles_extreme_pt.png}
The four types of circles on a sphere. Black dots are the \f$ \theta\f$-extremal points.
</b></center>
\cgal_figure_end
<I>\f$ \theta\f$-extremal points.</I>
Given a sphere one has:

View File

@ -7,7 +7,7 @@ Inserts a 0-cell in the 1-cell containing `dh`.
Returns a handle on one dart belonging to the new 0-cell.
\pre `CMap::dimension`\f$ \geq\f$ 1 and `*dh`\f$ \in\f$`cm.darts()`.
See example in Figure \ref figinsertvertex.
See example in \cgal_figure_ref{figinsertvertex}.
If 1-attributes are non void,
`Attribute_type<1>::type::On_split`(<I>a</I>,<I>a'</I>) is called, with <I>a</I> the original 1-attribute associated
@ -36,7 +36,7 @@ The 2-cell is split in triangles, one for each initial edge of the facet.
Returns a handle on one dart belonging to the new 0-cell.
\pre `CMap::dimension`\f$ \geq\f$ 2 and `*dh`\f$ \in\f$`cm.darts()`.
See example in Figure \ref figtriangulate.
See example in \cgal_figure_ref{figtriangulate}.
If 2-attributes are non void,
`Attribute_type<2>::type::On_split`(<I>a</I>,<I>a'</I>) is called, with <I>a</I> the original 2-attribute associated
@ -66,7 +66,7 @@ Inserts a 1-cell in the 2-cell containing `dh1` and `dh2`.
Returns \f$ \beta_0\f$(`dh1`), a handle on one dart belonging to the new 1-cell.
\pre `is_insertable_cell_1_in_cell_2<Map>(cm,dh1,dh2)`.
See example in Figure \ref figinsertedge.
See example in \cgal_figure_ref{figinsertedge}.
If 2-attributes are non void,
`Attribute_type<2>::type::On_split`(<I>a</I>,<I>a'</I>) is called, with <I>a</I> the original 2-attribute associated
@ -98,7 +98,7 @@ by the range `[afirst,alast)`.
Returns a handle on one dart belonging to the new 2-cell.
\pre `is_insertable_cell_2_in_cell_3<Map>(cm,afirst,alast)`.
See example in Figure \ref figinsertface.
See example in \cgal_figure_ref{figinsertface}.
If 3-attributes are non void,
`Attribute_type<3>::type::On_split`(<I>a</I>,<I>a'</I>) is called, with <I>a</I> the original 3-attribute associated
@ -130,7 +130,7 @@ being attached only by one of its extremity to the 0-cell containing `dh`.
Returns a handle on one dart belonging to the new 1-cell.
\pre `CMap::dimension`\f$ \geq\f$ 2 and `*dh`\f$ \in\f$`cm.darts()`.
See example in Figure \ref figinsertedge.
See example in \cgal_figure_ref{figinsertedge}.
\sa `CGAL::insert_cell_0_in_cell_1<CMap>`
@ -224,7 +224,7 @@ Removes the <I>i</I>-cell containing `dh`.
Returns the number of darts removed from `cm`.
\pre `is_removable<CMap,i>(cm,dh)`.
See examples in Figures \ref figinsertvertex, \ref figinsertedge and \ref figinsertface.
See examples in \cgal_figure_ref{figinsertvertex}, \cgal_figure_ref{figinsertedge} and \cgal_figure_ref{figinsertface}.
If `i`\f$ <\f$`CMap::dimension`, and <I>i+1</I>-attributes are
non void, and if there are two distinct (<I>i+1</I>)-cells around dart

View File

@ -32,13 +32,12 @@ to the other cell, such that each cell of the path (except the first
one) belongs to the boundary of the previous cell in the path. Two
<I>i</I>-cells <I>c3</I> and <I>c4</I> are <I>adjacent</I> if there is
an <I>(i-1)</I>-cell incident to both <I>c3</I> and <I>c4</I>. You can
see an example of a 2D object and a 3D object in \ref
figure1 "Figure 1" showing some cells of the subdivision and some
see an example of a 2D object and a 3D object in \cgal_figure_ref{figexemple3Dmanifold}
showing some cells of the subdivision and some
adjacency and incidence relations.
\anchor figure1
\image html objects2d-3d.png
<center><b>Figure 1: Example of subdivided objects that can be
\cgal_figure_begin{figexemple3Dmanifold,objects2d-3d.png}
Example of subdivided objects that can be
described by combinatorial maps. Left: A 2D object composed of
three facets (2-cells), named <I>f1</I>, <I>f2</I> and <I>f3</I>, nine
edges (1-cells) and seven vertices (0-cells). <I>f1</I> and <I>f2</I>
@ -56,7 +55,8 @@ similarly between <I>vol1</I> and <I>vol3</I> and <I>vol2</I> and
<I>vol2</I>. Edge <I>e4</I> is incident to the three facets between
<I>vol1</I> and <I>vol2</I>, <I>vol1</I> and <I>vol3</I>, and
<I>vol2</I> and <I>vol3</I>. <I>e4</I> is also incident to the three
volumes by transitivity. </b></center>
volumes by transitivity.
\cgal_figure_end
A combinatorial map is an edge-centered data structure describing the
cells and the incidence and adjacency relations, using only one basic
@ -66,21 +66,19 @@ together with a part of incident cells of dimensions 0, 2, 3, ...,
<I>d</I>. When a dart <I>d0</I> describes a part of an
<I>i</I>-cell <I>c</I>, we say that <I>d0</I> <I>belongs</I> to
<I>c</I>, and that <I>c</I> <I>contains</I> <I>d0</I>. Let us look at
the example in \ref figure2 "Figure 2" showing the 2D and 3D
combinatorial maps describing the two objects given in \ref
figure1 "Figure 1".
the example in \cgal_figure_ref{figexemplecombimaps} showing the 2D and 3D
combinatorial maps describing the two objects given in
\cgal_figure_ref{figexemple3Dmanifold}.
\anchor figure2
\image html cmaps2d-3d.png
<center><b>
Figure 2: Combinatorial maps representing the objects given in \ref
figure1 "Figure 1". Left: The 2D combinatorial map which
\cgal_figure_begin{figexemplecombimaps,cmaps2d-3d.png}
Combinatorial maps representing the objects given in
\cgal_figure_ref{figexemple3Dmanifold}. Left: The 2D combinatorial map which
contains 12 darts. Right: The 3D combinatorial map which
contains 54 darts (18 for each volume).
</b></center>
\cgal_figure_end
First let us start in 2D (\ref figure2 "Figure 2" (Left)).
First let us start in 2D (\cgal_figure_ref{figexemplecombimaps} (Left)).
Facet <I>f1</I> is described by four darts. These darts are linked
together with pointers. Starting from a dart and following a \f$
\beta_1\f$ pointer, we get to a dart which belongs to the same facet
@ -106,12 +104,12 @@ a dart belonging to the same vertex (if we do not start by following a
The main interest of combinatorial map definition based on darts and
\f$ \beta_i\f$ pointers is to be able to increase the dimension "only" by
adding new pointers. We can verify this fact by studying the 3D
example (\ref figure2 "Figure 2" (Right)). In addition to
example (\cgal_figure_ref{figexemplecombimaps} (Right)). In addition to
\f$ \beta_1\f$ and \f$ \beta_2\f$ of the 2D case, there is a new pointer
\f$ \beta_3\f$.
If we take a closer look at the central edge <I>e4</I> shown in
\ref figure3 "Figure 3" (Left), we can see that it is
\cgal_figure_ref{figintuitiveexemple} (Left), we can see that it is
described by six darts linked together. Starting from a dart and
following a \f$ \beta_3\f$ pointer, we get to a dart which belongs to the
same edge, to the same facet, but to the neighboring volume (a 3-cell,
@ -122,22 +120,20 @@ facet (2-cell). Starting from any of these six darts and following
\f$ \beta_2\f$ and \f$ \beta_3\f$ pointers, we can reach exactly the six darts
describing edge <I>e4</I>.
\anchor figure3
\image html cmaps2d-3d-zoom.png
<center><b>
Figure 3: Two zooms on the 3D combinatorial map given in \ref figure2 "Figure 2" (Right).
\cgal_figure_begin{figintuitiveexemple,cmaps2d-3d-zoom.png}
Two zooms on the 3D combinatorial map given in \cgal_figure_ref{figexemplecombimaps} (Right).
Left: Zoom around the central edge
<I>e4</I> which details the six darts belonging to the
edge. Right: Zoom around the facet between volumes <I>vol2</I>
and <I>vol3</I> which details the eight darts belonging to the facet.
</b></center>
\cgal_figure_end
For facets, by following a \f$ \beta_1\f$ pointer, we get to a dart which
belongs to the same facet, to the same volume, but to the next edge
(1-cell, which explains the index 1 of \f$ \beta_1\f$). Starting from any
dart and following \f$ \beta_1\f$ and \f$ \beta_3\f$ pointers, we can reach
exactly all the darts describing the facet (see
\ref figure3 "Figure 3" (Right)).
\cgal_figure_ref{figintuitiveexemple} (Right)).
For volumes, starting from any dart and following \f$ \beta_1\f$ and
\f$ \beta_2\f$ pointers, we can reach exactly all the darts describing the
volume.
@ -151,17 +147,17 @@ we do not start by following a \f$ \beta_1\f$ pointer).
In some cases, the general rule that by following a \f$ \beta_i\f$ we
get a dart which belongs to the neighboring <I>i</I>-cell is not true,
as for example for darts belonging to the boundary of the represented
object. For example, in \ref figure1 "Figure 1" (Left), any
object. For example, in \cgal_figure_ref{figexemple3Dmanifold} (Left), any
dart <I>d0</I> that does not belong to edge <I>e1</I>, <I>e2</I> and
<I>e3</I> belongs to a 2-cell, and there is no neighboring facet along
the edge containing <I>d0</I>. Another example is in \ref
figure1 "Figure 1" (Right), for any dart <I>d0</I> that belongs to
the edge containing <I>d0</I>. Another example is in
\cgal_figure_ref{figexemple3Dmanifold} (Right), for any dart <I>d0</I> that belongs to
facet <I>f5</I>. <I>d0</I> belongs to volume <I>vol2</I>, but there
is no neighboring volume along this facet. The general rule is also
not true for unbounded cells. For example if we remove a dart in
\ref figure2 "Figure 2" (Left), we obtain an unbounded facet
\cgal_figure_ref{figexemplecombimaps} (Left), we obtain an unbounded facet
having a dart without next dart for \f$ \beta_1\f$, and if we remove a
facet in \ref figure2 "Figure 2" (Right), we obtain an
facet in \cgal_figure_ref{figexemplecombimaps} (Right), we obtain an
unbounded volume having some darts without neighboring facet for \f$
\beta_2\f$. In such a case, there is a particular value called \f$
\varnothing\f$ used to describe that a dart <I>d0</I> is not linked to
@ -236,7 +232,7 @@ A combinatorial map is <I>without i-boundary</I> if there is no
<I>i</I>-free dart, and it is <I>without boundary</I> if it is without
<I>i</I>-boundary for all dimensions 1\f$ \leq\f$<I>i</I>\f$ \leq\f$<I>d</I>.
We show in \ref figure4 "Figure 4" a 3D object and the
We show in \cgal_figure_ref{figexemplecarte3d} a 3D object and the
corresponding 3D combinatorial map. This map has 40 darts represented
by arrows, some darts being numbered. In this combinatorial map, we
have for example \f$ \beta_1\f$(1)=2, \f$ \beta_2\f$(1)=10, and \f$
@ -245,10 +241,8 @@ have for example \f$ \beta_1\f$(1)=2, \f$ \beta_2\f$(1)=10, and \f$
for example \f$ \beta_3\f$(10)=\f$ \varnothing\f$ and \f$
\beta_3\f$(12)=\f$ \varnothing\f$.
\anchor figure4
\image html cmap3d-example2.png
<center><b>
Figure 4: Example of a 3D combinatorial map. Left: A 3D object made of
\cgal_figure_begin{figexemplecarte3d,cmap3d-example2.png}
Example of a 3D combinatorial map. Left: A 3D object made of
two volumes adjacent along facet <I>f2</I>. Right: The
corresponding 3D combinatorial map. Darts are drawn with arrows,
sometimes numbered. Two darts linked by \f$ \beta_1\f$ are drawn
@ -257,7 +251,7 @@ linked by \f$ \beta_2\f$ are drawn parallel, in reverse orientations,
with a little gray segment joining them (for example \f$
\beta_2\f$(1)=10). \f$ \beta_3\f$ pointers are represented by blue
segments (for example \f$ \beta_3\f$(1)=5).
</b></center>
\cgal_figure_end
\subsection sseccellsinmap Cells as Sets of Darts
@ -335,7 +329,7 @@ the <I>i</I>-cells is equal to <I>D</I>, and the sets of darts of two
different <I>i</I>-cells are disjoint.
Let us give some examples of cells in 3D, for the 3D combinatorial map
of \ref figure4 "Figure 4":
of \cgal_figure_ref{figexemplecarte3d} :
<UL>
<LI>All the darts belonging to the same edge can be obtained by any
combination of \f$ \beta_2\f$ and \f$ \beta_3\f$: for example edge
@ -387,7 +381,7 @@ dimension of the two cells). Two <I>i</I>-cells <I>c1</I> and
\beta_i\f$(<I>d2</I>) (or <I>d2</I>=\f$ \beta_i\f$(<I>d1</I>) for
<I>i</I>=1).
In the example of \ref figure4 "Figure 4", vertex <I>v</I> and
In the example of \\cgal_figure_ref{figexemplecarte3d}, vertex <I>v</I> and
edge <I>e</I> are incident since the intersection of the two
corresponding sets of darts is {1,9}\f$ \neq\f$\f$
\emptyset\f$. Vertex <I>v</I> is incident to facet <I>f2</I> since the
@ -413,7 +407,7 @@ containing <I>d0</I> in dimension <I>d'</I> is the orbit \f$
<I>i</I>-cells are considered in dimension <I>d</I>, the dimension of
the combinatorial map.
In the example of \ref figure4 "Figure 4", the 2-cell containing
In the example of \cgal_figure_ref{figexemplecarte3d}, the 2-cell containing
dart 1 is facet <I>f2</I> which is the set of darts
{1,2,3,4,5,6,7,8}. If we consider the same 2-cell in dimension 2, we
obtain the set of darts {1,2,3,4}. Intuitively we "forget" \f$
@ -450,15 +444,14 @@ is transferred to darts: if attribute <I>a</I> is associated to
associated to <I>a</I>.
We can see two examples of combinatorial maps having some attributes
in \ref figure5 "Figure 5". In the first example (Left), a 2D
in \cgal_figure_ref{figexempleattribs}. In the first example (Left), a 2D
combinatorial map has 1-attributes containing a float, for example
corresponding to the length of the associated 1-cell, and 2-attributes
containing a color in RGB format. In the second example (Right), a 3D
combinatorial map has 2-attributes containing a color in RGB format.
\anchor figure5
\image html cmap2d-3d-attribs.png
<center><b>Figure 5: Example of combinatorial maps with attributes. Attributes
\cgal_figure_begin{figexempleattribs,cmap2d-3d-attribs.png}
Example of combinatorial maps with attributes. Attributes
are represented by black rectangles containing an information, and
association between darts and attributes are represented by small
lines. Left: A 2D combinatorial map with 1-attributes
@ -469,7 +462,7 @@ edges of the combinatorial map, among the nine, are associated to a
2-attribute. Right: A 3D combinatorial map with 2-attributes
containing a color in RGB format. Only three 2-cells of the
combinatorial map, among the ten, are associated to a 2-attribute.
</b></center>
\cgal_figure_end
\subsection sseccombimapvalidity Combinatorial Map Properties
@ -488,19 +481,18 @@ along <I>(d-1)</I>-cells. It is orientable if it is possible to embed
it in the Euclidean space and to define a global "left" and "right"
direction in each point of the embedded object. In 2D, quasi-manifolds
are manifolds, but this is no longer true in higher dimension as we
can see in the example presented in \ref figure6 "Figure 6". In
can see in the example presented in \cgal_figure_ref{figquasivariete}. In
this example, the object to the right is not a manifold since the
neighborhood of the point <I>p</I> in the object is not homeomorphic
to a 3D ball (intuitively, two objects are homeomorphic if each object
can be continuously deformed into the second one; in such a case, the
two objects have exactly the same topological properties).
\anchor figure6
\image html quasivarietes.png
<center><b>Figure 6: Example of a 3D quasi-manifold which is not a manifold. The
\cgal_figure_begin{figquasivariete,quasivarietes.png}
Example of a 3D quasi-manifold which is not a manifold. The
object to the right is made of the four pyramids (shown to the left)
glued together along facets, thus it is a quasi-manifold.
</b></center>
\cgal_figure_end
Combinatorial maps can only represent quasi-manifolds due to the
@ -512,37 +504,35 @@ words, \f$ \beta_i\f$ links two <I>i</I>-cells that share a common
<I>(i-1)</I>-cell: it is not possible to link more than two
<I>i</I>-cells along a same <I>(i-1)</I>-cell. For this reason, it is
not possible to describe non quasi-manifold objects as those shown in
\ref figure7 "Figure 7" by combinatorial maps.
\cgal_figure_ref{fignonquasimanifold} by combinatorial maps.
\anchor figure7
\image html nonmanifolds.png
<center><b>Figure 7: Three examples of non quasi-manifold objects. Left:
\cgal_figure_begin{fignonquasimanifold,nonmanifolds.png}
Three examples of non quasi-manifold objects. Left:
A 2D object which is not a quasi-manifold since the two 2-cells share
a common vertex but no common 1-cell. Middle: A 3D object which
is not a quasi-manifold since is it not only composed by 3D cells
glued together (there is an isolated 2-cell in dark
gray). Right: A 3D object which is not a quasi-manifold since
the two 3-cells share a common edge but no common 2-cell.
</b></center>
\cgal_figure_end
Due to this additional condition, any objects can not be represented
by a combinatorial map but only orientable quasi-manifolds. We need to
study now the inverse relation. Does any set of darts linked together
by \f$ \beta_i\f$'s, with 0\f$ \leq\f$<I>i</I>\f$ \leq\f$<I>d</I>
correspond to a quasi-manifold? As we can see in
\ref figure8 "Figure 8", the answer is no.
\cgal_figure_ref{figpbcarte}, the answer is no.
\anchor figure8
\image html problems-cmaps.png
<center><b>Figure 8: Two examples of darts linked together by some
\cgal_figure_begin{figpbcarte,problems-cmaps.png}
Two examples of darts linked together by some
\f$ \beta_1\f$, \f$ \beta_2\f$ and \f$ \beta_3\f$ which
does not represent a 3D quasi-manifold, and thus which are not 3D
combinatorial map. Left: In this example, all the darts are
3-free except \f$ \beta_3\f$(1)=5 and \f$ \beta_3\f$(4)=6 (and
vice-versa). Right: In this example, darts linked by \f$
\beta_3\f$ are not in the same order in both 3-cells.
</b></center>
\cgal_figure_end
In the first example (Left), there are two 3-cells (one to the left
@ -581,7 +571,7 @@ validity conditions.
\section secsoftwaredesign Software Design
The diagram in \ref figure9 "Figure 9" shows the different
The diagram in \cgal_figure_ref{figdiagram_class} shows the different
classes of the package. `Combinatorial_map` is the main class
(see Section \ref sseccombinatorialmap "Combinatorial Maps"). It allows to manage darts
(see Section \ref ssecdarts "Darts") and attributes (see
@ -594,8 +584,9 @@ accessed through <I>handles</I>. A handle is a model of the
`Handle` concept, thus supporting the two dereference operators
`operator*` and `operator->`.
\anchor figure9
\image html Diagramme_class.png "Figure 9: UML diagram of the main classes of the package. k is the number of non void attributes."
\cgal_figure_begin{figdiagram_class,Diagramme_class.png}
UML diagram of the main classes of the package. k is the number of non void attributes.
\cgal_figure_end
\subsection sseccombinatorialmap Combinatorial Maps
@ -967,7 +958,7 @@ The `CombinatorialMap` defines two groups of methods to modify the
methods iterate over two orbits in
order to link or unlink specific darts two by two. Intuitively, a
\ref CombinatorialMap::sew "sew<i>" operation glues two <I>i</I>-cells by identifying two of
their <I>(i-1)</I>-cells (see example in \ref figure10 "Figure 10"
their <I>(i-1)</I>-cells (see example in \cgal_figure_ref{figexemplesew}
where \ref CombinatorialMap::sew "sew<3>" is used to glue two 3-cells along one 2-cell).
Reciprocally, a \ref CombinatorialMap::unsew "unsew<i>" operation un-glues
two <I>i</I>-cells which
@ -1004,9 +995,8 @@ modification is \f$ \beta_1\f$(<I>d0</I>)=\f$ \varnothing\f$ (and thus
definition of \f$ \beta_0\f$). Note that is it possible to unlink a
given dart for \f$ \beta_i\f$ only if it is not <I>i</I>-free.
\anchor figure10
\image html exemple-3d-sew.png
<center><b>Figure 10: Example of \ref CombinatorialMap::sew "3-sew" operation.
\cgal_figure_begin{figexemplesew,exemple-3d-sew.png}
Example of \ref CombinatorialMap::sew "3-sew" operation.
Left: A 3D combinatorial
map containing two volumes that are not connected, with
2-attributes. Each attribute contains a color in RGB format, and there
@ -1020,7 +1010,7 @@ or \ref CombinatorialMap::sew "sew<3>(4,6)"). Darts (1,5),
the sew into the 2-cell {1,2,3,4,5,6,7,8}. We are in the case where
the two attributes are non NULL, thus the first one is kept, and all
the darts of <I>c2</I> are associated with the first attribute.
</b></center>
\cgal_figure_end
The \ref CombinatorialMap::sew "sew<i>(dh1,dh2)" method consists mainly to link two by two
several darts by \f$ \beta_i\f$. This operation is possible only if
@ -1077,7 +1067,7 @@ definition. This functor can for example copy the information of the
second attribute in the information of the first one to make as if the
second attribute is kept.
For example, in \ref figure10 "Figure 10", we want to 3-sew the two
For example, in \cgal_figure_ref{figexemplesew}, we want to 3-sew the two
initial volumes. \ref CombinatorialMap::sew "sew<3>(1,5)" links
by \f$ \beta_3\f$ the pairs of
darts (1,5), (2,8), (3,7) and (4,6), thus the combinatorial map
@ -1105,9 +1095,9 @@ attributes <I>attr1</I> and <I>attr2</I> (see Section \ref
ssecattributes "Cell Attributes").
Let us consider the combinatorial map given in
\ref figure10 "Figure 10" (Right). If we call
\\cgal_figure_ref{figexemplesew} (Right). If we call
\ref CombinatorialMap::unsew "unsew<3>(2)", we obtain the
combinatorial map in \ref figure10 "Figure 10" (Left) (except for the
combinatorial map in \cgal_figure_ref{figexemplesew} (Left) (except for the
color of the attribute associated to the 2-cell {5,6,7,8} which would
be <TT>#00ff00</TT>). The \ref CombinatorialMap::unsew "unsew<3>"
operation has duplicated the
@ -1121,9 +1111,9 @@ attributes by passing `false` as last argument of
\ref CombinatorialMap::unsew "unsew<i>(dh0,update_attributes=true)". In these cases, the
combinatorial map obtained may be no longer valid due to incorrect
associations between darts and attributes. In
\ref figure10 "Figure 10" (Left), if we call \ref CombinatorialMap::sew "sew<3>(1,5,false)", the resulting
\cgal_figure_ref{figexemplesew} (Left), if we call \ref CombinatorialMap::sew "sew<3>(1,5,false)", the resulting
combinatorial map is similar to the combinatorial map of
\ref figure10 "Figure 10" (Right) (we have linked by \f$ \beta_3\f$ the pairs of
\cgal_figure_ref{figexemplesew} (Right) (we have linked by \f$ \beta_3\f$ the pairs of
darts (1,5), (2,8), (3,7) and (4,6)), but associations between darts
and attributes are not valid. Indeed, we have kept the four initial
attributes and all the associations between darts and attributes, thus
@ -1137,7 +1127,7 @@ passing `false` as last argument of
`link_beta<i>(dh1,dh2,update_attributes)`. Lastly, we can use
`unlink_beta<i>(dh0)` to unlink `d0` for \f$ \beta_i\f$. In this last
case, there is no modification of association between darts and
attributes. In \ref figure10 "Figure 10" (Left), if we call
attributes. In \\cgal_figure_ref{figexemplesew} (Left), if we call
\ref CombinatorialMap::link_beta "link_beta<3>(1,5)", in the resulting combinatorial map we have now
\f$ \beta_3\f$(1)=5 and \f$ \beta_3\f$(5)=1. This combinatorial map is
no longer valid (for example dart 2 is 3-free and we should have \f$
@ -1161,17 +1151,17 @@ merged into one <I>(i+1)</I>-cell. In this case, the `On_merge`
functor is called if two <I>(i+1)</I>-attributes are associated to the
two <I>(i+1)</I>-cells. If the <I>i</I>-cell is associated with a non
void attribute, it is removed from the combinatorial map (see three
examples on \ref figure11 "Figure 11", \ref figure13 "Figure 13"
and \ref figure14 "Figure 14").
examples on \cgal_figure_ref{figinsertvertex}, \cgal_figure_ref{figinsertedge}
and \cgal_figure_ref{figinsertface}).
\anchor figure11
\image html insert-vertex.png
<center><b>Figure 11: Example of `::insert_cell_0_in_cell_1` and `::remove_cell<0>`
\cgal_figure_begin{figinsertvertex,insert-vertex.png}
Example of `::insert_cell_0_in_cell_1` and `::remove_cell<0>`
operations. Left: Initial combinatorial map. Right:
After the insertion of a 0-cell in the 1-cell containing dart
`d1`. Now if we remove the 0-cell containing dart `d2`, we obtain the
initial combinatorial map. </b></center>
initial combinatorial map.
\cgal_figure_end
The inverse operation of the removal is the insertion operation.
Several versions exist, sharing a common principle. They consist in
@ -1184,15 +1174,16 @@ because parameters are different depending on `i` and `j`.
`::insert_cell_0_in_cell_1<CMap>(cm,dh0)` adds a 0-cell in the 1-cell
containing dart `d0`. The 1-cell is split in two. This operation is
possible if `d0`\f$ \in\f$`cm.darts()` (see example on
\ref figure11 "Figure 11").
\cgal_figure_ref{figinsertvertex}).
`::insert_cell_0_in_cell_2<CMap>(cm,dh0)` adds a 0-cell in the 2-cell
containing dart `d0`. The 2-cell is split in triangles, one for each
initial edge of the facet. This operation is possible if `d0`\f$
\in\f$`cm.darts()` (see example on \ref figure12 "Figure 12").
\in\f$`cm.darts()` (see example on \\cgal_figure_ref{figtriangulate}).
\anchor figure12
\image html triangulation.png "Figure 12: Example of `::insert_cell_0_in_cell_2` operation."
\cgal_figure_begin{figtriangulate,triangulation.png}
Example of `::insert_cell_0_in_cell_2` operation.
\cgal_figure_end
`::insert_cell_1_in_cell_2<CMap>(cm,dh1,dh2)` adds a 1-cell in the
2-cell containing darts `d1` and `d2`, between the two 0-cells
@ -1200,19 +1191,19 @@ containing darts `d1` and `d2`. The 2-cell is split in two. This
operation is possible if <I>d1</I>\f$ \in\f$\f$ \langle{}\f$\f$
\beta_1\f$\f$ \rangle{}\f$(<I>d2</I>) which can be tested thanks to
`::is_insertable_cell_1_in_cell_2<CMap>(cm,dh1,dh2)`. In the example on
\ref figure13 "Figure 13", it is possible to insert an edge between darts
\cgal_figure_ref{figinsertedge}, it is possible to insert an edge between darts
<I>d2</I> and <I>d3</I>, but it is not possible to insert an edge
between <I>d1</I> and <I>d3</I>.
\anchor figure13
\image html insert-edge.png
<center><b>Figure 13: Example of `::insert_cell_1_in_cell_2` and `::remove_cell<1>`
\cgal_figure_begin{figinsertedge,insert-edge.png}
Example of `::insert_cell_1_in_cell_2` and `::remove_cell<1>`
operations. Left: Initial combinatorial map. Right:
After the insertion of two 1-cells: a first one between the two
0-cells containing darts `d2` and `d3`, and a second one incident to
the 0-cell containing dart `d1`. Now if we remove the two 1-cells
containing darts `d4` and `d5`, we obtain the initial combinatorial
map. </b></center>
map.
\cgal_figure_end
`::insert_dangling_cell_1_in_cell_2<CMap>(cm,dh0)` adds a 1-cell in the
@ -1227,15 +1218,15 @@ the path of 1-cells containing darts in [`itbegin`,`itend`). The
in [`itbegin`,`itend`) form a closed path inside a same 3-cell which
can be tested thanks to
`::is_insertable_cell_2_in_cell_3<CMap>(cm,itbegin,itend)` (see example on
\ref figure14 "Figure 14").
\cgal_figure_ref{figinsertface}).
\anchor figure14
\image html insert-facet.png
<center><b>Figure 14: Example of `::insert_cell_2_in_cell_3` and `::remove_cell<2>`
\cgal_figure_begin{figinsertface,insert-facet.png}
Example of `::insert_cell_2_in_cell_3` and `::remove_cell<2>`
operations. Left: Initial combinatorial map. Right: After the
insertion of a 2-cell along the path of 1-cells containing
respectively `d1,d2,d3,d4`. Now if we remove the 2-cell containing
dart `d5`, we obtain the initial combinatorial map. </b></center>
dart `d5`, we obtain the initial combinatorial map.
\cgal_figure_end
Some examples of use of these operations are given in Section \ref
ssecexempleoperations "High Level Operations".
@ -1289,12 +1280,12 @@ for (CMap_3::Dart_of_orbit_range<1,2>::const_iterator
This example shows some uses of high level operations. First we create
a combinatorial hexahedron, the combinatorial map obtained is shown in
\ref figure15 "Figure 15" (Left). Then we insert two 1-cells along
\cgal_figure_ref{fig_exemple_ope} (Left). Then we insert two 1-cells along
two opposite 2-cells of the hexahedron. The combinatorial map obtained
is shown in \ref figure15 "Figure 15" (Middle). Finally, we insert a
is shown in \cgal_figure_ref{fig_exemple_ope} (Middle). Finally, we insert a
2-cell in the diagonal of the hexahedron in order to split it into two
parts. We obtain the combinatorial map shown in
\ref figure15 "Figure 15" (Right). We display the characteristics of
\cgal_figure_ref{fig_exemple_ope} (Right). We display the characteristics of
the combinatorial map and check its validity.
The second part of this example removes the inserted elements. First
@ -1312,7 +1303,7 @@ The output is:
The first line gives the characteristics of the combinatorial map
after all the insertions (the combinatorial map drawn in
\ref figure15 "Figure 15" (Right)). There are two 3-cells (since the
\cgal_figure_ref{fig_exemple_ope} (Right)). There are two 3-cells (since the
combinatorial hexahedron was split in two by the 2-cell insertion),
nine 2-cells (since two 2-cells of the original hexahedron were split
in two by the two 1-cell insertions, and a new 2-cell was created
@ -1324,14 +1315,14 @@ The second line is the result after the removal operations. We
retrieve the original combinatorial hexahedron since we have removed
all the inserted elements.
\anchor figure15
\image html example-insertions.png
<center><b>Figure 15: Example of high level operations. Left: Initial 3D
\cgal_figure_begin{fig_exemple_ope,example-insertions.png}
Example of high level operations. Left: Initial 3D
combinatorial map after the creation of the combinatorial
hexahedron. Middle: Combinatorial map obtained after the two
1-cell insertions. The two 2-cells were split in two. Right:
Combinatorial map obtained after the 2-cell insertion. The 3-cell was
split in two. </b></center>
split in two.
\cgal_figure_end
\subsection Combinatorial_mapA4DCombinatorialMap A 4D Combinatorial Map