diff --git a/.gitattributes b/.gitattributes index 58f51bf833d..ea1d1d986ca 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1759,6 +1759,9 @@ Polynomial/include/CGAL/Polynomial/ipower.h -text Polynomial/include/CGAL/Polynomial/resultant.h -text Polynomial/include/CGAL/Polynomial/square_free_factorization.h -text Polynomial/include/CGAL/Polynomial/univariate_polynomial_utils.h -text +Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.eps -text svneol=unset#application/postscript +Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.gif -text svneol=unset#image/gif +Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.pdf -text svneol=unset#application/pdf Polytope_distance_d/test/Polytope_distance_d/create_test_PD_cin -text Polytope_distance_d/test/Polytope_distance_d/test_PD.cin -text Polytope_distance_d/test/Polytope_distance_d/test_PD_data/intersecting_segments.data -text diff --git a/Polytope_distance_d/doc_tex/Polytope_distance_d/PkgDescription.tex b/Polytope_distance_d/doc_tex/Polytope_distance_d/PkgDescription.tex new file mode 100644 index 00000000000..31fb1bb844a --- /dev/null +++ b/Polytope_distance_d/doc_tex/Polytope_distance_d/PkgDescription.tex @@ -0,0 +1,15 @@ + +\begin{ccPkgDescription}{Polytope Distance \label{Pkg:PolytopeDistance}} +\ccPkgHowToCiteCgal{cgal:fghhs-pd-07} +\ccPkgSummary{ +This package provides algorithms for computing the distance between the +convex hulls of two point sets in d-dimensional space, without +explicitely constructing the convex hulls. This package further provides +an algorithm to compute the width of a point set. +} + +%\ccPkgDependsOn{} +\ccPkgIntroducedInCGAL{1.1} +\ccPkgLicense{\ccLicenseQPL} +\ccPkgIllustration{Polytope_distance/minCircle.png}{Polytope_distance/minCircle.png} +\end{ccPkgDescription} diff --git a/Polytope_distance_d/doc_tex/Polytope_distance_d/main.tex b/Polytope_distance_d/doc_tex/Polytope_distance_d/main.tex new file mode 100644 index 00000000000..b16e71b695f --- /dev/null +++ b/Polytope_distance_d/doc_tex/Polytope_distance_d/main.tex @@ -0,0 +1,12 @@ + +\ccUserChapter{Polytope Distance \label{chap:PolytopeDistance}} +\ccChapterRelease{Release: WIP (\today)} +\ccChapterAuthor{Kaspar Fischer \and Bernd G{\"a}rtner \and Thomas Herrmann \and Michael Hoffmann + \and Sven Sch{\"o}nherr} + +%\minitoc + +\ccTexHtml{\thispagestyle{empty}}{} + +\input{Polytope_distance/PkgDescription.tex} +\input{Polytope_distance/user_part.tex} diff --git a/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.eps b/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.eps new file mode 100644 index 00000000000..db924379937 --- /dev/null +++ b/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.eps @@ -0,0 +1,124 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: polydist.eps +%%Creator: fig2dev Version 3.2 Patchlevel 1 +%%CreationDate: Wed Jun 16 19:41:16 1999 +%%For: gaertner@blabla (Bernd Gaertner) +%%Orientation: Portrait +%%BoundingBox: 0 0 165 201 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-291.0 393.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def + /DrawEllipse { + /endangle exch def + /startangle exch def + /yrad exch def + /xrad exch def + /y exch def + /x exch def + /savematrix mtrx currentmatrix def + x y tr xrad yrad sc 0 0 1 startangle endangle arc + closepath + savematrix setmatrix + } def + +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n -1000 7537 m -1000 -1000 l 8587 -1000 l 8587 7537 l cp clip + 0.06000 0.06000 sc +% Polyline +7.500 slw +n 5175 3525 m 4875 4125 l 5775 4725 l 6975 4425 l 7575 3825 l 6675 3225 l + cp gs col31 1.00 shd ef gr gs col0 s gr +% Polyline +n 4875 5025 m 6750 5475 l 7125 5925 l 6675 6525 l 5175 5625 l cp gs col31 1.00 shd ef gr gs col0 s gr +% Ellipse +n 5775 4720 35 35 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr + +% Polyline +15.000 slw +n 5775 4730 m 5685 5225 l gs col31 1.00 shd ef gr gs col0 s gr +7.500 slw +% Ellipse +n 5685 5220 35 35 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr + +$F2psEnd +rs diff --git a/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.gif b/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.gif new file mode 100644 index 00000000000..674c75aad79 Binary files /dev/null and b/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.gif differ diff --git a/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.pdf b/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.pdf new file mode 100644 index 00000000000..adeabb1930d Binary files /dev/null and b/Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.pdf differ diff --git a/Polytope_distance_d/doc_tex/Polytope_distance_d/user_part.tex b/Polytope_distance_d/doc_tex/Polytope_distance_d/user_part.tex new file mode 100644 index 00000000000..6a90e42b2ec --- /dev/null +++ b/Polytope_distance_d/doc_tex/Polytope_distance_d/user_part.tex @@ -0,0 +1,33 @@ + + +This chapter describes how to compute the distance between the convex +hulls of two given point sets in $d$-dimensional Euclidean space +(\ccc{CGAL::Polytope_distance_d}). Moreover, it is possible to +compute the width of a point set in three dimensions +(\ccc{CGAL::Width_3}). + +\begin{ccHtmlOnly} +
+ +
+\end{ccHtmlOnly} + +\begin{ccTexOnly} +\begin{center} +\includegraphics[width=4cm]{Optimisation/polydist} +\end{center} +\end{ccTexOnly} + +The obvious application is collision detection between convex bodies +in space. In the spirit of the bounding volume application above, it +also makes sense for nonconvex objects: a full intersection test +between complicated objects could in a first stage be approximated +with the test between the convex hulls of the objects. Only if the +hulls intersect, a full intersection test is necessary. + +To dampen fears concerning the performance of the distance +computation, we want to mention that the convex hulls of the input +point sets are not explicitly computed. This avoids a runtime which +grows exponentially in $d$. In fact, the runtime is almost always +linear in the size of the two point sets. +