% $Header: /cvsroot/latex-beamer/latex-beamer/solutions/conference-talks/conference-ornate-20min.en.tex,v 1.6 2004/10/07 20:53:08 tantau Exp $
\documentclass[xcolor={hyperref,dvips},dvips]{beamer} 
%\documentclass[xcolor=pst]{beamer}
%\documentclass{beamer}
%\usepackage{fancyvrb}
\usepackage[baw]{fvrb-ex}
%\fvset{xrightmargin=0cm,frame=single,framerule=0.5mm,gobble=2,formatcom=\color{blue},fram%esep=5mm}

\fvset{xrightmargin=0cm,gobble=2,formatcom=\color{blue}}
\graphicspath{{/home/moi/Alice/figures3/}{/home/moi/Alice/figures3/newcourbes/}{/home/moi/Alice/figures/}{/home/moi/Lycee/Stage_TeX/}}
%\usepackage{lmodern}
\usepackage{BeamerPolymaths}
% \usepackage[utf8]{inputenc} 
\renewcommand{\La}{\LaTeX{}}
\renewcommand\FancyVerbFormatLine[1]{\colorbox{green}{#1}}
% This file is a solution template for:

% - Talk at a conference/colloquium.
% - Talk length is about 20min.
% - Style is ornate.



% Copyright 2004 by Till Tantau <tantau@users.sourceforge.net>.
%
% In principle, this file can be redistributed and/or modified under
% the terms of the GNU Public License, version 2.
%
% However, this file is supposed to be a template to be modified
% for your own needs. For this reason, if you use this file as a
% template and not specifically distribute it as part of a another
% package/program, I grant the extra permission to freely copy and
% modify this file as you see fit and even to delete this copyright
% notice. 


\mode<presentation>
{
  \usetheme{Warsaw}
  % or ...

  \setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}


%\usepackage[english]{babel}
% or whatever

%\usepackage[latin1]{inputenc}
% or whatever

%\usepackage{times}
%\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title[Présentation de \texttt{newcourbes.mp}] % (optional, use only with long paper titles)
{Présentation de \texttt{newcourbes.mp}}

\subtitle
{Fichier de macros METAPOST}

\author[Guillaume Connan] % (optional, use only with lots of authors)
{Guillaume Connan }
% - Give the names in the same order as the appear in the paper.
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\institute[Lycée Jean Perrin] % (optional, but mostly needed)
%{
  %\inst{1}%
  %Department of Computer Science\\
  %University of Somewhere
  %\and
  %\inst{2}%
  %Department of Theoretical Philosophy\\
  %University of Elsewhere}
% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date[\LaTeX 2006] % (optional, should be abbreviation of conference name)
{Présentation de \LaTeX 2006}
% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
%   yourself) who are reading the slides online

\subject{}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

% \pgfdeclareimage[height=0.5cm]{university-logo}{university-logo-filename}
% \logo{\pgfuseimage{university-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Sommaire}

 \begin{DeuxCols}[2]
    \tableofcontents[currentsection,currentsubsection]
\end{DeuxCols}
  \end{frame}
}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}
  \frametitle{Sommaire}
  \begin{DeuxCols}[2]
\tableofcontents
  \end{DeuxCols}
  % You might wish to add the option [pausesections]
\end{frame}

\section{Repère}

\begin{frame}[containsverbatim]


La première chose est de fixer le repère à l'aide de la macro \texttt{repere} : 

\begin{Verbatim}
  repere(origineX,origineY,Xmin,Xmax,Ymin,Ymax,uX,uY)
\end{Verbatim}


\end{frame}


\subsection{Axes}

\begin{frame}[containsverbatim]
On tace les axes, l'origine, les unités, les labels des axes.

\begin{Verbatim}
  beginfig(1);
  repere(0,0,-2,8,-1,4,1cm,1cm);
  r_axes;
  r_origine;
  r_unites;
  r_labelxy;
  endfig;
\end{Verbatim}
\end{frame}


\begin{frame}
\begin{center}
\includegraphics{PresMPost.1}
\end{center}
\end{frame}

\subsection{Graduations}
\begin{frame}[containsverbatim]

\begin{Verbatim}
  ...
  grad_x(0.5,1,0.4white);
  grad_y(1,1,0.4white);
  ...
\end{Verbatim}

\end{frame}

\begin{frame}
\begin{center}
\includegraphics{PresMPost.3}
\end{center}
\end{frame}


\subsection{Quadrillages}
\begin{frame}[containsverbatim]

