Some Fixes for #3457

This commit is contained in:
Andreas Fabri 2019-03-19 19:20:40 +01:00
parent eaace93cf3
commit e254a770df
7 changed files with 24 additions and 24 deletions

View File

@ -43,7 +43,7 @@ Example's point pattern.
\cgalExample{Barycentric_coordinates_2/Segment_coordinates_example.cpp}
\subsection tri_example Triangle Coordinates
In this example we show how to use the class `CGAL::Barycentric_coordinates::Triangle_coordinates_2` with the `Simple_cartesian` kernel for double type. We compute coordinates for three sets of points: interior (green), boundary (red), and exterior (blue). Note that some of the coordinate values for the exterior points are negative. We use a standard container of the type <a href="http://en.cppreference.com/w/cpp/container/vector">`std::vector`</a> and <a href="http://en.cppreference.com/w/cpp/iterator/insert_iterator">`std::insert_iterator`</a> to access and store the resulting coordinate values.
In this example we show how to use the class `CGAL::Barycentric_coordinates::Triangle_coordinates_2` with the `Simple_cartesian` kernel for double type. We compute coordinates for three sets of points: interior (green), boundary (red), and exterior (blue). Note that some of the coordinate values for the exterior points are negative. We use a standard container of the type <a href="https://en.cppreference.com/w/cpp/container/vector">`std::vector`</a> and <a href="https://en.cppreference.com/w/cpp/iterator/insert_iterator">`std::insert_iterator`</a> to access and store the resulting coordinate values.
\anchor tri_coord_example
\cgalFigureBegin{tri__example,triangle_coordinates_example.png}
@ -53,12 +53,12 @@ Example's point pattern.
\cgalExample{Barycentric_coordinates_2/Triangle_coordinates_example.cpp}
\subsection wp_example Wachspress Coordinates
In the following example we create 1000 random points, then we take the convex hull of this set of points as our polygon, and compute Wachspress coordinates at all the defined points. We use the `Simple_cartesian` kernel with double type as a traits class and store obtained coordinate values in a container of the type <a href="http://en.cppreference.com/w/cpp/container/vector">`std::vector`</a>. The output iterator is <a href="http://en.cppreference.com/w/cpp/iterator/back_insert_iterator">`std::back_insert_iterator`</a>.
In the following example we create 1000 random points, then we take the convex hull of this set of points as our polygon, and compute Wachspress coordinates at all the defined points. We use the `Simple_cartesian` kernel with double type as a traits class and store obtained coordinate values in a container of the type <a href="https://en.cppreference.com/w/cpp/container/vector">`std::vector`</a>. The output iterator is <a href="https://en.cppreference.com/w/cpp/iterator/back_insert_iterator">`std::back_insert_iterator`</a>.
\cgalExample{Barycentric_coordinates_2/Wachspress_coordinates_example.cpp}
\subsection dh_example Discrete Harmonic Coordinates
In this example we compute discrete harmonic coordinates for a set of green (interior), red (boundary), and blue (exterior) points with respect to a unit square. We also show how to specify the location of a query point using additional function parameters. The used kernel is exact, and we use an output container of the type <a href="http://en.cppreference.com/w/cpp/container/vector">`std::vector`</a>. Since all the points are symmetric, it is easy to debug the correctness of the obtained coordinate values. The output iterator is <a href="http://en.cppreference.com/w/cpp/iterator/back_insert_iterator">`std::back_insert_iterator`</a>.
In this example we compute discrete harmonic coordinates for a set of green (interior), red (boundary), and blue (exterior) points with respect to a unit square. We also show how to specify the location of a query point using additional function parameters. The used kernel is exact, and we use an output container of the type <a href="https://en.cppreference.com/w/cpp/container/vector">`std::vector`</a>. Since all the points are symmetric, it is easy to debug the correctness of the obtained coordinate values. The output iterator is <a href="https://en.cppreference.com/w/cpp/iterator/back_insert_iterator">`std::back_insert_iterator`</a>.
\anchor dh_coord_example
\cgalFigureBegin{dh__example,discrete_harmonic_coordinates_example.png}
@ -68,7 +68,7 @@ Example's point pattern.
\cgalExample{Barycentric_coordinates_2/Discrete_harmonic_coordinates_example.cpp}
\subsection mv_example Mean Value Coordinates
This is an example that shows how to compute mean value coordinates for a set of green points in a star-shaped polygon. We note that this type of coordinates is well-defined for such a concave polygon while Wachspress and discrete harmonic coordinates are not. However, it may give negative coordinate values for points outside <a href="https://en.wikipedia.org/wiki/Star-shaped_polygon">the polygon's kernel</a> (shown in red). We use an inexact data type, an output container of the type <a href="http://en.cppreference.com/w/cpp/container/vector">`std::vector`</a>, and an output iterator of the type <a href="http://en.cppreference.com/w/cpp/iterator/back_insert_iterator">std::back_insert_iterator</a> to compute, access, and store the resulting coordinate values. We also show how to choose different algorithms to compute generalized barycentric coordinates (one is more precise while the other is faster).
This is an example that shows how to compute mean value coordinates for a set of green points in a star-shaped polygon. We note that this type of coordinates is well-defined for such a concave polygon while Wachspress and discrete harmonic coordinates are not. However, it may give negative coordinate values for points outside <a href="https://en.wikipedia.org/wiki/Star-shaped_polygon">the polygon's kernel</a> (shown in red). We use an inexact data type, an output container of the type <a href="https://en.cppreference.com/w/cpp/container/vector">`std::vector`</a>, and an output iterator of the type <a href="https://en.cppreference.com/w/cpp/iterator/back_insert_iterator">std::back_insert_iterator</a> to compute, access, and store the resulting coordinate values. We also show how to choose different algorithms to compute generalized barycentric coordinates (one is more precise while the other is faster).
\anchor mv_coord_example
\cgalFigureBegin{mv__example,mean_value_coordinates_example.png}
@ -193,7 +193,7 @@ After the normalization of these weights as before
<center>\f$b_i = \frac{w_i}{W^{mv}}\qquad\f$ with \f$\qquad W^{mv} = \sum_{j=1}^n w_j\f$</center>
we obtain the precise \f$O(n^2)\f$ algorithm. The fast O(n) algorithm computes the weights \f$w_i\f$ using the pseudocode from <a href="http://www.inf.usi.ch/hormann/nsfworkshop/presentations/Hormann.pdf">here</a>. These weights
we obtain the precise \f$O(n^2)\f$ algorithm. The fast O(n) algorithm computes the weights \f$w_i\f$ using the pseudocode from <a href="https://www.inf.usi.ch/hormann/nsfworkshop/presentations/Hormann.pdf">here</a>. These weights
<center>\f$w_i = \frac{t_{i-1} + t_i}{r_i}\qquad\f$ with \f$\qquad t_i = \frac{\text{det}(d_i, d_{i+1})}{r_ir_{i+1} + d_id_{i+1}}\f$</center>
@ -231,7 +231,7 @@ The package is implemented in a way that later, if needed, other two-dimensional
\section gbc_theory Theory of 2D Generalized Barycentric Coordinates
In 1827, the German mathematician and theoretical astronomer <a href="http://en.wikipedia.org/wiki/August_Ferdinand_Möbius">August Ferdinand Möbius</a> (1790--1868) proposed a method \cite cgal:bc:m-dbc-27 to find coordinates of a point in the plane with respect to the vertices of a triangle. These coordinates are called <a href="http://mathworld.wolfram.com/BarycentricCoordinates.html">triangle barycentric coordinates</a> (sometimes <a href="http://en.wikipedia.org/wiki/Barycentric_coordinate_system">area coordinates</a>), and they are widely used in a variety of applications. Some of these applications are linear interpolation over a triangle and a triangle inclusion test. The first one is used for so-called <a href="http://en.wikipedia.org/wiki/Shading">shading</a>, and the second one arises in the <a href="http://en.wikipedia.org/wiki/Rasterization">rasterization</a> step when an image in vector graphics format needs to be converted into a raster image.
In 1827, the German mathematician and theoretical astronomer <a href="https://en.wikipedia.org/wiki/August_Ferdinand_Möbius">August Ferdinand Möbius</a> (1790--1868) proposed a method \cite cgal:bc:m-dbc-27 to find coordinates of a point in the plane with respect to the vertices of a triangle. These coordinates are called <a href="http://mathworld.wolfram.com/BarycentricCoordinates.html">triangle barycentric coordinates</a> (sometimes <a href="https://en.wikipedia.org/wiki/Barycentric_coordinate_system">area coordinates</a>), and they are widely used in a variety of applications. Some of these applications are linear interpolation over a triangle and a triangle inclusion test. The first one is used for so-called <a href="https://en.wikipedia.org/wiki/Shading">shading</a>, and the second one arises in the <a href="https://en.wikipedia.org/wiki/Rasterization">rasterization</a> step when an image in vector graphics format needs to be converted into a raster image.
Triangle barycentric coordinates have many important properties, including \em constant and <em>linear precision</em>, <em> the Lagrange property</em>, and <em>positivity inside a triangle</em>. These properties make these coordinates a unique tool in many scientific fields. If we restrict triangle coordinates to one of the edges of a triangle and its supporting line, we get barycentric coordinates with respect to a segment and call them \ref compute_seg_coord "segment coordinates".
@ -265,7 +265,7 @@ To plot discrete harmonic coordinates we take \ref wp_plot "the same polygon" as
The discrete harmonic coordinate function with respect to the indicated vertex with values from zero to one as the colour bar indicates.
\cgalFigureEnd
The last type of generalized barycentric coordinates that we discuss are mean value coordinates \cite cgal:f-mvc-03 proposed by M. Floater in 2003. Based on the <a href="http://en.wikipedia.org/wiki/Mean_value_theorem">mean value theorem</a>, \ref gbc_deg_mean_value_coordinates "these coordinates", unlike Wachspress and discrete harmonic coordinates, are well-defined for arbitrary <em>simple polygons</em>, inherit all the properties of triangle coordinates for any convex polygon, and <em>lack only the positivity property for general concave polygons</em>. Hormann and Floater prove in \cite cgal:bc:hf-mvcapp-06 that these coordinates are positive inside the kernel of a <a href="https://en.wikipedia.org/wiki/Star-shaped_polygon">star-shaped polygon</a>. They are also positive in the closure of any quadrilateral. Like discrete harmonic weights, mean value weights are often used in the context of \ref PkgSurfaceMeshParameterization "triangle mesh parameterization."
The last type of generalized barycentric coordinates that we discuss are mean value coordinates \cite cgal:f-mvc-03 proposed by M. Floater in 2003. Based on the <a href="https://en.wikipedia.org/wiki/Mean_value_theorem">mean value theorem</a>, \ref gbc_deg_mean_value_coordinates "these coordinates", unlike Wachspress and discrete harmonic coordinates, are well-defined for arbitrary <em>simple polygons</em>, inherit all the properties of triangle coordinates for any convex polygon, and <em>lack only the positivity property for general concave polygons</em>. Hormann and Floater prove in \cite cgal:bc:hf-mvcapp-06 that these coordinates are positive inside the kernel of a <a href="https://en.wikipedia.org/wiki/Star-shaped_polygon">star-shaped polygon</a>. They are also positive in the closure of any quadrilateral. Like discrete harmonic weights, mean value weights are often used in the context of \ref PkgSurfaceMeshParameterization "triangle mesh parameterization."
In order to show the particular behaviour of mean value coordinates with an application to concave polygons, we take \ref fig__mv__example "a star-shaped polygon" with ten vertices \f$[v_0, \dots, v_9]\f$, sample its interior and boundary, and plot the coordinate function with respect to the fourth vertex \f$v_3\f$. As the colour bar indicates, the obtained function grows from a slightly negative value to one at the chosen vertex. It is also smooth inside the polygon and linear along all edges.
@ -276,7 +276,7 @@ Mean value coordinates with respect to \f$v_3\f$. The colour bar indicates the r
<b>Interesting fact</b>: all the coordinates discussed in this section and implemented in the package come from one and the same family of generalized barycentric coordinates named <em>3-point family of coordinates</em> \cite cgal:bc:fhk-gcbcocp-06.
\section gbc_acknowledgments Acknowledgments
The authors wish to thank <a href="http://www.inf.usi.ch/phd/schneider/">Teseo Schneider</a> and <a href="http://search.usi.ch/people/5ae37d3d990b431a02b95b0b606da2e6/Schaerfig-Randolf">Randolf Schaerfig</a> for helpful comments and discussions. We also appreciate the great effort invested in this package by our reviewers <a href="http://geometryfactory.com/who-we-are/">Andreas Fabri and Sébastien Loriot</a>. Finally, to create pictures for this manual, we used two programs: <a href="http://www.geogebra.org/cms/en/">Geogebra</a> and <a href="http://www.mathworks.com/products/matlab/">Matlab</a>.
The authors wish to thank <a href="https://www.inf.usi.ch/phd/schneider/">Teseo Schneider</a> and <a href="https://search.usi.ch/people/5ae37d3d990b431a02b95b0b606da2e6/Schaerfig-Randolf">Randolf Schaerfig</a> for helpful comments and discussions. We also appreciate the great effort invested in this package by our reviewers <a href="https://geometryfactory.com/who-we-are/">Andreas Fabri and Sébastien Loriot</a>. Finally, to create pictures for this manual, we used two programs: <a href="https://www.geogebra.org">Geogebra</a> and <a href="https://www.mathworks.com/products/matlab.html">Matlab</a>.
*/

