You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Snap_rounding_2/doc/Snap_rounding_2/Snap_rounding_2.txt
+8-13Lines changed: 8 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -94,15 +94,15 @@ An arrangement of segments before subdividing the segments (a), after subdividin
94
94
We evaluate the different methods on two tests:
95
95
In the first test, the segment endpoints are chosen uniformly and independantly in the unit box.
96
96
In the second test, we generate perturbed copies of a given segment. This experiment is repeated several times using different input segments.
97
-
The two pixel sizes for hot pixel snap rounding are chosen such that the rounding shift is of the same order of magnitude as the rounding induced by using `double` or `float` coordinates.
97
+
The two pixel sizes for Hot Pixel Snap Rounding are chosen such that the rounding shift is of the same order of magnitude as the rounding induced by using `double` or `float` coordinates.
98
98
99
99
The first test is standard but typically exhibits few, if any, rounding issues.
100
100
The second test is deliberately designed to be difficult, as it produces a large number of rounding issues when rounding is performed naively.
101
-
In these settings, vertical slab snap rounding significantly outperforms hot pixel snap rounding and remains of the same order of magnitude than computing the intersections without snap.
101
+
In these settings, vertical slab snap rounding significantly outperforms Hot Pixel Snap Rounding and remains of the same order of magnitude than computing the intersections without snap.
102
102
The result of our test is summarized in the next table:
103
103
104
104
<center>
105
-
| Test Case | Computing intersection<br> (Unsafe rounding) | Vertical slab SR <br> (double) | Vertical Slab SR <br> (float) | Hot pixel SR <br>(pixel size \f$10^{-15}\f$ ) | Hot pixel SR <br>(pixel size \f$10^{-7}\f$) |
105
+
| Test Case | Computing intersection<br> (Unsafe rounding) | Vertical Slab SR <br> (double) | Vertical Slab SR <br> (float) | Hot Pixel SR <br>(pixel size \f$10^{-15}\f$ ) | Hot Pixel SR <br>(pixel size \f$10^{-7}\f$) |
@@ -120,22 +120,19 @@ vertices is \f$O(n^3)\f$, or \f$O(n^2)\f$ if the input segments are free of inte
120
120
121
121
\section Snap_rounding_2API Snap Rounding API and Examples
122
122
123
-
Both algorithms can be invoked through the \ref snap_rounding_2_fct "CGAL::snap_rounding_2()" function.
124
-
\ref snap_rounding_2_fct "CGAL::snap_rounding_2()" take a range of input segments and, by default, produces a range of polylines, each polyline corresponding to an input segment.
123
+
Both algorithms can be invoked through the \ref snap_rounding_2_fct "CGAL::snap_rounding_2()" function, which takes a range of input segments and, by default, produces a range of polylines, each polyline corresponding to an input segment.
125
124
Consequently, duplicate segments may appear in the output, for instance when multiple input segments collapse. When the parameter `output_unique_segments` is set to `true`,
126
125
the polylines are decomposed into individual segments (they are represented as polylines with two points), and duplicates are removed.
127
126
An overload also supports as input and output polygon ranges.
128
-
By default, the Vertical Slab Snap Rounding algorithm to double precision is used. The other method or other rounding schemes can be used depending on the traits class provided.
127
+
By default, the Vertical Slab Snap Rounding algorithm to double precision is used. Other methods or other rounding schemes can be used depending on the traits class provided.
129
128
Specific methods also exist: `CGAL::vertical_slab_snap_rounding_2()` and `CGAL::hot_pixel_snap_rounding_2`.
When using Hot Pixel SR, the traits class must be a model of `HotPixelSnapRoundingTraits_2`. The class `Hot_pixel_snap_rounding_traits_2` is such a model.
135
132
136
-
When using Vertical Slab SR, the traits class must be a model of `VerticalSlabSnapRoundingTraits_2`. By default,
137
-
the traits class `Double_grid_snap_rounding_traits_2`, which rounds coordinates to double precision floating point,
138
-
is used. The package also provides `Float_grid_snap_rounding_traits_2` and `Integer_grid_snap_rounding_traits_2`, which rounds coordinates to
133
+
When using Vertical Slab SR, the traits class must be a model of `VerticalSlabSnapRoundingTraits_2`. By default,
134
+
the traits class `CGAL::Double_grid_snap_rounding_traits_2`, which rounds coordinates to double precision floating point,
135
+
is used. The package also provides `CGAL::Float_grid_snap_rounding_traits_2` and `CGAL::Integer_grid_snap_rounding_traits_2`, which rounds coordinates to
139
136
single precision floating point and integers, respectively. Other traits classes can be used to round to different representations or rounding schemes as long as
140
137
the rounding operation preserves the order of vertices along the \f$x\f$ and \f$y\f$ directions.
141
138
See `VerticalSlabSnapRoundingTraits_2` for more details.
@@ -160,8 +157,6 @@ The package is supplied with a graphical demo program that opens a window,
160
157
allows the user to edit segments dynamically, applies a selected
161
158
snap-rounding procedures, and displays the result onto the same window
162
159
(see `<CGAL_ROOT>/GraphicsView/demo/Snap_rounding_2/Snap_rounding_2.cpp`).
163
-
164
-
165
160
\section Snap_rounding_history Implementation History
166
161
167
162
Snap Rounding and Iterative Snap Rounding was introduced by Eli Packer in 2001.
0 commit comments