On utilise \texttt{quad\_xy(fraction de l'unité, couleur)} et \texttt{quadu\_xy(couleur)} ou seulement \texttt{quad\_x} et \texttt{quad\_y} si on ne veut qu'une partie du quadrillage.

\begin{Verbatim}
  ...
  quad_xy(0.2,0.3*or);
  quadu_xy(0.1*or);
  ...
\end{Verbatim}

\end{frame}



\begin{frame}
\begin{center}
\includegraphics{PresMPost.2}
\end{center}
\end{frame}


\section{Points, droites}

\subsection{Points}


\begin{frame}[containsverbatim]

\begin{Verbatim}
  ...
  r_pp(3,2);
  r_cp(5,3);

  label.rt(btex $A$ etex, r_p(3,2));
  label.rt(btex $B$ etex, r_p(5,3));
  ...
\end{Verbatim}
\end{frame}


\begin{frame}
\begin{center}
\includegraphics{PresMPost.4}
\end{center}
\end{frame}


\subsection{Projection de points}


\begin{frame}[containsverbatim]

\begin{Verbatim}
  ...
  r_proj(3,2,vert_fonce);
  ...
\end{Verbatim}

\pause


\begin{center}
\includegraphics{PresMPost.5}
\end{center}
\end{frame}





\subsection{Segment}

\begin{frame}[containsverbatim]

\begin{Verbatim}
  ...
  draw r_segment(3,2,5,3) dashed evenly withcolor rose;
  ...
\end{Verbatim}

\pause

\begin{center}
\includegraphics{PresMPost.6}
\end{center}
\end{frame}


\subsection{droite}


\begin{frame}[containsverbatim]
\frametitle{Droite passant par le point $A(3\pv 2)$ et de pente 1,5}
\begin{Verbatim}
  draw r_droite(3,2,1.5) withcolor red;
\end{Verbatim}

\begin{center}
\includegraphics{PresMPost.7}
\end{center}

\end{frame}



\begin{frame}[containsverbatim]
\frt{Droite <<~verticale~>>}
\begin{Verbatim}
  draw rx_droite(3) withcolor blue;
\end{Verbatim}
\begin{center}
\includegraphics{PresMPost.8}
\end{center}

\end{frame}


\section{Fonctions}

\subsection{Courbes $y=f(x)$}



\begin{frame}[containsverbatim]
On travaille en paramétrant les abscisses et les ordonnées pour plus de généralité, donc on définit \texttt{fx(t)} et \texttt{fy(t)} et on utilise 
\texttt{f\_courbe(fx,fy,ti,tf,nb de points)}

\begin{Verbatim}
  vardef fx(expr t)=
  t
  enddef;
\end{Verbatim}


\begin{Verbatim}
  vardef fy(expr t)=
    sin(t) % c'est la seule ligne à changer
  enddef;
\end{Verbatim}

\end{frame}

\begin{frame}[containsverbatim]
\begin{Verbatim}
  draw f_courbe(fx,fy,-2,2,100) withcolor red;
  draw f_courbe(fx,fy,2,8,100)withcolor bleu dashed evenly;
\end{Verbatim}
\begin{center}
\includegraphics{PresMPost.9}
\end{center}

\end{frame}


\subsection{Tangente}

\begin{frame}[containsverbatim]


On obtient une approximation du nombre dérivée en $a$ à partir du taux de variation de pas $h$.


Si on veut une double flèche de <<~largeur~>> $b$ au point d'abscisse $a$, on utilise \texttt{tracef\_tangente(fx,fy,a,b,h,couleur)}.


\begin{Verbatim}
  tracef_tangente(fx,fy,3,1,0.05,bleu_f);
\end{Verbatim}

\begin{center}
\includegraphics{PresMPost.10}
\end{center}

\end{frame}



\begin{frame}[containsverbatim]
Si on veut tracer la tangente, on préfèrera \texttt{f\_tangente(fx,fy,a,h)}
\begin{Verbatim}
  draw f_tangente(fx,fy,1,0.05);
\end{Verbatim}

\pause

 \begin{center}
\includegraphics{PresMPost.11}
 \end{center}
\end{frame}


\section{Suites}

\subsection{Suites $u_n=f(n)$}

\begin{frame}[containsverbatim]
Il faut rentrer \texttt{ux} et \texttt{uy} et \texttt{u\_courbe(ux,uy,ni,nf,t);} avec t prenant la valeur 1 si on veut les $u_i$ et 0 sinon.
\begin{Verbatim}
  u_courbe(ux,uy,0,4,1);
\end{Verbatim}
\begin{center}
\includegraphics{PresMPost.12}
\end{center}
\end{frame}


\subsection{Suites $u_{n+1}=f(u_n)$}

\begin{frame}[containsverbatim]

On utilise \texttt{u\_reccourbe(fx,fy,u0,ni,nf,xi,xf,t)}, t jouant le même rôle que plus haut.

\begin{Verbatim}
  u_reccourbe(fx,fy,-0.5,0,3,-1,2,1);
\end{Verbatim}

\pause
\end{frame}

\begin{frame}
\begin{center}
\includegraphics{PresMPost.13}
\end{center}
\end{frame}

\section{Intégration}

\subsection{Aire sous une courbe}
\begin{frame}
On utilise \texttt{Aire(fx,fy,a,b,couleur)} pour représenter le domaine compris entre la courbe d'équation $y=f(x)$, l'axe des abscisses, les droites d'équation $x=a$ et $x=b$.
\end{frame}




\begin{frame}[containsverbatim]

\begin{Verbatim}
  ...
  Aire(fx,fy,-.5,2,bleu_ciel);
  ...
\end{Verbatim}

\pause

\begin{center}
\includegraphics{PresMPostbis.32}
\end{center}

\end{frame}





\subsection{Méthode des rectangles}

\begin{frame}
On utilise \texttt{trace\_rectangles\_min\_c(fx,fy,a,b,largeur en cm ,couleur)} et \texttt{trace\_rectangles\_max(fx,fy,a,b,largeur en cm)}


 Il existe une version <<~transparente~>> de la première macro : \texttt{trace\_rectangles\_min\_t(fx,fy,a,b,largeur en cm )}
\end{frame}

\begin{frame}[containsverbatim]

\begin{Verbatim}
  trace_rectangles_min_c(fx,fy,0,1,1/10,bleu_ciel);
  trace_rectangles_max(fx,fy,0,1,1/10);
\end{Verbatim}

\pause

\begin{center}
\includegraphics{PresMPost.14}
\end{center}

\end{frame}



\begin{frame}

On peut s'amuser...

\begin{center}
\includegraphics{PresMPost.15}
\end{center}


\end{frame}

\subsection{Méthode des trapèzes}

\begin{frame}[containsverbatim]

\begin{Verbatim}
  trace_trapezes(fx,fy,3,9,1.5);
\end{Verbatim}

\pause

\begin{center}
\includegraphics[height=5cm]{PresMPost.16}
\end{center}


\end{frame}

\section{Géométrie}

\subsection{Triangle}

\begin{frame}[containsverbatim]

On fabrique facilement des macros pour les points remarquables

\begin{Verbatim}
  O=centrecerclecirconscrit(A,B,C);
  G=centredegravite(A,B,C);
  H=orthocentre(A,B,C);
  draw cerclecirconscrit(A,B,C);
  draw cercleinscrit(A,B,C);
\end{Verbatim}

\end{frame}

\begin{frame}
\begin{center}
\includegraphics{PresMPost.18}
\end{center}

\end{frame}


\begin{frame}[containsverbatim]

\begin{Verbatim}
  draw mediatrice(A,B,0.5) withcolor blue; 
  I:=milieu(A,B);
  M:=B rotatedaround(I,90);
  draw symbole_ortho(B,I,M,0.25u);
\end{Verbatim}

\pause

\begin{center}
\includegraphics{PresMPost.19}
\end{center}

\end{frame}
\subsection{Espace}

\begin{frame}[containsverbatim]

La macro \texttt{cube(origine,largeur arête)} trace un cube à partir du point origine et \texttt{nommecube} nomme les sommets de manière usuelle.

\begin{center}
\includegraphics[height=5cm]{PresMPost.17}
\end{center}

\end{frame}


\begin{frame}
\begin{center}


\includegraphics{geo3d.1}
\end{center}
\end{frame}


\begin{frame}
\begin{center}
\includegraphics{geo3d.8}
\end{center}
\end{frame}


\section{Arbres}
\subsection{Arbre $2\times 2$}
\begin{frame}[containsverbatim]


\begin{Verbatim}
  arbre("$A$","$\overline{A}$","$C$","$D$",
  "1/3","2/3","3/5","2/5","5/7","2/7");
\end{Verbatim}
\begin{center}
\includegraphics{PresMPost.31}
\end{center}
\end{frame}


\end{document}