View File

@ -20,7 +20,7 @@ We adopted the definition of the Standard \cpp
allocator \cgalCite{cgal:ansi-is14882-98}. The `std::allocator` is the
only predefined and required allocator imposed by [\cpp] on all \cpp
compiler implementations. The exact specification can also be found at
<A HREF="http://en.wikipedia.org/wiki/Allocator_(C++)"><TT>http://en.wikipedia.org/wiki/Allocator_(C++)</TT></A>.
<A HREF="https://en.wikipedia.org/wiki/Allocator_(C++)"><TT>https://en.wikipedia.org/wiki/Allocator_(C++)</TT></A>.
Objects of type `std::allocator<T>` can be used to obtain small, typed
chunks of memory to be used, for example, as static members of a class.

View File

@ -136,7 +136,7 @@ contains the following subdirectories:
The directories `include/CGAL/CORE` and `src/CGALCore` contain a
distribution of the \sc{Core} library\cgalFootnote{<A HREF="http://www.cs.nyu.edu/exact/">`http://www.cs.nyu.edu/exact/`</A>} version 1.7 for
distribution of the \sc{Core} library\cgalFootnote{<A HREF="https://www.cs.nyu.edu/exact/">`https://www.cs.nyu.edu/exact/`</A>} version 1.7 for
dealing with algebraic numbers. \sc{Core} is not part of \cgal and has its
own license.
@ -170,11 +170,11 @@ It may work for older versions of the above listed compilers.
In order to configure, build, and install the \cgal libraries, examples and
demos, you need CMake, a cross-platform "makefile generator".
If CMake is not installed already you can obtain it from <A HREF="http://www.cmake.org/">`http://www.cmake.org/`</A>.
If CMake is not installed already you can obtain it from <A HREF="https://www.cmake.org/">`https://www.cmake.org/`</A>.
CMake version 3.1 or higher is required.
This manual explains only those features of
CMake which are needed in order to build \cgal. Please refer to the
CMake documentation at <A HREF="http://www.cmake.org/">`http://www.cmake.org/`</A> for further details.
CMake documentation at <A HREF="https://www.cmake.org/">`https://www.cmake.org/`</A> for further details.
Before building \cgal you have to choose the compiler/linker,
set compiler and linker flags, specify which
@ -405,8 +405,8 @@ not depend on the DLL's of those two libraries.
In \cgal some demos and examples depend on `Boost.Program_options`.
In case the \sc{Boost} libraries are not installed on your system already, you
can obtain them from <A HREF="http://www.boost.org/">`http://www.boost.org/`</A>. For Visual C++ you can download precompiled libraries
from <A HREF="http://sourceforge.net/projects/boost/files/boost-binaries/">`http://sourceforge.net/projects/boost/files/boost-binaries/`</A>.
can obtain them from <A HREF="https://www.boost.org/">`https://www.boost.org/`</A>. For Visual C++ you can download precompiled libraries
from <A HREF="https://sourceforge.net/projects/boost/files/boost-binaries/">`https://sourceforge.net/projects/boost/files/boost-binaries/`</A>.
For Visual C++ versions prior to 2015 `Boost.Thread` is required, so make sure to either install the precompiled
libraries for your compiler or build `libboost-thread` and `libboost-system`.
@ -428,7 +428,7 @@ solution, and we recommend to use them.
Having \sc{Gmp} version 4.2 or higher and \sc{Mpfr} version 2.2.1 or higher
installed is recommended. These libraries can be obtained from
<A HREF="http://gmplib.org/">`http://gmplib.org/`</A> and <A HREF="http://www.mpfr.org/">`http://www.mpfr.org/`</A>, respectively.
<A HREF="https://gmplib.org/">`https://gmplib.org/`</A> and <A HREF="https://www.mpfr.org/">`https://www.mpfr.org/`</A>, respectively.
As Visual \cpp is not properly
supported by the \sc{Gmp} and \sc{Mpfr} projects, we provide precompiled versions
@ -461,7 +461,7 @@ Qt is a cross-platform application and UI framework.
The component libCGAL_Qt5 requires \sc{Qt}5 installed on your system.
In case \sc{Qt} is not yet installed on your system, you can download
it from <A HREF="http://qt-project.org/">`http://qt-project.org/`</A>.
it from <A HREF="http://www.qt-project.org/">`http://www.qt-project.org/`</A>.
The exhaustive list of \sc{Qt}5 components used in demos is:
@ -591,7 +591,7 @@ vision, computer graphics and machine learning.
In \cgal, \sc{OpenCV} is used by the \ref PkgClassificationRef package.
The \sc{OpenCV} web site is <A HREF="http://opencv.org/">`http://opencv.org/`</A>.
The \sc{OpenCV} web site is <A HREF="https://opencv.org/">`https://opencv.org/`</A>.
\subsection thirdpartyTensorFlow TensorFlow

