diff --git a/.gitignore b/.gitignore index 56a455a..e9eb1e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,232 @@ # Created by https://www.gitignore.io/api/vim,python + +### LaTeX ### +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync +*Notes.bib + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary + +# listings +*.lol + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlo + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# easy-todo +*.lod + +# xindy +*.xdy + +# xypic precompiled matrices +*.xyc + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# auto folder when using emacs and auctex +/auto/* + +# expex forward references with \gathertags +*-tags.tex + + ### Python ### # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/compte_rendu/MyPack2.sty b/compte_rendu/MyPack2.sty index 840c748..6b753b1 100644 --- a/compte_rendu/MyPack2.sty +++ b/compte_rendu/MyPack2.sty @@ -21,6 +21,7 @@ \RequirePackage{listings} \RequirePackage{graphicx} \RequirePackage{amsfonts} +\RequirePackage{amsmath} diff --git a/compte_rendu/compte_rendu.aux b/compte_rendu/compte_rendu.aux index 24abad9..a52674a 100644 --- a/compte_rendu/compte_rendu.aux +++ b/compte_rendu/compte_rendu.aux @@ -1,23 +1,43 @@ \relax +\catcode `:\active +\catcode `;\active +\catcode `!\active +\catcode `?\active \select@language{french} \@writefile{toc}{\select@language{french}} \@writefile{lof}{\select@language{french}} \@writefile{lot}{\select@language{french}} -\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Différentes positions possible de points par rapport à $A$ et $B$\relax }}{3}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Diff\IeC {\'e}rentes positions possible de points par rapport \IeC {\`a} $A$ et $B$\relax }}{3}} \providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}} \newlabel{fig:positionsC}{{1}{3}} \@writefile{toc}{\contentsline {part}{I\hspace {1em}Objectifs de ce TL}{3}} -\@writefile{toc}{\contentsline {part}{II\hspace {1em}Génération de carte routière réaliste}{3}} +\@writefile{toc}{\contentsline {part}{II\hspace {1em}G\IeC {\'e}n\IeC {\'e}ration de carte routi\IeC {\`e}re r\IeC {\'e}aliste}{3}} \@writefile{toc}{\contentsline {section}{\numberline {1}Condition pour un graphe de Gabriel}{3}} \newlabel{eq:condArete}{{1}{3}} \@writefile{toc}{\contentsline {paragraph}{preuve :}{3}} \@writefile{toc}{\contentsline {section}{\numberline {2}Mise en pratique : graphe de Gabriel et de voisinage relatif}{3}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Création de graphe de Gabriel et de voisinage relatif}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Cr\IeC {\'e}ation de graphe de Gabriel et de voisinage relatif}{3}} \@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Graphe de gabriel\relax }}{4}} \newlabel{fig:2_4_gabriel}{{2}{4}} \@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Graphe de voisinage realtif\relax }}{5}} \newlabel{fig:2_4_gvr}{{3}{5}} +\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces R\IeC {\'e}seau g\IeC {\'e}n\IeC {\'e}r\IeC {\'e}\relax }}{6}} +\newlabel{fig:2_5}{{4}{6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}G\IeC {\'e}n\IeC {\'e}ration d'un r\IeC {\'e}seau}{6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Temps de g\IeC {\'e}n\IeC {\'e}ration d'un r\IeC {\'e}seau}{6}} \@writefile{toc}{\contentsline {section}{\numberline {3}Triangulation de Delaunay}{6}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Pratique}{6}} -\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Aspect théorique}{6}} -\@writefile{toc}{\contentsline {part}{III\hspace {1em}Algorithme de Dijkstra pour la recherche du plus court chemin}{6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Aspect th\IeC {\'e}orique}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.1}Condition pour un graphe de Delaunay}{6}} +\@writefile{toc}{\contentsline {paragraph}{preuve:}{6}} +\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Cas o\IeC {\`u} le graphe de Delaunay n'est pas planaire.\relax }}{7}} +\newlabel{fig:delaunayPasPlanaire}{{5}{7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.2}Le graphe de Delaunay est planaire}{7}} +\@writefile{toc}{\contentsline {paragraph}{preuve}{7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.3}Le graphe de Delaunay est une triangulation}{7}} +\@writefile{toc}{\contentsline {paragraph}{preuve}{7}} +\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Maille polygonale.\relax }}{8}} +\newlabel{fig:maillePolygonale}{{6}{8}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.4}Condition sur les faces}{8}} +\@writefile{toc}{\contentsline {paragraph}{preuve}{8}} +\@writefile{toc}{\contentsline {part}{III\hspace {1em}Algorithme de Dijkstra pour la recherche du plus court chemin}{8}} diff --git a/compte_rendu/compte_rendu.lof b/compte_rendu/compte_rendu.lof index b71b2be..9d7685c 100644 --- a/compte_rendu/compte_rendu.lof +++ b/compte_rendu/compte_rendu.lof @@ -1,4 +1,7 @@ \select@language {french} -\contentsline {figure}{\numberline {1}{\ignorespaces Différentes positions possible de points par rapport à $A$ et $B$\relax }}{3} +\contentsline {figure}{\numberline {1}{\ignorespaces Diff\IeC {\'e}rentes positions possible de points par rapport \IeC {\`a} $A$ et $B$\relax }}{3} \contentsline {figure}{\numberline {2}{\ignorespaces Graphe de gabriel\relax }}{4} \contentsline {figure}{\numberline {3}{\ignorespaces Graphe de voisinage realtif\relax }}{5} +\contentsline {figure}{\numberline {4}{\ignorespaces R\IeC {\'e}seau g\IeC {\'e}n\IeC {\'e}r\IeC {\'e}\relax }}{6} +\contentsline {figure}{\numberline {5}{\ignorespaces Cas o\IeC {\`u} le graphe de Delaunay n'est pas planaire.\relax }}{7} +\contentsline {figure}{\numberline {6}{\ignorespaces Maille polygonale.\relax }}{8} diff --git a/compte_rendu/compte_rendu.pdf b/compte_rendu/compte_rendu.pdf index 4c3a146..c74e025 100644 Binary files a/compte_rendu/compte_rendu.pdf and b/compte_rendu/compte_rendu.pdf differ diff --git a/compte_rendu/compte_rendu.synctex.gz b/compte_rendu/compte_rendu.synctex.gz index fb90a3e..388b39a 100644 Binary files a/compte_rendu/compte_rendu.synctex.gz and b/compte_rendu/compte_rendu.synctex.gz differ diff --git a/compte_rendu/compte_rendu.tex b/compte_rendu/compte_rendu.tex index 7d77089..8ebba93 100644 --- a/compte_rendu/compte_rendu.tex +++ b/compte_rendu/compte_rendu.tex @@ -91,6 +91,13 @@ En combinant la génération de graphe de Gabriel et de voisinage relatif, on pe \end{figure} \subsection{Temps de génération d'un réseau} +La figure \ref{fig:reseaunaiflog} montre le temps nécessaire à la création d'un réseau. +\begin{figure} + \centering + \includegraphics[width=0.7\linewidth]{images/reseau_naif_log} + \caption{} + \label{fig:reseaunaiflog} +\end{figure} @@ -98,6 +105,98 @@ En combinant la génération de graphe de Gabriel et de voisinage relatif, on pe \subsection{Pratique} \subsection{Aspect théorique} +\subsubsection{Condition pour un graphe de Delaunay} +Pour toute paire $\{A,B\}$ de points de $\mathcal{V}$, si on appelle $\mathcal{P}$ et $\mathcal{P}'$ les deux demis plans fermés de frontière $(A,B)$ privés de $A$ et $B$, alors $\{A,B\}$ est une arête de la triangulation de Delaunay sit et seulement si +\[ +\forall C\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ACB} + \widehat{ADB} \leq \pi +\] +\paragraph{preuve:} +Supposons que $\{A,B\}$ soit une arête. Il existe donc un cercle $\mathcal{C}$ d'intérieur vide avec $A$ et $B$ sur le cercle. Cela correspond aux lignes $\mathcal{L}(\theta, A, B)$ et $\mathcal{L}(\pi - \theta, A, B)$. Quitte à renommer $\mathcal{P}$ et $\mathcal{P}'$, on peut supposer que le premier contour correspond à $\mathcal{P}$. On a donc : +\begin{align} + \forall C \in \mathcal{P}\cap \mathcal{V}, \widehat{ACB} < \theta \\ + \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ADB} < \theta - \pi +\end{align} + +Ainsi : +\[ +\forall C\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ACB} + \widehat{ADB} \leq \pi +\] + +Supposons maintenant que : +\[ +\forall C\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{ACB} + \widehat{ADB} \leq \pi +\] + +Posons : +\begin{align} + m_p &= \max_{C\in \mathcal{P}\cap\mathcal{V}} \widehat{ACB} \\ + m_{p'} &= \max_{D\in \mathcal{P}'\cap\mathcal{V}} \widehat{ADB} +\end{align} + +On a donc +\[ +m_p + m_{p'} \leq \pi +\] + +D'après le théorème de l'ange inscrit, si on pose $\theta = \max \{m_p, m_{p'}\}$, les contours $\mathcal{L}(\theta, A, B) \cap \mathcal{P}$ et $\mathcal{L}(\pi - \theta, A, B) \cap \mathcal{P}'$ forment un cercle d'intérieur vide avec $A$ et $B$ sur le cercle. +$\Box$ + +\subsubsection{Le graphe de Delaunay est planaire} +On remarque qu'il existe des configurations pour lesquelles cette assertion est fausse, par exemple la figure \ref{fig:delaunayPasPlanaire}. On va donc supposer que les configurations défavorables (4 points sur un cercle) ont une probabilité nulle d'être rencontrées. + +\begin{figure} + \centering + \begin{tikzpicture} + \draw (2,2) circle (2*1.41); + \draw[dashed] (0,0) node [anchor=north east](A){A} (0,0) -- (4,0) node[anchor=north west](C){C} + -- (4,4) node[anchor=south west](B){B} -- (0,4) node[anchor=south east](D){D} -- (0,0); + \draw (0,0) node[circle, draw=black, fill=white]{} -- (4,4) node[circle, draw=black, fill=white]{}; \draw(0,4) node[circle, draw=black, fill=white]{} -- (4,0) node[circle, draw=black, fill=white]{}; + \end{tikzpicture} + \caption{Cas où le graphe de Delaunay n'est pas planaire.} + \label{fig:delaunayPasPlanaire} +\end{figure} + +\paragraph{preuve} Si l'on suppose qu'il existe deux arêtes $\{A,B\}$ et $\{C,D\}$ qui se croisent, on a alors $\widehat{ADB} + \widehat{ACB} < \pi$ et $\widehat{DBC} + \widehat{DAC} < \pi$. Or $ABCD$ est un quadrilatère, donc $\widehat{ADB} + \widehat{ACB} + \widehat{DBC} + \widehat{DAC} = 2 \pi$, contradiction. $\Box$ + +\subsubsection{Le graphe de Delaunay est une triangulation} +Montrons que le graphe de Delaunay est une triangulation. + +\paragraph{preuve} Supposons qu'il existe une face polygonale à plus de 3 côtés dans le graphe de Delaunay. On choisit quatre points $A,B,C,D$ de cette faces tels que $\{A,C\}$ et $\{B,D\}$ peuvent être des arêtes, mais pas $\{A,B\}$ et $\{C,D\}$. On a par exemple une maille semblable à la figure \ref{fig:maillePolygonale}. + +\begin{figure} + \centering + \begin{tikzpicture} + + \draw (0,0) node[anchor=north east]{A} node[circle, draw=black, fill=black]{} -- (1,3) node[circle, draw=black, fill=white]{} -- (3,5) node[circle, draw=black, fill=black]{} node[anchor=south west]{D} -- (4,4) node[circle, draw=black, fill=black]{} node[anchor=south west]{B} -- (5,2) node[circle, draw=black, fill=white]{} -- (3,1)node[circle, draw=black, fill=black]{} node[anchor=north west]{C} -- (0,0); + \end{tikzpicture} + \caption{Maille polygonale.} + \label{fig:maillePolygonale} +\end{figure} + +On a alors : +\begin{eqnarray} +\widehat{ACB} + \widehat{ADB} > \pi \\ +\widehat{CAD} + \widehat{CBD} > \pi \\ +\end{eqnarray} +Puisque $ACDB$ est un quadrilatère, la somme de ses angles devrait être de $2\pi$, ce qui est absurde ici. $\Box$ + +\subsubsection{Condition sur les faces} +Montrons tout triplet $\{A,B,C\} \subseteq \mathcal{V}$ est une face de la triangulation si et seulement si le disque du cercle circonscrit au triangle $ABC$ est vide de tout point de $\mathcal{V}$ autre que $A,B,C$. +\paragraph{preuve} +Supposons que le disque du cercle $\mathcal{C}$ circonscrit à $ABC$ soit vide de tout point. On va montrer que l'arête ${A,B}$ existe. On pose $\theta = \widehat{ACB}$. On a alors $\mathcal{C} = (\mathcal{L}(\theta, A, B) \cap \mathcal{P}) \cup (\mathcal{L}(\pi - \theta, A, B)\cap \mathcal{P}')$. Puisque le disque est vide, +\[ +\forall D \in \mathcal{P}'\cap\mathcal{V}, \widehat{ADB} < \pi - \theta +\] + +Donc, puisque $C$ est le point de plus grand angle sur $\mathcal{P}$ : +\[ +\forall E\in \mathcal{P}\cap \mathcal{V}, \forall D \in \mathcal{P}' \cap \mathcal{V}, \widehat{AEB} + \widehat{ADB} \leq \pi +\] +Donc l'arête $\{A,B\}$ existe. On montre de la même façon que $\{A,C\}$ et $\{C,B\}$ existent. + +Supposons que $\{A,B,C\}$ soit une face de la triangulation. En particulier, $C$ est alors le point de plus grand angle $\widehat{ACB} = \theta$ sur $\mathcal{P}$. Puisque $\{A,B\}$ est une arête, d'après le lemme, tout point $D\in\mathcal{P}'\cap\mathcal{V}$ est d'angle $\widehat{ADB}$ plus petit que $\pi - \theta$. Donc un tel point $D$ ne peut être dans le disque délimité par $(\mathcal{L}(\theta, A, B) \cap \mathcal{P}) \cup (\mathcal{L}(\pi - \theta, A, B)\cap \mathcal{P}')$. $\square$ + + \part{Algorithme de Dijkstra pour la recherche du plus court chemin} diff --git a/compte_rendu/compte_rendu.toc b/compte_rendu/compte_rendu.toc index 8a5ed09..01db559 100644 --- a/compte_rendu/compte_rendu.toc +++ b/compte_rendu/compte_rendu.toc @@ -1,11 +1,21 @@ \select@language {french} \contentsline {part}{I\hspace {1em}Objectifs de ce TL}{3} -\contentsline {part}{II\hspace {1em}Génération de carte routière réaliste}{3} +\contentsline {part}{II\hspace {1em}G\IeC {\'e}n\IeC {\'e}ration de carte routi\IeC {\`e}re r\IeC {\'e}aliste}{3} \contentsline {section}{\numberline {1}Condition pour un graphe de Gabriel}{3} \contentsline {paragraph}{preuve :}{3} \contentsline {section}{\numberline {2}Mise en pratique : graphe de Gabriel et de voisinage relatif}{3} -\contentsline {subsection}{\numberline {2.1}Création de graphe de Gabriel et de voisinage relatif}{3} +\contentsline {subsection}{\numberline {2.1}Cr\IeC {\'e}ation de graphe de Gabriel et de voisinage relatif}{3} +\contentsline {subsection}{\numberline {2.2}G\IeC {\'e}n\IeC {\'e}ration d'un r\IeC {\'e}seau}{6} +\contentsline {subsection}{\numberline {2.3}Temps de g\IeC {\'e}n\IeC {\'e}ration d'un r\IeC {\'e}seau}{6} \contentsline {section}{\numberline {3}Triangulation de Delaunay}{6} \contentsline {subsection}{\numberline {3.1}Pratique}{6} -\contentsline {subsection}{\numberline {3.2}Aspect théorique}{6} -\contentsline {part}{III\hspace {1em}Algorithme de Dijkstra pour la recherche du plus court chemin}{6} +\contentsline {subsection}{\numberline {3.2}Aspect th\IeC {\'e}orique}{6} +\contentsline {subsubsection}{\numberline {3.2.1}Condition pour un graphe de Delaunay}{6} +\contentsline {paragraph}{preuve:}{6} +\contentsline {subsubsection}{\numberline {3.2.2}Le graphe de Delaunay est planaire}{7} +\contentsline {paragraph}{preuve}{7} +\contentsline {subsubsection}{\numberline {3.2.3}Le graphe de Delaunay est une triangulation}{7} +\contentsline {paragraph}{preuve}{7} +\contentsline {subsubsection}{\numberline {3.2.4}Condition sur les faces}{8} +\contentsline {paragraph}{preuve}{8} +\contentsline {part}{III\hspace {1em}Algorithme de Dijkstra pour la recherche du plus court chemin}{8}