Suppression de test.tex (plus nécessaire).
This commit is contained in:
parent
de20ce2661
commit
b0180e51a7
292
test.tex
292
test.tex
|
@ -1,292 +0,0 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[frenchb]{babel}
|
||||
\usepackage{tikz}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{listings}
|
||||
\usepackage{amssymb}
|
||||
\usetikzlibrary{chains,positioning,matrix,arrows,decorations,calc}
|
||||
\title{Rapport de projet : FMIN105\\ Cours algorithmique / complexité / calculabilité}
|
||||
\author{\textsc{Bonavero} Yoann \\ \textsc{Brun} Bertrand \\ \textsc{Charron} John \\ \textsc{Dupéron} Georges}
|
||||
\date{}
|
||||
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{2ex}
|
||||
|
||||
\newcounter{exocount}
|
||||
\setcounter{exocount}{0}
|
||||
|
||||
\newcounter{enoncecount}
|
||||
\setcounter{enoncecount}{0}
|
||||
|
||||
\newenvironment{enonce}
|
||||
{
|
||||
\stepcounter{enoncecount}
|
||||
\bf\small \arabic{enoncecount}.
|
||||
\begin{bf}
|
||||
}
|
||||
{
|
||||
\end{bf}
|
||||
}
|
||||
|
||||
|
||||
\newcounter{sousenoncecount}
|
||||
\setcounter{sousenoncecount}{0}
|
||||
\newenvironment{sousenonce}
|
||||
{
|
||||
\stepcounter{sousenoncecount}
|
||||
\bf\small (\alph{sousenoncecount})
|
||||
\begin{bf}
|
||||
}
|
||||
{
|
||||
\end{bf}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\setcounter{page}{0}
|
||||
\pagestyle{plain}
|
||||
|
||||
\begin{figure}[h!]
|
||||
%% «Paramètres»
|
||||
\xdef\maxdots{23}
|
||||
\xdef\maxdotsX{5}
|
||||
\xdef\maxdotsY{5}
|
||||
\xdef\maxnums{20}
|
||||
\xdef\maxcoordsX{3}
|
||||
\xdef\maxcoordsY{3}
|
||||
|
||||
%% ===== Code is below =====
|
||||
|
||||
%% Macros crades
|
||||
\makeatletter
|
||||
\def\myadv#1#2{%
|
||||
\xdef\incr@backup{\the\@tempcnta}%
|
||||
\@tempcnta=#1{}%
|
||||
\advance\@tempcnta by #2{}%
|
||||
\xdef#1{\the\@tempcnta}%
|
||||
\@tempcnta=\incr@backup{}%
|
||||
}
|
||||
\def\incr#1{%
|
||||
\myadv#1{1}%
|
||||
}
|
||||
\def\decr#1{%
|
||||
\myadv#1{-1}%
|
||||
}
|
||||
\makeatother
|
||||
\centering
|
||||
\begin{tikzpicture}[
|
||||
scale=1.4,
|
||||
dot/.style={
|
||||
circle,
|
||||
inner sep=0.7pt,
|
||||
fill=black
|
||||
},
|
||||
dotphantom/.style={
|
||||
circle,
|
||||
inner sep=3pt,
|
||||
fill=none,
|
||||
draw=none
|
||||
},
|
||||
numero/.style={rectangle, fill=white, inner sep=2pt, text=red!50!black},
|
||||
coord/.style={darkgray, scale=.8},
|
||||
%
|
||||
bigarrow/.style={
|
||||
->,
|
||||
thick,
|
||||
draw=green!50!black
|
||||
},
|
||||
constatation1/.style={
|
||||
circle,
|
||||
inner sep=1.5pt,
|
||||
outer sep=0.8pt,
|
||||
fill=white,
|
||||
text=red,
|
||||
anchor=south,
|
||||
rotate around={45:(0,0)}
|
||||
},
|
||||
constatation2/.style={
|
||||
text=green!50!black,
|
||||
node distance=0.6cm
|
||||
}
|
||||
]
|
||||
|
||||
% %% Digonale
|
||||
% \draw[bigarrow,red] (0,0) -- (.5*7.5,-.5*7.5);
|
||||
|
||||
% Définitions pour le code ci-dessous.
|
||||
\xdef\i{0}
|
||||
\xdef\x{0}
|
||||
\xdef\y{0}
|
||||
\xdef\corner{3}
|
||||
\xdef\sidelen{0}
|
||||
\xdef\nextsidelen{1}
|
||||
\xdef\direction{3}
|
||||
\incr\maxnums
|
||||
\incr\maxcoordsX
|
||||
\incr\maxcoordsY
|
||||
|
||||
\foreach \x in {0,...,\maxcoordsX} {
|
||||
\foreach \y in {1,...,\maxcoordsY} {
|
||||
\expandafter\xdef\csname dotxypresent-\x-\y\endcsname{0}
|
||||
}
|
||||
}
|
||||
|
||||
\def\reallysmallcheat#1{%
|
||||
\ensuremath{\hphantom{\vphantom{X}}_{\hphantom{\vphantom{X}}_{#1}}}
|
||||
}
|
||||
\def\drawnode{%
|
||||
\node[dot] (dot-\x-\y) at (\x,-\y) {};
|
||||
\node[dotphantom] (phantom-\x-\y) at (\x,-\y) {};
|
||||
\ifnum\maxnums>\i
|
||||
% \ifnum\corner=0 \node[numero,anchor=south] at (dot-\x-\y.north) {\i}; \else
|
||||
% \ifnum\corner=1 \node[numero,anchor=east] at (dot-\x-\y.west) {\i}; \else
|
||||
% \ifnum\corner=2 \node[numero,anchor=east] at (dot-\x-\y.west) {\i}; \else
|
||||
% \ifnum\corner=3 \node[numero,anchor=south] at (dot-\x-\y.north) {\i}; \else
|
||||
% \ifnum\direction=0 \node[numero,anchor=north west] at (dot-\x-\y.south east) {\i}; \else
|
||||
% \ifnum\direction=2 \node[numero,anchor=north west] at (dot-\x-\y.south east) {\i}; \fi\fi\fi\fi\fi\fi
|
||||
\node[numero,anchor=north west] at (dot-\x-\y.south east) {\i};
|
||||
\fi
|
||||
\ifnum\maxcoordsX>\x
|
||||
\ifnum\maxcoordsY>\y
|
||||
% \ifnum\corner=0 \node[coord,anchor=south east] at (dot-\x-\y.north west) {\reallysmallcheat{(\x, \y)}}; \else
|
||||
% \ifnum\corner=1 \node[coord,anchor=north east] at (dot-\x-\y.south west) {\reallysmallcheat{(\x, \y)}}; \else
|
||||
% \ifnum\corner=2 \node[coord,anchor=north west] at (dot-\x-\y.south east) {\reallysmallcheat{(\x, \y)}}; \else
|
||||
% \ifnum\corner=3 \node[coord,anchor=south west] at (dot-\x-\y.north east) {\reallysmallcheat{(\x, \y)}}; \else
|
||||
% \ifnum\direction=0 \node[coord,anchor=east] at (dot-\x-\y.west) {\reallysmallcheat{(\x, \y)}}; \else
|
||||
% \ifnum\direction=1 \node[coord,anchor=north] at (dot-\x-\y.south) {\reallysmallcheat{(\x, \y)}}; \else
|
||||
% \ifnum\direction=2 \node[coord,anchor=west] at (dot-\x-\y.east) {\reallysmallcheat{(\x, \y)}}; \else
|
||||
% \ifnum\direction=3 \node[coord,anchor=south] at (dot-\x-\y.north) {\reallysmallcheat{(\x, \y)}}; \fi\fi\fi\fi\fi\fi\fi\fi
|
||||
\expandafter\xdef\csname dotxypresent-\x-\y\endcsname{1}
|
||||
\ifnum\y=0
|
||||
\node[coord,anchor=south west] at (dot-\x-\y.north east) {\reallysmallcheat{(\x, \y)}};
|
||||
\else
|
||||
\node[coord,anchor=west,xshift=0.2] at (dot-\x-\y.east) {\reallysmallcheat{(\x, \y)}};
|
||||
\fi
|
||||
\fi
|
||||
\fi
|
||||
}
|
||||
\def\drawlinknode{%
|
||||
\drawnode%
|
||||
\draw[->] (phantom-\oldx-\oldy) -- (phantom-\x-\y);%
|
||||
}
|
||||
\def\mystep{%
|
||||
\incr\i%
|
||||
\xdef\oldx{\x}%
|
||||
\xdef\oldy{\y}%
|
||||
}
|
||||
\def\changedir#1{%
|
||||
\xdef\direction{#1}%
|
||||
\xdef\corner{#1}%
|
||||
}
|
||||
|
||||
\drawnode
|
||||
\mystep \incr\x
|
||||
\xdef\cornerc{0}
|
||||
|
||||
\foreach \pos in {1,...,\maxdots} {
|
||||
% Detect when we are at the end of this edge.
|
||||
\ifnum\sidelen=0
|
||||
\ifnum\direction=0 \changedir{1} \incr\nextsidelen \xdef\sidelen{1} \else
|
||||
\ifnum\direction=1 \changedir{2} \xdef\sidelen{\nextsidelen} \else
|
||||
\ifnum\direction=2 \changedir{3} \incr\nextsidelen \xdef\sidelen{1} \else
|
||||
\ifnum\direction=3 \changedir{0} \xdef\sidelen{\nextsidelen} \fi\fi\fi\fi% Brin d'acier
|
||||
|
||||
\fi
|
||||
% Draw node and link to previous, step counters
|
||||
\drawlinknode \mystep
|
||||
%% Se déplacer vers ↙↓↗→
|
||||
\ifnum\direction=0 \incr\y \decr\x \fi
|
||||
\ifnum\direction=1 \incr\y \fi
|
||||
\ifnum\direction=2 \decr\y \incr\x \fi
|
||||
\ifnum\direction=3 \incr\x \fi
|
||||
\decr\sidelen
|
||||
\xdef\corner{4}%% 4 == pas de coin-coin.
|
||||
}
|
||||
|
||||
\foreach \x in {0,...,\maxdotsX} {
|
||||
\foreach \y in {1,...,\maxdotsY} {
|
||||
\node[dot] (dot-\x-\y) at (\x,-\y) {};
|
||||
}
|
||||
}
|
||||
\decr\maxcoordsX
|
||||
\decr\maxcoordsY
|
||||
\foreach \x in {0,...,\maxcoordsX} {
|
||||
\foreach \y in {0,...,\maxcoordsY} {
|
||||
\node[dot,fill=none] (fakedot-\x-\y) at (\x,-\y) {};
|
||||
\expandafter\ifnum\csname dotxypresent-\x-\y\endcsname=0
|
||||
\ifnum\y=0
|
||||
\node[coord,anchor=south west] at (fakedot-\x-\y.north east) {\reallysmallcheat{(\x, \y)}};
|
||||
\else
|
||||
\node[coord,anchor=west,xshift=0.2] at (fakedot-\x-\y.east) {\reallysmallcheat{(\x, \y)}};
|
||||
\fi
|
||||
\fi
|
||||
}
|
||||
}
|
||||
|
||||
% \foreach \i in {1, ...,6}{
|
||||
% \node[constatation1] at (.5*\i,-.5*\i) {\i};
|
||||
% }
|
||||
% \node[constatation1] at (.5*7,-.5*7) {\vdots};
|
||||
|
||||
% \node[coordinate] (fake0-0) at (0,0) {};
|
||||
% \node[coordinate] (fake1-0) at (1,0) {};
|
||||
% \node[coordinate] (fake3-0) at (3,0) {};
|
||||
% \node[coordinate] (fake5-0) at (5,0) {};
|
||||
% \node[coordinate] (fake0-2) at (0,-2) {};
|
||||
% \node[coordinate] (fake0-4) at (0,-4) {};
|
||||
% \node[coordinate] (fake0-6) at (0,-6) {};
|
||||
% \node[constatation2, above left of=fake0-0] {0};
|
||||
% \node[constatation2, above of=fake1-0] {1};
|
||||
% \node[constatation2, above of=fake3-0] {6};
|
||||
% \node[constatation2, above of=fake5-0] {15};
|
||||
% \node[constatation2, left of=fake0-2] {3};
|
||||
% \node[constatation2, left of=fake0-4] {10};
|
||||
% \node[constatation2, left of=fake0-6] {21};
|
||||
\end{tikzpicture}
|
||||
\caption{Codage d'un couple d'entiers relatifs}%% TODO : caption
|
||||
\label{fig:codage-nat-sans-constatation}
|
||||
\end{figure}
|
||||
|
||||
% \begin{figure}[h!]
|
||||
% \centering
|
||||
% \begin{tikzpicture}[
|
||||
% dot/.style = {
|
||||
% circle,
|
||||
% fill=black,
|
||||
% inner sep=0.5pt
|
||||
% },
|
||||
% arc/.style = {
|
||||
% ->,
|
||||
% >=stealth
|
||||
% }
|
||||
% ]
|
||||
% \foreach \xpos in {0, ..., 4} {
|
||||
% \foreach \ypos in {0, ..., 4} {
|
||||
% \node[dot] at (\xpos,-\ypos) {};
|
||||
% }
|
||||
% }
|
||||
|
||||
% \draw[arc] (0,-0) -- (1,-0);
|
||||
|
||||
% \draw[arc] (1,-0) -- (0,-1);
|
||||
% \draw[arc] (0,-1) -- (0,-2);
|
||||
|
||||
% \draw[arc] (0,-2) -- (1,-1);
|
||||
% \draw[arc] (1,-1) -- (2,-0);
|
||||
% \draw[arc] (2,-0) -- (3,-0);
|
||||
|
||||
% \draw[arc] (3,-0) -- (2,-1);
|
||||
% \draw[arc] (2,-1) -- (1,-2);
|
||||
% \draw[arc] (1,-2) -- (0,-3);
|
||||
% \draw[arc] (0,-3) -- (0,-4);
|
||||
|
||||
% \draw[arc] (0,-4) -- (1,-3);
|
||||
% \draw[arc,dashed] (1,-3) -- (2,-2);
|
||||
% \end{tikzpicture}
|
||||
% \caption{Codage d'un couple d'entiers relatifs}
|
||||
% \label{fig:codage-rel}
|
||||
% \end{figure}
|
||||
|
||||
\end{document}
|
Loading…
Reference in New Issue
Block a user