View File

@ -542,9 +542,9 @@ cell base classes, the `MeshVertexBase_3` and
`MeshCellBase_3` concepts impose additional requirements.
Parallel algorithms require the executable to be linked against the
<a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
<a href="https://www.threadingbuildingblocks.org">Intel TBB library</a>.
To control the number of threads used, the user may use the tbb::task_scheduler_init class.
See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
See the <a href="https://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
for more details.
\section Mesh_3_section_examples Examples

View File

@ -52,8 +52,8 @@ two input polygons are convex, their edges are already sorted by the angle
they form with the \f$ x\f$-axis; see the figure above.
The Minkowski sum can therefore be computed using an operation similar to the
merge step of the merge-sort algorithm\cgalFootnote{See, for example,
<a href="http://en.wikipedia.org/wiki/Merge_sort">
http://en.wikipedia.org/wiki/Merge_sort</a>.} in \f$ O(m + n)\f$ time,
<a href="https://en.wikipedia.org/wiki/Merge_sort">
https://en.wikipedia.org/wiki/Merge_sort</a>.} in \f$ O(m + n)\f$ time,
starting from the two bottommost vertices in \f$ P\f$ and in \f$ Q\f$ and
merging the ordered list of edges.

View File

@ -8,7 +8,7 @@ programs according to the concepts `QuadraticProgram`,
`LinearProgram`,
`NonnegativeQuadraticProgram`, and
`NonnegativeLinearProgram`, see also
<A HREF="http://en.wikipedia.org/wiki/MPS_(format)"><TT>http://en.wikipedia.org/wiki/MPS_(format)</TT></A>.
<A HREF="https://en.wikipedia.org/wiki/MPS_(format)"><TT>https://en.wikipedia.org/wiki/MPS_(format)</TT></A>.
\cgal supports a large subset of
this format, but there are MPS files around that we cannot read (for

View File

@ -31,8 +31,8 @@ is met, such as reaching the desired number of edges.
The algorithm implemented here is generic in the sense that it does not require the surface mesh
to be of a particular type but to be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts.
The design is <A HREF="http://en.wikipedia.org/wiki/Policy-based_design"><I>policy-based</I></A>
(<A HREF="http://en.wikipedia.org/wiki/Policy-based_design"><TT>http://en.wikipedia.org/wiki/Policy-based_design</TT></A>),
The design is <A HREF="https://en.wikipedia.org/wiki/Policy-based_design"><I>policy-based</I></A>
(<A HREF="https://en.wikipedia.org/wiki/Policy-based_design"><TT>https://en.wikipedia.org/wiki/Policy-based_design</TT></A>),
meaning that you can customize some aspects of the process by passing a set of
<I>policy objects</I>. Each policy object specifies a particular aspect of the algorithm,
such as how edges are selected and where the replacement vertex is placed. All policies have