mirror of https://github.com/CGAL/cgal
Replaced \bf by \em in the definitions in the manual.
This commit is contained in:
parent
ce3a61b9fc
commit
7682bd8f91
|
|
@ -1,3 +1,6 @@
|
|||
6 March 2006 Andreas Fabri
|
||||
- Replaced \bf by \em in the definitions in the manual.
|
||||
|
||||
3 March 2006 Andreas Fabri
|
||||
- Minor modifications in the manual
|
||||
|
||||
|
|
|
|||
|
|
@ -18,17 +18,51 @@
|
|||
|
||||
\subsection{Simple Polygon}
|
||||
|
||||
A 2D \textbf{Simple Polygon} is a set of one or more simple contours. A 2D \textbf{Contour} is a sequence of 3 or more non-collinear (and non-coincident) vertices. A 2D \textbf{Vertex} is a 2D \ccc{Point}.\\
|
||||
The vertices in a contour embeds 2D \textit{oriented straight line segments} called contour edges. A \textbf{Contour Edge} connects two consecutive vertices, and the cycle of edges in a contour is closed (i.e. there is an edge connecting the last and first vertices). A contour X is said to \textit{intersect} contour Y if any edge in Y intersects any edge in X; and a contour X is said to \textit{contain} contour Y if any vertex of Y is inside X.\\
|
||||
Contours in a simple polygon must be arranged such that no contour intersects any other contour and exactly one contour, called the \textbf{Outer Contour}, contains the rest of the contours, called \textbf{Inner Contours} or \textbf{Holes}. The outer contour must be oriented counter-clockwise (CCW) while inner contours must be oriented clockwise (CW). Inner contours cannot be nested, that is, no inner contour can contain any other contour.
|
||||
A {\em 2D simple polygon} is a set of one or more simple contours. A
|
||||
{\em 2D contour} is a sequence of 3 or more non-collinear (and
|
||||
non-coincident) vertices. A {\em 2D vertex} is a \ccc{Point_2}.\\ The
|
||||
vertices in a contour embeds 2D oriented straight line segments called
|
||||
contour edges. A {\em contour edge} connects two consecutive vertices,
|
||||
and the cycle of edges in a contour is closed (i.e., there is an edge
|
||||
connecting the last and first vertices). A contour \ccc{X} is said to
|
||||
{\em intersect} contour \ccc{Y} if any edge in \ccc{Y} intersects any
|
||||
edge in \ccc{X}; and a contour \ccc{X} is said to {\em contain} contour
|
||||
\ccc{Y}, if any vertex of \ccc{Y} is inside \ccc{X}.
|
||||
|
||||
Contours in a simple polygon must be arranged such that no contour
|
||||
intersects any other contour and exactly one contour, called the
|
||||
{em outer contour}, contains the rest of the contours, called
|
||||
{\em inner contours} or {\em holes}. The outer contour must be
|
||||
oriented counter-clockwise (CCW) while inner contours must be oriented
|
||||
clockwise (CW). Inner contours cannot be nested, that is, no inner
|
||||
contour can contain any other contour.
|
||||
|
||||
\subsection{Inward Offset Simple Polygon}
|
||||
|
||||
For any 2D Simple Polygon, called the \textbf{Source Polygon}, there can exist a \textit{set} of 0, 1 or more \textbf{Inward Offset Simple Polygons}, or just Offset Polygons for short, at some Euclidean distance \textit{t} $>0$. Any contour edge of such offset polygon, called an \textbf{Offset Edge} corresponds to \textit{some} contour edge of the source polygon, called its \textbf{Source Edge}. An offset edge is parallel to its source edge and has the same orientation. The Euclidean distance between the \textit{lines} supporting an offset edge and its source edge is exactly \ccc{t}.\\
|
||||
An offset edge is always located \textit{to the left} of its source edge (which is an oriented straight line segment).\\
|
||||
An offset polygon can have less, equal or more sides as its source polygon.\\
|
||||
If the source polygon has no holes, no offset polygon has holes. If the source polygon has holes, any of the offset polygons can have holes itself, but it might as well have no holes at all (if the distance is sufficiently large).\\
|
||||
Since any offset polygon is a simple polygon, its outer contour is oriented counter-clockwise while its holes (if any) are oriented clockwise.
|
||||
For any 2D simple polygon, called the {em source polygon}, there can
|
||||
exist a set of 0, 1 or more {\em inward offset simple polygons}, or
|
||||
just {\em offset polygons} for short, at some Euclidean distance
|
||||
$t>0$. Any contour edge of such offset polygon, called an
|
||||
{\em offset edge} corresponds to some contour edge of the
|
||||
source polygon, called its {\em source edge}. An offset edge is
|
||||
parallel to its source edge and has the same orientation. The
|
||||
Euclidean distance between the lines supporting an offset
|
||||
edge and its source edge is exactly \ccc{t}.
|
||||
|
||||
An offset edge is always located to the left of its source edge (which
|
||||
is an oriented straight line segment).
|
||||
|
||||
An offset polygon can have less, equal or more sides as its source
|
||||
polygon.
|
||||
|
||||
If the source polygon has no holes, no offset polygon has holes. If
|
||||
the source polygon has holes, any of the offset polygons can have
|
||||
holes itself, but it might as well have no holes at all (if the
|
||||
distance is sufficiently large).
|
||||
|
||||
Since any offset polygon is a simple polygon, its outer contour is
|
||||
oriented counter-clockwise while its holes (if any) are oriented
|
||||
clockwise.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{ccTexOnly}
|
||||
|
|
@ -37,8 +71,6 @@ Since any offset polygon is a simple polygon, its outer contour is oriented coun
|
|||
\includegraphics{Straight_skeleton_2/fig1} % omit suffix .eps to supprt PS and PDF
|
||||
\end{center}
|
||||
\end{ccTexOnly}
|
||||
\caption{Polygon with no holes and 2 inward offsets at distances 1 and 2 (Left) and polygon with holes and many inward offsets at various distances (Right)
|
||||
\label{Simplepoly-offsets}}
|
||||
\begin{ccHtmlOnly}
|
||||
<TABLE CELLSPACING=40>
|
||||
<TR>
|
||||
|
|
@ -55,16 +87,22 @@ Since any offset polygon is a simple polygon, its outer contour is oriented coun
|
|||
</TR>
|
||||
</TABLE>
|
||||
\end{ccHtmlOnly}
|
||||
\caption{Polygon with no holes and 2 inward offsets at distances 1 and 2 (Left)
|
||||
and polygon with holes and many inward offsets at various distances (Right)
|
||||
\label{Simplepoly-offsets}}
|
||||
\end{figure}
|
||||
|
||||
\subsection{Straight Skeleton of a 2D Simple Polygon}
|
||||
|
||||
The 2D \textbf{Straight Skeleton} of a simple polygon is a special partitioning of the polygon interior into \textbf{Straight Skeleton Regions} corresponding to the monotone areas traced by a continuous \textit{inward offsetting} of the contour edges. Each region corresponds to exactly 1 contour edge.\\
|
||||
These regions are bounded by angular bisectors of the supporting lines of the contour edges and each such region is a non-convex simple polygon itself.\\
|
||||
It was first introduced in:\\
|
||||
The {\em 2D straight skeleton} \cite{aaag-ntsp-95} of a simple polygon is a special
|
||||
partitioning of the polygon interior into {\em straight skeleton
|
||||
regions} corresponding to the monotone areas traced by a continuous
|
||||
inward offsetting of the contour edges. Each region
|
||||
corresponds to exactly one contour edge.
|
||||
|
||||
"A Novel Type of Skeleton for Polygons"
|
||||
O. AICHHOLZER, F. AURENHAMMER, D. ALBERTS, BERND GARTNER
|
||||
These regions are bounded by angular bisectors of the supporting lines
|
||||
of the contour edges and each such region is a non-convex simple
|
||||
polygon itself.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{ccTexOnly}
|
||||
|
|
@ -77,8 +115,7 @@ It was first introduced in:\\
|
|||
\includegraphics{Straight_skeleton_2/fig5} % omit suffix .eps to supprt PS and PDF
|
||||
\end{center}
|
||||
\end{ccTexOnly}
|
||||
\caption{Example straight skeletons
|
||||
\label{SampleSLS}}
|
||||
|
||||
\begin{ccHtmlOnly}
|
||||
<TABLE CELLSPACING=40>
|
||||
<TR>
|
||||
|
|
@ -107,64 +144,159 @@ It was first introduced in:\\
|
|||
</TR>
|
||||
</TABLE>
|
||||
\end{ccHtmlOnly}
|
||||
|
||||
\caption{Example straight skeletons
|
||||
\label{SampleSLS}}
|
||||
\end{figure}
|
||||
|
||||
\subsubsection{Angular Bisecting Lines and Offset Bisectors}
|
||||
|
||||
Two non-parallel lines, intersecting at a point, are bisected by two other lines passing through that intersection point.\\
|
||||
Two parallel lines are bisected by another parallel line placed halfway in between.\\
|
||||
Given just one line, any perpendicular line can be considered the bisecting line (any bisector of any two points along the single line).\\
|
||||
The bisecting lines of two edges are the lines bisecting the supporting lines of the edges (if the edges are parallel or collinear, there is just one bisecting line)
|
||||
Two non-parallel lines, intersecting at a point, are bisected by two
|
||||
other lines passing through that intersection point.
|
||||
|
||||
The halfplane to the left of the line supporting a contour edge is called the \textbf{offset zone} of the contour edge.\\
|
||||
Given any number of contour edges (not necessarily consecutive), the intersection of their offset zones is called their \textbf{combined offset zone}.
|
||||
Two parallel lines are bisected by another parallel line placed
|
||||
halfway in between.
|
||||
|
||||
Any two contour edges define an \textbf{offset bisector}, as follows:
|
||||
If the edges are non-parallel, their bisecting lines can be decomposed as 4 rays originating at the intersection of the supporting lines. Only one of these rays is contained in the combined offset zone of the edges (which one depends on the possible combinations of orientations). This ray is the offset bisector of the non-parallel contour edges.\\
|
||||
If the edges are parallel (but not collinear) and have opposite orientation, the entire and unique bisecting line is their offset bisector. If the edges are parallel but have the same orientation, there is no offset bisector between them.\\
|
||||
If the edges are collinear and have the same orientation, their offset bisector is given by a perpendicular ray to the left of the edges which originates at the midpoint of the \textit{combined complement} of the edges. (The \textit{complement} of an edge/segment are the two rays along its supporting line which are not the segment and the \textit{combined complement} of N collinear segments is the intersection of the complements of each segment). If the edges are collinear but have opposite orientation, there is no offset bisector between them.
|
||||
Given just one line, any perpendicular line can be considered the
|
||||
bisecting line (any bisector of any two points along the single line).
|
||||
|
||||
The bisecting lines of two edges are the lines bisecting the
|
||||
supporting lines of the edges (if the edges are parallel or collinear,
|
||||
there is just one bisecting line).
|
||||
|
||||
The halfplane to the left of the line supporting a contour edge is
|
||||
called the {\em offset zone} of the contour edge.
|
||||
|
||||
Given any number of contour edges (not necessarily consecutive), the
|
||||
intersection of their offset zones is called their {\em combined
|
||||
offset zone}.
|
||||
|
||||
Any two contour edges define an {\em offset bisector}, as follows: If
|
||||
the edges are non-parallel, their bisecting lines can be decomposed as
|
||||
4 rays originating at the intersection of the supporting lines. Only
|
||||
one of these rays is contained in the combined offset zone of the
|
||||
edges (which one depends on the possible combinations of
|
||||
orientations). This ray is the offset bisector of the non-parallel
|
||||
contour edges.
|
||||
|
||||
If the edges are parallel (but not collinear) and have opposite
|
||||
orientation, the entire and unique bisecting line is their offset
|
||||
bisector. If the edges are parallel but have the same orientation,
|
||||
there is no offset bisector between them.
|
||||
|
||||
If the edges are collinear and have the same orientation, their offset
|
||||
bisector is given by a perpendicular ray to the left of the edges
|
||||
which originates at the midpoint of the combined complement of
|
||||
the edges. (The {\em complement} of an edge/segment are the two
|
||||
rays along its supporting line which are not the segment and the
|
||||
{\em combined complement} of \ccc{N} collinear segments is the
|
||||
intersection of the complements of each segment). If the edges are
|
||||
collinear but have opposite orientation, there is no offset bisector
|
||||
between them.
|
||||
|
||||
%% Figure of bisecting lines and offset bisectors here
|
||||
|
||||
\subsubsection{Faces, Edges and Vertices}
|
||||
|
||||
Each region of the partitioning defined by a straight skeleton is called a \textbf{Face}. Each face is bounded by straight line segments, called \textbf{Edges}. Exactly one edge per face is a \textbf{Contour Edge} (corresponds to a side of the polygon) and the rest of the edges, located in the interior of the polygon, are called \textbf{Skeleton Edges}, or \textbf{Bisectors}.
|
||||
Each region of the partitioning defined by a straight skeleton is
|
||||
called a {\em face}. Each face is bounded by straight line segments,
|
||||
called {\em edges}. Exactly one edge per face is a {\em contour edge}
|
||||
(corresponds to a side of the polygon) and the rest of the edges,
|
||||
located in the interior of the polygon, are called {\em skeleton
|
||||
edges}, or {\em bisectors}.
|
||||
|
||||
The Bisectors of the straight skeleton are segments of the \textit{offset bisectors} as defined previously. Since an offset bisector is a ray of a bisecting line of 2 contour edges, each skeleton edge (or bisector) is uniquely given by two contour edges. These edges are called the \textbf{defining contour edges} of the bisector.
|
||||
The Bisectors of the straight skeleton are segments of the offset
|
||||
bisectors as defined previously. Since an offset bisector is a ray of
|
||||
a bisecting line of 2 contour edges, each skeleton edge (or bisector)
|
||||
is uniquely given by two contour edges. These edges are called the
|
||||
{\em defining contour edges} of the bisector.
|
||||
|
||||
The intersection of the edges are called \textbf{Vertices}. Although in a simple polygon, only 2 edges intersect at a vertex, in a straight skeleton, 3 edges intersect a any given vertex. That is, vertices in a straight skeleton have degree 3.\\
|
||||
A \textbf{Contour Vertex} is a vertex for which 2 of its incident edges are contour edges.\\
|
||||
A \textbf{Skeleton Vertex} is a vertex who's incident edges are all skeleton edges.
|
||||
The intersection of the edges are called {\em vertices}. Although in a
|
||||
simple polygon, only 2 edges intersect at a vertex, in a straight
|
||||
skeleton, 3 edges intersect a any given vertex. That is, vertices in a
|
||||
straight skeleton have degree 3.
|
||||
|
||||
A \textbf{Contour Bisector} is a bisector who's defining contour edges are consecutive. Such a bisector is incident upon 1 contour vertex and 1 skeleton vertex and touches the input polygon at exactly 1 endpoint.\\
|
||||
An \textbf{Inner Bisector} is a bisector who's defining contour edges are not consecutive. Such a bisector is incident upon 2 skeleton vertices and is strictly contained in the interior of the polygon.
|
||||
A {\em contour vertex} is a vertex for which 2 of its incident edges are contour edges.
|
||||
|
||||
A {\em skeleton vertex} is a vertex who's incident edges are all skeleton edges.
|
||||
|
||||
A {\em contour bisector} is a bisector who's defining contour edges
|
||||
are consecutive. Such a bisector is incident upon 1 contour vertex and
|
||||
1 skeleton vertex and touches the input polygon at exactly 1 endpoint.
|
||||
|
||||
An {\em inner bisector} is a bisector who's defining contour edges are
|
||||
not consecutive. Such a bisector is incident upon 2 skeleton vertices
|
||||
and is strictly contained in the interior of the polygon.
|
||||
|
||||
|
||||
|
||||
\section{Representation}
|
||||
|
||||
This \cgal\ package represents a straight skeleton as a \ccc{Halfedge Data Structure} (HDS) whose \textit{vertices} embeds 2D Points.\\
|
||||
Its \textit{halfedges}, by considering the source and target points, \textit{implicitly} embeds 2D \textit{oriented} straight line segments.
|
||||
This \cgal\ package represents a straight skeleton as a \ccc{Halfedge Data Structure} (HDS) whose vertices embeds 2D Points.
|
||||
|
||||
A face of the straight skeleton is represented as a face in the HDS. Both contour and skeleton edges are represented by pairs of opposite HDS halfedges, and both contour and skeleton vertices are represented by HDS vertices.
|
||||
Its halfedges, by considering the source and target points, implicitly embeds 2D oriented straight line segments.
|
||||
|
||||
In a HDS, a border halfedge is a halfedge which is incident upon an unbounded face. In the case of the straight skeleton HDS, such border halfedges are oriented such that their left side faces outwards the polygon. Therefore, the opposite halfedge of any border halfedge is oriented such that its left side faces inward the polygon.
|
||||
A face of the straight skeleton is represented as a face in the
|
||||
HDS. Both contour and skeleton edges are represented by pairs of
|
||||
opposite HDS halfedges, and both contour and skeleton vertices are
|
||||
represented by HDS vertices.
|
||||
|
||||
The skeleton halfedges are oriented such that their left side faces inward the region they bound. That is, the vertices (both contour and skeleton) of a face are circulated in counter-clockwise order. There is one and only one contour halfedge incident upon any face.
|
||||
In a HDS, a border halfedge is a halfedge which is incident upon an
|
||||
unbounded face. In the case of the straight skeleton HDS, such border
|
||||
halfedges are oriented such that their left side faces outwards the
|
||||
polygon. Therefore, the opposite halfedge of any border halfedge is
|
||||
oriented such that its left side faces inward the polygon.
|
||||
|
||||
By requirement, a simple polygon must have the outer contour oriented CCW and the holes oriented CW. In the straight skeleton, these contours are traced by the \textit{border halfedges} (those facing outward) of the HDS, but in the opposite direction. That is, the vertices of the polygon's contours can only by traced from straight skeleton by circulating the border halfedges, and the resulting vertex sequence will be reversed w.r.t the input vertex sequence.
|
||||
The skeleton halfedges are oriented such that their left side faces
|
||||
inward the region they bound. That is, the vertices (both contour and
|
||||
skeleton) of a face are circulated in counter-clockwise order. There
|
||||
is one and only one contour halfedge incident upon any face.
|
||||
|
||||
A skeleton edge, according to the definition given in the previous section, is defined by 2 contour edges. In the representation, each one of the opposite halfedges that represent a skeleton edge is associated with one of the opposite halfedges that correspond to one of its defining contour edges. Thus, the 2 opposite halfedges of a skeleton edge link it to its 2 defining contour edges.
|
||||
By requirement, a simple polygon must have the outer contour oriented
|
||||
CCW and the holes oriented CW. In the straight skeleton, these
|
||||
contours are traced by the border halfedges (those facing
|
||||
outward) of the HDS, but in the opposite direction. That is, the
|
||||
vertices of the polygon's contours can only by traced from straight
|
||||
skeleton by circulating the border halfedges, and the resulting vertex
|
||||
sequence will be reversed w.r.t the input vertex sequence.
|
||||
|
||||
Starting from any border contour halfedge, circulating the structure walks through border counter halfedges and traces the vertices of the polygon's contours (in opposite order).\\
|
||||
Starting from any non-border but contour halfedge, circulating the structure walks through skeleton halfedges until the source contour halfedge is reached, and it traces the vertices (both contour and skeleton) of the face that corresponds to the source contour edge. Such a face is itself a non-convex simple polygon oriented CCW.
|
||||
A skeleton edge, according to the definition given in the previous
|
||||
section, is defined by 2 contour edges. In the representation, each
|
||||
one of the opposite halfedges that represent a skeleton edge is
|
||||
associated with one of the opposite halfedges that correspond to one
|
||||
of its defining contour edges. Thus, the 2 opposite halfedges of a
|
||||
skeleton edge link it to its 2 defining contour edges.
|
||||
|
||||
A vertex is the intersection of contour and/or skeleton edges. Since a skeleton edge is defined by 2 contour edges, any vertex is itself defined by a unique set of contour edges. These are called the \textbf{defining contour edges} of the vertex.\\
|
||||
A vertex is identified by it's set of defining contour edges. Two vertices are distinct if they have differing sets of defining contour edges. \textit{Vertices can be distinct even if they are geometrically embedded at the same point}.
|
||||
Starting from any border contour halfedge, circulating the structure
|
||||
walks through border counter halfedges and traces the vertices of the
|
||||
polygon's contours (in opposite order).
|
||||
|
||||
Starting from any non-border but contour halfedge, circulating the
|
||||
structure walks through skeleton halfedges until the source contour
|
||||
halfedge is reached, and it traces the vertices (both contour and
|
||||
skeleton) of the face that corresponds to the source contour
|
||||
edge. Such a face is itself a non-convex simple polygon oriented CCW.
|
||||
|
||||
A vertex is the intersection of contour and/or skeleton edges. Since a
|
||||
skeleton edge is defined by 2 contour edges, any vertex is itself
|
||||
defined by a unique set of contour edges. These are called the
|
||||
{\em defining contour edges} of the vertex.
|
||||
|
||||
A vertex is identified by it's set of defining contour edges. Two
|
||||
vertices are distinct if they have differing sets of defining contour
|
||||
edges. Notw that vertices can be distinct even if they are geometrically
|
||||
embedded at the same point.
|
||||
|
||||
Contour vertices have exactly two defining contour edges, which are the contour edges incident upon the vertex; while skeleton vertices have exactly 3 defining contour edges.
|
||||
Contour vertices have exactly two defining contour edges, which are
|
||||
the contour edges incident upon the vertex; while skeleton vertices
|
||||
have exactly 3 defining contour edges.
|
||||
|
||||
The Euclidean distance from any vertex to the \textit{lines} supporting its defining contour edges is the same for all such lines (this is the distinctive characteristic of a straight skeleton). This distance is called the \textbf{time} of the vertex. Note that different vertices can have the same time. Contour vertices have time zero.
|
||||
The Euclidean distance from any vertex to the lines
|
||||
supporting its defining contour edges is the same for all such lines
|
||||
(this is the distinctive characteristic of a straight skeleton). This
|
||||
distance is called the {\em time} of the vertex. Note that
|
||||
different vertices can have the same time. Contour vertices have time
|
||||
zero.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{ccTexOnly}
|
||||
|
|
@ -172,8 +304,7 @@ The Euclidean distance from any vertex to the \textit{lines} supporting its defi
|
|||
\includegraphics{Straight_skeleton_2/fig6} % omit suffix .eps to supprt PS and PDF
|
||||
\end{center}
|
||||
\end{ccTexOnly}
|
||||
\caption{Straight Skeleton Data Structure
|
||||
\label{Simplepoly-offsets}}
|
||||
|
||||
\begin{ccHtmlOnly}
|
||||
<TABLE CELLSPACING=40>
|
||||
<TR>
|
||||
|
|
@ -185,30 +316,71 @@ The Euclidean distance from any vertex to the \textit{lines} supporting its defi
|
|||
</TR>
|
||||
</TABLE>
|
||||
\end{ccHtmlOnly}
|
||||
|
||||
\caption{Straight Skeleton Data Structure
|
||||
\label{Simplepoly-offsets}}
|
||||
\end{figure}
|
||||
|
||||
\section{API}
|
||||
|
||||
The Straight Skeleton data structure is encapsulated by any model of the \ccc{HalfedgeDS} concept.\\
|
||||
The straight skeleton construction algorithm is encapsulated in the class \ccc{Straight_skeleton_builder_2<Gt,Ssds>} which is parameterized on a Geometric Traits (class \ccc{Straight_skeleton_builder_traits<Kernel>}) and the Straight Skeleton data structure (Ssds).
|
||||
The Straight Skeleton data structure is encapsulated by any model of the \ccc{HalfedgeDS} concept.
|
||||
|
||||
The polygon offset construction algorithm is encapsulated in the class \ccc{Polygon_offset_builder_2<Ssds,Gt,Container>} which is parameterized on the Straight Skeleton data structure (Ssds), a Geometric Traits (class \ccc{Polygon_offset_builder_traits<Kernel>}) and a Container type where the resulting offset polygons are generated.
|
||||
The straight skeleton construction algorithm is encapsulated in the
|
||||
class \ccc{Straight_skeleton_builder_2<Gt,Ssds>} which is
|
||||
parameterized on a geometric traits (class
|
||||
\ccc{Straight_skeleton_builder_traits<Kernel>}) and the Straight
|
||||
Skeleton data structure (Ssds).
|
||||
|
||||
To construct the straight skeleton of a simple polygon you must:
|
||||
The polygon offset construction algorithm is encapsulated in the class
|
||||
\ccc{Polygon_offset_builder_2<Ssds,Gt,Container>} which is
|
||||
parameterized on the Straight Skeleton data structure (Ssds), a
|
||||
geometric traits (class \ccc{Polygon_offset_builder_traits<Kernel>})
|
||||
and a container type where the resulting offset polygons are
|
||||
generated.
|
||||
|
||||
To construct the straight skeleton of a simple polygon the user must:
|
||||
|
||||
(1) Instantiate the straight skeleton builder.\\
|
||||
(2) Enter one contour at a time, starting from the outer contour, via the method \ccc{enter_contour}. The input polygon must be strictly simple (non-intersecting) and there cannot be coincident or collinear vertices in the input (Keep in mind the definition and requirements of a Simple Polygon as expressed in the first section of this chapter).\\
|
||||
(3) Call \ccc{construct_skeleton} once all the contours have been entered.\\
|
||||
(1) Instantiate the straight skeleton builder.
|
||||
|
||||
To construct an inward offset polygon you must:
|
||||
(2) Enter one contour at a time, starting from the outer contour, via
|
||||
the method \ccc{enter_contour}. The input polygon must be strictly
|
||||
simple (non-intersecting) and there cannot be coincident or
|
||||
collinear vertices in the input (Keep in mind the definition and
|
||||
requirements of a Simple Polygon as expressed in the first section
|
||||
of this chapter).
|
||||
|
||||
(3) Call \ccc{construct_skeleton} once all the contours have been entered.
|
||||
|
||||
|
||||
To construct an inward offset polygon the user must:
|
||||
|
||||
(1) Construct the straight skeleton of the source polygon.\\
|
||||
(2) Instantiate the polygon offset builder passing in the straight skeleton.\\
|
||||
(3) Call \ccc{construct_offset_polygons} passing the desired offset distance and an output iterator that can store a \ccc{boost::shared_ptr} of \ccc{Container} instances (each representing one offset polygon) into a resulting sequence. Typically, you'll use a back insertion iterator for that.\\
|
||||
Each element in the resulting sequence is a \ccc{boost::shared_ptr} holding a dynamically allocated instance of the Container type. Such a container can be any model of the \ccc{VertexContainer_2} concept, for example, a \ccc{CGAL::Polygon_2}, or just a \ccc{std::vector} of 2D points.
|
||||
(1) Construct the straight skeleton of the source polygon.
|
||||
|
||||
(2) Instantiate the polygon offset builder passing in the straight skeleton.
|
||||
|
||||
(3) Call \ccc{construct_offset_polygons} passing the desired offset
|
||||
distance and an output iterator that can store a
|
||||
\ccc{boost::shared_ptr} of \ccc{Container} instances (each
|
||||
representing one offset polygon) into a resulting
|
||||
sequence. Typically, you'll use a back insertion iterator for
|
||||
that.
|
||||
|
||||
Each element in the resulting sequence is a \ccc{boost::shared_ptr}
|
||||
holding a dynamically allocated instance of the Container type. Such a
|
||||
container can be any model of the \ccc{VertexContainer_2} concept, for
|
||||
example, a \ccc{CGAL::Polygon_2}, or just a \ccc{std::vector} of 2D
|
||||
points.
|
||||
|
||||
Both algorithms (for the construction of the straight skeleton and
|
||||
offset polygons) are highly sensitive to roundoff errors, therefore,
|
||||
they needs exact predicates to be reliable. Without exact predicates
|
||||
is almost certain that they will fail resulting in a straight skeleton
|
||||
or polygon offset topologically inconsistent (incomplete or
|
||||
non-planar). Fortunately, they don't need exact constructions.
|
||||
|
||||
The recommendation is to use a filtering kernel such as
|
||||
\ccc{Exact_predicates_inexact_constructions_kernel}.
|
||||
|
||||
Both algorithms (for the construction of the straight skeleton and offset polygons) are highly sensitive to roundoff errors, therefore, they needs exact predicates to be reliable. Without exact predicates is almost certain that they will fail resulting in a straight skeleton or polygon offset topologically inconsistent (incomplete or non-planar). Fortunately, they don't need exact constructions.\\
|
||||
The recommendation is to use a filtering kernel such as \ccc{Exact_predicates_inexact_constructions_kernel}.
|
||||
|
||||
\subsection{Example}
|
||||
|
||||
|
|
@ -216,23 +388,36 @@ The recommendation is to use a filtering kernel such as \ccc{Exact_predicates_in
|
|||
|
||||
\section{Straight Skeletons, Medial Axis and Voronoi Diagrams}
|
||||
|
||||
The Straight Skeleton of a simple polygon looks similar to the Medial Axis and the Voronoi Diagram of the polygon in the way it partitions the polygon; however, unlike the Medial Axis and Voronoi Diagram, the
|
||||
bisectors are not equidistant to its defining edges but to the \textit{supporting lines} of such edges. As a result, Straight Skeleton bisectors might not be located in the center of the polygon and so cannot be regarded as a proper Medial Axis in its geometrical meaning.\\
|
||||
On the other hand, only reflex vertices (whose internal angle $>pi$) are the source of deviations of the bisectors from its center location. Therefore, for convex polygons, the Straight Skeleton, the Medial Axis
|
||||
and the Voronoi Diagram are \textit{exactly} equivalent, and, if a non-convex
|
||||
polygon contains only vertices of low reflexivity, the Straight Skeleton bisectors will be placed nearly equidistant to their defining edges, producing a Straight Skeleton pretty much alike a proper Medial Axis.
|
||||
The straight skeleton of a simple polygon looks similar to the medial
|
||||
axis and the Voronoi diagram of the polygon in the way it partitions
|
||||
the polygon; however, unlike the medial axis and Voronoi diagram, the
|
||||
bisectors are not equidistant to its defining edges but to the
|
||||
supporting lines of such edges. As a result, Straight Skeleton
|
||||
bisectors might not be located in the center of the polygon and so
|
||||
cannot be regarded as a proper Medial Axis in its geometrical meaning.
|
||||
|
||||
On the other hand, only reflex vertices (whose internal angle $>pi$)
|
||||
are the source of deviations of the bisectors from its center
|
||||
location. Therefore, for convex polygons, the straight skeleton, the
|
||||
medial axis and the Voronoi diagram are exactly equivalent,
|
||||
and, if a non-convex polygon contains only vertices of low
|
||||
reflexivity, the straight skeleton bisectors will be placed nearly
|
||||
equidistant to their defining edges, producing a straight skeleton
|
||||
pretty much alike a proper medial axis.
|
||||
|
||||
%% Straight Skeleton, Medial Axis and Voronoi Diagram figures here
|
||||
|
||||
\section{Straight Skeleton of a general figure in the plane}
|
||||
\section{Straight Skeleton of a General Figure in the Plane}
|
||||
|
||||
A Straight Skeleton can also be defined for a general multiply-connected planar directed straight-line graph by considering all the edges as embedded in an unbounded region. The only difference is that in this case some faces will be only partially bounded.\\
|
||||
This generalization was introduced in:
|
||||
A straight skeleton can also be defined for a general
|
||||
multiply-connected planar directed straight-line graph \cite{aa-skfgpf-95} by considering
|
||||
all the edges as embedded in an unbounded region. The only difference
|
||||
is that in this case some faces will be only partially bounded.
|
||||
|
||||
"Straight Skeletons for General Polygonal Figures in the Plane"\\
|
||||
O. AICHHOLZER, F. AURENHAMMER
|
||||
|
||||
Unfortunately, the current version of this CGAL package can only construct the straight skeleton in the interior of a simple polygon; currently, it doesn't handle general polygonal figures in the plane.
|
||||
The current version of this \cgal\ package can only construct the
|
||||
straight skeleton in the interior of a simple polygon, that is it
|
||||
doesn't handle general polygonal figures in the plane.
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of sfsooter
|
||||
|
|
|
|||
Loading…
Reference in New Issue