TIKZ/PGF


Je rappelle que les outils que vous allez trouver sur ce site, sont créés avant tout pour m'aider et d'en faire profiter des professeurs de mathématiques du collège ou du lycée.
Nombreux exemples sur Tikz [ A PGF and TikZ examples gallery] sur le site de Kjell Magne Fauske :
http://www.fauskes.net/ A PGF and TikZ examples gallery
Rotatesquare
Rotatesquare : [PDF] [TEX]
\documentclass{article}
\usepackage{tikz,ifthen,fullpage}

\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\def\a{12}\def\couleur{black}
	\path[coordinate] (0 cm,0 cm)   coordinate(A)%
	                  (\a cm,0 cm)  coordinate(B)%
	                  (\a cm,\a cm) coordinate(C)%
	                  (0 cm,\a cm)  coordinate(D);%
\draw[fill=\couleur] (A)--(B)--(C)--(D)--cycle;
\foreach \i in {2,3,...,14}
{\ifthenelse{\isodd{\i}}{\def\couleur{black}}{\def\couleur{red}}
\node(E) at (A){};
\path (A)--(B) node[pos=.75] (A){}
         --(C) node[pos=.75] (B){}
         --(D) node[pos=.75] (C){}
         --(E) node[pos=.75] (D){};
\draw[fill=\couleur] (A.center)--(B.center)--(C.center)--(D.center)--cycle;}
\end{tikzpicture}
\end{document}

Blackboard
Tableau noir : [PDF] [TEX]
% blackboard
% Author: Alain Matthes
\documentclass{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz,fullpage}
\usetikzlibrary{backgrounds}

 \begin{document}
    \thispagestyle{empty}
    \tikzstyle{background rectangle}=[fill=black]
    \scalebox{0.75}{%
    \begin{tikzpicture}[show background rectangle,line width = 1pt]
    \draw[fill=white] (0,0) circle(2pt);
    \draw[color=white] (0,0) circle(5cm)node[](O){};
    \draw[color=white] (0,0) -- (-140:5) node(A){$\bullet$};
    \path[anchor=base] (O) to node[midway,sloped,color=white]{Rayon} (A);
    \draw[anchor=base,color=white] (A.center) -- +(130:5) ;
    \draw[anchor=base,color=white] (A.center) -- +(-50:5)%
          node[pos=0.5,sloped] {Tangente};
    \end{tikzpicture}}

 \end{document}
Suite
Suite récurrente : [PDF] [TEX]
% suite
% Author: Alain Matthes
\documentclass{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz,fp,ifthen,fullpage}


\begin{document}
  \thispagestyle{empty}
\begin{figure}[htbp]
    \centering
    \newcommand{\x}{.4} 
    \begin{tikzpicture}[scale=10]  
    \draw[color=blue] plot[id=cosinus,domain=0:1]%
          function{cos(x)} node[right] {};
    \draw[color=red](0,0)--(1,1);
    \draw[->,>=latex](0,0)--(0,1);
    \draw[->,>=latex](0,0)--(1,0);
    \newcounter{cnt}
    \FPset\x{0.2}
    \setcounter{cnt}{0}
       \whiledo{\value{cnt}<8}{%
          \FPeval{\y}{cos(x)}% 
          \draw[color=red] (\x,\x){};
          \draw[color=red](\x,\y){} ;
          \draw[color=blue](\x,\x)--(\x,\y)--(\y,\y);
          \draw[color=orange,dotted,line width=0.8pt]%
               (\x,\x)--(\x,0) node[below=8pt]{$u_\thecnt$} ;
          \stepcounter{cnt}
          \draw[color=blue,dotted,line width=0.8pt]%
               (\x,\y)--(0,\y) node[left=8pt] {$u_\thecnt$} ;
          \let\x\y}
    \end{tikzpicture}
    \caption{$f(x)=\cos (x)$}
\end{figure}
 \end{document}
Alain Matthes — al.ma@mac.com — alea@numfirst avec TextMate.