header

tkz-fct

Voici la première version officielle de tkz-fct (version 1.00 c). Elle nécessite tkz-base version 1.00 c. Les fichiers nécessaires pour compiler les exemples sont ici. Vous trouverez sur cette page de nombreux exemples.
tkz-fct utilise gnuplot pour obtenir les points des courbes et fp.sty pour les calculs d'images, ainsi que le tracé des tangentes.

Curve One

Curve1
[PDF] [TEX]
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{fullpage,amsmath,tkz-fct}   
\definecolor{fondpaille}{cmyk}{0,0,0.1,0}
\pagecolor{fondpaille}
\color{Maroon}
\tkzSetUpColors[background=fondpaille,text=Maroon]
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%   
\thispagestyle{empty}

\begin{document}

\begin{tikzpicture}[scale=3]
\tkzInit[xmax=3,ymax=2];
\tkzAxeX
\tkzAxeY
\tkzGrid(0,0)(3,2)
\tkzFct[color  = red,
        domain = 1./3:3]{0.125*(3*\x-1)+0.375*(3*\x-1)/(\x*\x)}
\tkzDefPointByFct[draw](2) 
\tkzDefPointByFct[draw](3)
\tkzDrawTangentLine[color      = blue,
                    line width = .8pt](1) 
\tkzFct[color   = green,
        domain  =  1./3:3]{0.125*(3*x-1)}
\tkzSetUpPoint[size=8,fill=orange] 
\tkzDefPointByFct[draw](3) 
\tkzDefPointByFct[draw](1/3) 
\tkzDefPoint(1,1){f}
\tkzDrawPoint(f)
\tkzText[draw,fill = red!30](1,1.5)%
{$f(x)=\dfrac{1}{8}(3x-1)+\dfrac{3}{8}\left(\dfrac{3x-1}{x^2}\right)$}
\tkzText[draw,fill = green!30](2,0.4){$g(x) = \dfrac{3x-1}{8}$}    
\end{tikzpicture}
\end{document}

Curve Two

Curve2
[PDF] [TEX]
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{fullpage,amsmath,tkz-fct}   
\definecolor{fondpaille}{cmyk}{0,0,0.1,0}
\pagecolor{fondpaille}
\color{Maroon}
\tkzSetUpColors[background=fondpaille,text=Maroon]
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%   
\thispagestyle{empty} 

\begin{document}

\begin{tikzpicture}[scale=2.5]
\tkzInit[xmin=-2,xmax=3,ymax=3]
\tkzGrid[color=orange](-2,0)(3,3)
\tkzAxeXY 
\tkzFct[samples  = 200,
        color    = red,
        domain   = -1:1.6]{(((x+1)*x)*x)**(0.5)}
\tkzDrawTangentLine(0)
\tkzText[draw,
         color = red,
         fill  = orange!20](2,1){$f(x)=\sqrt{x^3+x^2}$}
\end{tikzpicture}

\end{document}

Riemann

Riemann
[PDF] [TEX]
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage{amsmath,tkz-fct}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}   

\begin{document} 
   
\begin{tikzpicture}[scale=1]
\tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2]
\tkzDrawX \tkzDrawY
\tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)}
\tkzDrawRiemannSumSup[fill=blue!40,opacity=.5,interval=-1:5,number=10] 
\tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10] 
\end{tikzpicture} 

\end{document}   

Astroïde

astroide
[PDF] [TEX]
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage{amsmath,tkz-fct}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt} 
\begin{document}

\begin{center} 
  \begin{tikzpicture}[scale=1.25]
    \tkzInit[xmin=-1, xmax=1, xstep=.2,
             ymin=-1, ymax=1, ystep=.2]
    \tkzFctPar[color=red,
               line width = 2pt,
               fill       = orange,
               opacity    =.4,
               samples    = 400,
               domain     = 0:2*\FPpi]{(cos(t))**3}{(sin(t))**3} 
\tkzText[text width = 4cm,
         opacity    = .6,
         text       = black](0,0){%
\begin{align*} 
  x(t) &=\exp(t)\times \sin(t)\\
  y(t) &=\exp(t)\times \cos(t)\\ 
\end{align*} }
\end{tikzpicture} 
\end{center}  
\end{document}

Saint Valentin

Heart1
[PDF] [TEX]
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage{amsmath,tkz-fct}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}
\begin{document} 
  
\begin{tikzpicture}[scale=4] 
\tkzInit[xmin = -5, xmax = 5,
         ymin = -5, ymax = 5]
\tkzFctPolar[domain     = -\FPpi:\FPpi,
             samples    = 800,
             ball color = BrickRed,
          shading    = ball]{2-2*sin(t)+sin(t)*sqrt(abs(cos(t)))/(sin(t)+1.4)}
\tkzText[opacity=.6,text=white](0,-2){%
  $\displaystyle\rho= 2-2\times \sin(t)+\sin(t)
   \times\frac{\sqrt{|\cos(t)|}}{\sin(t)+1.4}$}
\end{tikzpicture}
  
\end{document} 

Saint Valentin version 2

Heart2
[PDF] [TEX]
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage{amsmath,tkz-fct}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}% 
\begin{document}

\begin{center} 
\begin{tikzpicture}[yscale=1.5]
\tkzInit[xmin = -.4 , xmax = .4 , xstep = .1,
         ymin = 0   , ymax = .7 , ystep = .1]
\tkzClip
\tkzFctPar[samples    = 2000,
           smooth,
           domain     = -1:1,
           ball color = BrickRed,
           shading    = ball]{sin(t)*cos(t)*log(abs(t))}{sqrt(abs(t))*cos(t)}
\tkzText[text width = 4cm,
         opacity    = 1,
         text       = white](0,.4){%
\begin{align*} 
  x(t) &=\sin(t)\cos(t)\log(|t|)\\
  y(t) &=\sqrt{(|t|)\cos(t)}\\ 
\end{align*}} 
 \end{tikzpicture}
\end{center}  
\end{document}

Cannabis or Marijuana curve (from MathWorld.com )

Cannabis
[PDF] [TEX]
\documentclass[]{scrartcl}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage{amsmath,tkz-fct}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}% 

\begin{document} 
\begin{tikzpicture}[scale=4] 
\tkzInit[xmin  = -5 , xmax = 5, xstep = 1,
         ymin  = -5 , ymax = 5, ystep = 1]
\tkzFctPolar[domain=0:2*pi,samples=1000]{%
   (1+.9*cos(8*t))*(1+.1*cos(24*t))*(1+.1*cos(200*t))*(1+sin(t)) }
\tkzText[rotate=45](2,3.5){\large Cannabis Curve} 
\tkzText[rotate=45](2,3){%
  $\rho =(1+.9*\cos(8*t))*(1+.1*\cos(24*t))*(1+.1*\cos(200*t))*(1+\sin(t))$}    
\end{tikzpicture}
  
  \end{document}