% Ce document regroupe les codes TIKZ des figures utilisées pour le complément sur les coniques situé à la page http://femto-physique.fr/mecanique/xxxx.php
%-------------------------------------------
\documentclass[11pt]{article}
\input{styles_meca}
\title{Figures TikZ du complément "Les coniques"}
\begin{document}
%======================================================
% L'ellipse
%======================================================
%------ Figure TIKZ ------
\begin{figure}[htbp]
\centering
\begin{tikzpicture}[scale=0.8]
\def \parametre {2.5};%parametre de l'ellipse
\def \excentric {0.7};%excentricité
\def \alphaP {0};%angle correspondant au périgée
\def \alphaM {60};%angle correspondant au point M
\def \gdaxe {\parametre/(1-\excentric*\excentric)} ;
\def \focale {\excentric*\gdaxe};
\def \ptaxe {sqrt(\gdaxe*\gdaxe-\focale*\focale)};
\coordinate (O) at ({-\focale*cos(\alphaP)},{-\focale*sin(\alphaP)});
\coordinate (M) at ({\parametre*cos(\alphaM)/(1+\excentric*cos(\alphaM-\alphaP))},{\parametre*sin(\alphaM)/(1+\excentric*cos(\alphaM-\alphaP))});
\coordinate (P) at ({\parametre*cos(\alphaP)/(1+\excentric)},{\parametre*sin(\alphaP)/(1+\excentric)});%Péricentre
\coordinate (F) at (0,0);
\coordinate (F') at ({-2*\focale},0);
\draw[dashed,thin, gray] (P)--++(0,{\ptaxe})--++({-2*\gdaxe},0)--++(0,{-2*\ptaxe})--++({2*\gdaxe},0)-- cycle;
\draw[thick,variable=\t , domain=0:360,samples=200] plot ({\parametre*cos(\t)/(1+\excentric*cos(\t-\alphaP))},{\parametre*sin(\t)/(1+\excentric*cos(\t-\alphaP))});
\draw[->,ultra thin,gray] (O)--++({-\gdaxe},0)--++({2*\gdaxe+1},0)node[below left]{$x$};
\draw[->,ultra thin,gray] (O)--++(0,{-\ptaxe})--++(0,{2*\ptaxe+1})node[below left]{$y$};
\draw (F) node{$\bullet$}node[below=3pt]{\small F}--(M) node[right=2pt]{M$(r,\theta)$}node[pos=0.5,above=3pt]{$r$};
\draw (F') node{$\bullet$}node[below=3pt]{\small F'};
\draw[vecteur] (F)++(0.6,0) arc(0:\alphaM:0.6);
\draw ({\alphaM/2}:0.9) node{$\theta$};
\draw[fill=white] (M) circle(0.1);
\draw (O)--++(0,{\ptaxe}) node[pos=0.5,fill=white]{$b$};
\draw (O)--(F) node[pos=0.5,fill=white]{$c$};
\draw (F)--++({-\focale},{\ptaxe}) node[pos=0.5,fill=white]{$a$};
\draw[|<->|] (O)++({-\gdaxe-1},{\ptaxe})--++(0,{-2*\ptaxe}) node[pos=0.5,right]{$2b$};
\draw[|<->|] (O)++({-\gdaxe},{-\ptaxe-1})--++({2*\gdaxe},0) node[pos=0.5,above]{$2a$};
\draw[fill=white] (O) node{$\bullet$} node[below]{\small C};
\end{tikzpicture}
\caption{L'ellipse}
\label{fig:C9AnnexeEllipse}
\end{figure}
%--- FIN FIGURE --------
%======================================================
% La parabole
%======================================================
\begin{tikzpicture}[scale=1]
\def \parametre {2.5};%parametre de l'ellipse
\def \excentric {1};%excentricité
\def \alphaP {0};%angle correspondant au périgée
\def \alphaM {100};%angle correspondant au point M
\def \focale {\parametre*0.5};
\coordinate (M) at ({\parametre*cos(\alphaM)/(1+\excentric*cos(\alphaM-\alphaP))},{\parametre*sin(\alphaM)/(1+\excentric*cos(\alphaM-\alphaP))});
\coordinate (P) at ({\focale*cos(\alphaP)},{\focale*sin(\alphaP)});%Péricentre
\coordinate (F) at (0,0);
\draw[->,ultra thin,gray] (P) --++(-5,0)node[below left]{$x$};
\draw[->,ultra thin,gray] (P) --++(0,4)node[below left]{$y$};
\draw[thick,variable=\t , domain=-120:120,samples=200] plot ({\parametre*cos(\t)/(1+\excentric*cos(\t-\alphaP))},{\parametre*sin(\t)/(1+\excentric*cos(\t-\alphaP))});
\draw (F) node{$\bullet$} node[below]{\tiny Foyer}--(M) node[right=2pt]{M$(r,\theta)$}node[pos=0.5,left]{$r$};
\draw[fill=white] (M) circle(0.1);
\draw[vecteur] (F)++(0.5,0) arc(0:\alphaM:0.5);
\draw ({\alphaM/2}:0.8) node{$\theta$};\end{tikzpicture}
%======================================================
% L'hyperbole
%======================================================
\begin{tikzpicture}[scale=0.8,decoration={markings,mark=at position 1cm with {\arrow[black]{stealth};}}]
\def \parametre {1.5};%parametre de l'hyperbole
\def \excentric {1.6};%excentricité
\def \alphaP {0};%angle correspondant au périgée
\def \alphaM {34};%angle correspondant au point M
\def \gdaxe {\parametre/(\excentric*\excentric-1)};% grand axe a
\def \focale {\excentric*\gdaxe};% focale
\def \ptaxe {sqrt(\focale*\focale-\gdaxe*\gdaxe)};% petit axe b
\draw[thin, gray,-] ({\gdaxe},{-\ptaxe})--++(0,{2*\ptaxe})node[pos=0.8,fill=white]{\tiny $2b$};
\draw[thin, gray,-] ({\gdaxe},{-\ptaxe})--++({-2*\gdaxe},0)node[pos=0.7,fill=white]{\tiny $2a$};
\draw[thin, gray,-] ({-\gdaxe},{\ptaxe})--++(0,{-2*\ptaxe});
\draw[thin, gray,-] ({-\gdaxe},{\ptaxe})--++({2*\gdaxe},0);
\draw[->,ultra thin,gray] (-2,0) --++(6,0)node[below left]{$x$};%axeOx
\draw[->,ultra thin,gray] (0,-2) --++(0,6)node[below left]{$y$};%axeOy
\draw[thin,dashed,variable=\t , domain=-3:3,samples=20] plot ({\t},{(\ptaxe/(\gdaxe))*\t});%asymptotes
\draw[thin,dashed,variable=\t , domain=-3:3,samples=20] plot ({-\t},{(\ptaxe/(\gdaxe))*\t});%asymptotes
\begin {scope}[shift={({-\focale},0)} ]
\coordinate (M) at ({\parametre*cos(\alphaM)/(-1+\excentric*cos(\alphaM-\alphaP))},{\parametre*sin(\alphaM)/(-1+\excentric*cos(\alphaM-\alphaP))});
\coordinate (N) at ({\parametre*cos(\alphaM)/(1+\excentric*cos(\alphaM-\alphaP))},{\parametre*sin(\alphaM)/(1+\excentric*cos(\alphaM-\alphaP))});
\coordinate (F) at (0,0);
\draw[postaction={decorate},thick,variable=\t , domain=-37:37,samples=100] plot ({\parametre*cos(\t)/(\excentric*cos(\t-\alphaP)-1)},{\parametre*sin(\t)/(\excentric*cos(\t-\alphaP)-1)}) node[right]{$\mathcal{B}_{-}$};
\draw[postaction={decorate},thick,variable=\t , domain=-111:111,samples=100] plot ({\parametre*cos(\t)/(1+\excentric*cos(\t-\alphaP))},{\parametre*sin(\t)/(1+\excentric*cos(\t-\alphaP))}) node[left]{$\mathcal{B}_{+}$};
\draw (0,0) node{$\bullet$} node[below]{\small Foyer}--(M) node[right=2pt,fill=white]{\small M$(r_{-},\theta)$};
\draw (N) node[left=2pt,fill=white]{\small M$(r_{+},\theta)$};
\draw[fill=white] (M) circle(0.1);
\draw[fill=white] (N) circle(0.1);
\draw[vecteur] (F)++(3,0) arc(0:\alphaM:3);
\draw ({\alphaM/2}:3.2) node[right]{$\theta$};
\end{scope}
\end{tikzpicture}
\end{document}