diff --git a/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt b/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt index b74621e6f1b..ed6df8bba77 100644 --- a/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt +++ b/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt @@ -81,12 +81,26 @@ subdivision policy: \f$median\f$ policy (see \cgalFigureRef{Spatial_sorting_fig_ Hilbert sort with median policy \cgalFigureEnd +The middle policy is easier to analyze, and is interesting in practice +for well distributed set of points in small dimension (if the number +of points is really smaller than \f$ 2^d\f$). +The median policy should be preferred for high dimension or if +the point set distribution is not regular (or unknown). +Since the median policy cannot be much worse than the middle +policy, while the converse can happen, the median policy is the +default behavior. +Most theoretical results are using the middle policy +\cgalCite{acr-icb-03}, \cgalCite{bg-sfche-89}, \cgalCite{b-aahsf-71}, \cgalCite{pb-scpts-89}. + +\cgal provides Hilbert sorting for points in 2D, 3D and higher dimensions, +in the middle and the median policies. + We also consider space filling curves on a given sphere. The method is described for the unit sphere below; it works on any sphere by an affine transformation. The points to be sorted are supposed to be close to the sphere. Actually, we approximate a space filling curve on the unit sphere by a space filling curve on a cube (with facets at \f$x, y, z = \pm 1/\sqrt{3}\f$). -Roughly speaking, we split the original set of points in six subsets corresponding to the six facets of the cube. The subset corresponding to a facet \f$f\f$ is the set of points that lie in the half-space defined by the supporting plane of \f$f\f$ that does not contain the origin. And then we basically use the 2D Hilbert sort as explained above for the projection of the points in each subset on its corresponding facet of the cube. The axes orientation on each facet is chosen so that the space filling curve covers the whole cube without any jump; see \cgalFigureRef{Spatial_sorting_fig_Faces_orientations}. +Roughly speaking, we split the original set of points in six subsets corresponding to the six facets of the cube. The subset corresponding to a facet \f$f\f$ is the set of points that lie in the half-space defined by the supporting plane of \f$f\f$ that does not contain the origin. And then we basically use the 2D Hilbert sort with its corresponding policy, as explained above for the projection of the points in each subset on its corresponding facet of the cube. The axes orientation on each facet is chosen so that the space filling curve covers the whole cube without any jump; see \cgalFigureRef{Spatial_sorting_fig_Faces_orientations}. A point can lie in more than one such half-plane, so, we give a priority for each facet of the cube. The priority order is: first, the facet of the cube at \f$x = 1/\sqrt{3}\f$; second, the facet of the cube at \f$y = 1/\sqrt{3}\f$; third, the facet of the cube at \f$ x = -1/\sqrt{3}\f$; fourth, the facet of the cube at \f$ z = 1/\sqrt{3}\f$; fifth, the facet of the cube at \f$ y = -1/\sqrt{3}\f$; and, sixth, the facet of the cube at \f$ z = -1/\sqrt{3}\f$. @@ -102,20 +116,6 @@ Points sorted on the sphere according to the description above are depicted in \ Hilbert sort on the sphere \cgalFigureEnd -\cgal provides Hilbert sorting for points in 2D, 3D and higher dimensions, -in the middle and the median policies. - -The middle policy is easier to analyze, and is interesting in practice -for well distributed set of points in small dimension (if the number -of points is really smaller than \f$ 2^d\f$). -The median policy should be preferred for high dimension or if -the point set distribution is not regular (or unknown). -Since the median policy cannot be much worse than the middle -policy, while the converse can happen, the median policy is the -default behavior. -Most theoretical results are using the middle policy -\cgalCite{acr-icb-03}, \cgalCite{bg-sfche-89}, \cgalCite{b-aahsf-71}, \cgalCite{pb-scpts-89}. - \subsection Spatial_sortingExamples Examples