| 1 |
\section{Quelques exemples} |
| 2 |
|
| 3 |
\subsection{Variante intermédiaire : \TIKZ\ + \tkzname{tkz-fct}} |
| 4 |
Les codes de \TIKZ\ et de \tkzname{tkz-fct} peuvent se compléter. Ainsi les axes et les textes sont gérés par \tkzname{tkz-fct} mais la courbe est laissée à \TIKZ\ et \tkzname{gnuplot}. |
| 5 |
|
| 6 |
\bigskip |
| 7 |
|
| 8 |
\begin{center} |
| 9 |
\begin{tkzexample}[] |
| 10 |
\begin{tikzpicture}[scale=3] |
| 11 |
\tkzInit[xmin=0,xmax=4,ymin=-1.5,ymax=1.5] |
| 12 |
\tkzAxeY |
| 13 |
\tkzDefPoint(1,0){x} \tkzDrawPoint[color=blue,size=0.6pt](x) |
| 14 |
\shade[top color=gray!80,bottom color=gray!20] (1,0)% |
| 15 |
plot[id=ln,domain=1:2.718] function{log(x)} |-(1,0); |
| 16 |
\draw[color=blue] plot[id=ln,domain=0.2:4,samples=200]function{log(x)}; |
| 17 |
\tkzAxeX |
| 18 |
\tkzText[draw,color= black,fill=brown!50](2,-1)% |
| 19 |
{$\mathcal{A} = \int_1^{\text{e}}\ln(x)\text{d}x =% |
| 20 |
\big[x\ln(x)\big]_{1}^{\text{e}} = \text{e}$} |
| 21 |
\tkzText[draw,color= black,fill=brown!50](2,0.3){$\mathcal{A}$} |
| 22 |
\end{tikzpicture} |
| 23 |
\end{tkzexample} |
| 24 |
\end{center} |
| 25 |
|
| 26 |
\newpage |
| 27 |
\subsection{Courbes de \tkzname{Lorentz}} |
| 28 |
|
| 29 |
$f(x)=\dfrac{\text{e}^x-1}{\text{e}-1}$ et $g(x)=x^3$ |
| 30 |
|
| 31 |
|
| 32 |
\begin{center} |
| 33 |
\begin{tkzexample}[vbox] |
| 34 |
\begin{tikzpicture}[scale=1] |
| 35 |
\tkzInit[xmax=1,ymax=1,xstep=0.1,ystep=0.1] |
| 36 |
\tkzGrid(0,0)(1,1) |
| 37 |
\tkzAxeXY |
| 38 |
\tkzFct[color = red,domain = 0:1]{(exp(\x)-1)/(exp(1)-1)} |
| 39 |
\tkzDrawTangentLine[kl=0,kr=0.4,color=red](0) |
| 40 |
\tkzDrawTangentLine[kl=0.2,kr=0,color=red](1) |
| 41 |
\tkzText[draw,color = red,fill = brown!30](0.4,0.6)% |
| 42 |
{$f(x)=\dfrac{\text{e}^x-1}{\text{e}-1}$} |
| 43 |
\tkzFct[color = blue,domain = 0:1]{\x*\x*\x} |
| 44 |
\tkzDrawTangentLine[kl=0,kr=0.4,color=blue](0) |
| 45 |
\tkzDrawTangentLine[kl=0.2,kr=0,color=blue](1) |
| 46 |
\tkzText[draw,color = blue,fill = brown!30](0.8,0.1){$g(x)=x^3$} |
| 47 |
\tkzFct[color = orange,style = dashed,domain = 0:1]{\x} |
| 48 |
\tkzDrawAreafg[between=c and b,color=blue!40,domain = 0:1] |
| 49 |
\tkzDrawAreafg[between=c and a,color=red!60,domain = 0:1] |
| 50 |
\end{tikzpicture} |
| 51 |
\end{tkzexample} |
| 52 |
\end{center} |
| 53 |
|
| 54 |
|
| 55 |
\newpage |
| 56 |
\subsection{Courbe exponentielle} |
| 57 |
$f(x) = (-x^2+x+2)\exp(x)$ |
| 58 |
|
| 59 |
\begin{center} |
| 60 |
\begin{tkzexample}[small] |
| 61 |
\begin{tikzpicture}[scale=1.25] |
| 62 |
\tkzInit[xmin=-6,xmax=4,ymin=-5,ymax=6] |
| 63 |
\tkzGrid |
| 64 |
\tkzAxeXY |
| 65 |
\tkzFct[color=red,thick,domain=-6:2.1785]{(-x*x+x+2)*exp(x)} |
| 66 |
\tkzSetUpPoint[size=6] |
| 67 |
\tkzDrawTangentLine[draw,kl=2](0) |
| 68 |
\tkzDefPoint(2,0){b} \tkzDrawPoint(b) |
| 69 |
\tkzDefPoint(-1,0){c} \tkzDrawPoint(c) |
| 70 |
\tkzText(2,4){($\mathcal{C}$)} |
| 71 |
\tkzText(-2,-3){($\mathcal{T}$)} |
| 72 |
\end{tikzpicture} |
| 73 |
\end{tkzexample} |
| 74 |
\end{center} |
| 75 |
|
| 76 |
|
| 77 |
\subsection{Axe logarithmique} |
| 78 |
\begin{tkzexample}[vbox] |
| 79 |
\begin{tikzpicture}[scale=0.8] |
| 80 |
\tkzInit[xmax=14,ymax=12] |
| 81 |
\draw[thin,->] (0,0) -- (14,0) node[below left] {}; |
| 82 |
\draw[thin,->] (0,0) -- (0,12) node[below left] {}; |
| 83 |
\foreach \x/\xtext in {0/0,2/10,4/20,6/30,8/40,10/50,12/60,14/70}% |
| 84 |
{\draw[shift={(\x,0)}] node[below] {$\xtext$ };} |
| 85 |
\foreach \y/\z in {0/0,3/1,6/2,9/3,12/4}% |
| 86 |
{\draw[shift={(0,\y)}] node[left] {$10^{\z}$};} |
| 87 |
\foreach \x in {1,2,...,14}{\tkzVLine[gray,thin]{\x}} |
| 88 |
\foreach \y in {3,6,...,12}{\tkzHLine[gray,thin]{\y}} |
| 89 |
\foreach \y in {0,3,...,9}{ |
| 90 |
\foreach \z in {0.903,1.431,1.806,2.097,2.334,2.535,2.709,2.863}% |
| 91 |
{\tkzHLine[thin,gray,shift={(0,\y)}] {\z}}} |
| 92 |
\tkzDefPoint(0,6.90){a} |
| 93 |
\tkzDefPoint(10,9.30){b} |
| 94 |
\tkzDrawPoints(a,b) |
| 95 |
\tkzLabelPoint(a){$M_{1}$} |
| 96 |
\tkzLabelPoint(b){$M_{11}$} |
| 97 |
\end{tikzpicture} |
| 98 |
\end{tkzexample} |
| 99 |
|
| 100 |
\subsection{Un peu de tout} |
| 101 |
\begin{tkzexample}[vbox] |
| 102 |
\begin{tikzpicture}[scale=.8] |
| 103 |
\tkzInit[xmin=5,xmax=40,ymin=0,ymax=350,xstep=2.5,ystep=25] |
| 104 |
\tkzDrawX[label=$q$] |
| 105 |
\tkzDrawY[label=$C(q)$] |
| 106 |
\tkzLabelXY |
| 107 |
\tkzGrid[color=orange] |
| 108 |
\tkzFct[domain=5:40]{0.1*\x**2+2*\x+60} |
| 109 |
\foreach \vv in {5,10,...,40}{% |
| 110 |
\tkzDefPointByFct(\vv) |
| 111 |
\tkzDrawPoint(tkzPointResult)} |
| 112 |
\tkzFct[domain=5:40]{(108*log(\x)-158)} |
| 113 |
\tkzText(37.5,285){$C$} |
| 114 |
\tkzText(37.5,220){$R$} |
| 115 |
\tkzDefSetOfPoints{% |
| 116 |
5/15,10/90,15/135,20/170,25/190,30/200,35/230,40/240} |
| 117 |
\tkzDrawSetOfPoints[mark = x,mark size=3pt] |
| 118 |
\end{tikzpicture} |
| 119 |
\end{tkzexample} |
| 120 |
\endinput |