summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-fct/doc/latex/TKZdoc-fct-polar.tex
blob: 640409445a73f876c1516e06cadf63d4c51cd9ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
\section{Courbes en coordonnées polaires}

 \hypertarget{tfpo}{}   
\begin{NewMacroBox}{tkzFctPolar}{\oarg{local options}\marg{$f(t)$}}                                                 
  \emph{$f(t)$ est une expression utilisant la syntaxe de \tkzname{gnuplot}. } 

\medskip
\begin{tabular}{lll}
 \toprule
 options             & exemple & explication                         \\ 
 \midrule
\TAline{$x(t)$,$y(t)$}{\tkzcname{tkzFctPar[0:1]}\{\tkzcname{t**3}\}\{\tkzcname{t**2}\}}{$x(t)=t^3$,$y(t)=t^2$ }  
 \bottomrule
\end{tabular}

Les options sont celles de \TIKZ.

\begin{tabular}{lll}
\toprule
options             & défaut & définition                         \\ 
\midrule
\TOline{domain}{0:2*pi}{domaine de la fonction}  
\TOline{samples}{200}{nombre de points utilisés}
\TOline{id} {tkzfonct}{permet d'identifier les noms des fichiers auxiliaires}
\TOline{color}{black}{couleur de la ligne}
\TOline{line width} {0.4pt}{épaisseur de la ligne}
\TOline{style} {solid}{style de la ligne}
\bottomrule
\end{tabular}

\medskip
\emph{ \tkzname{gnuplot} définit  $\pi$ avec \tkzname{pi} et \tkzname{fp.sty} avec \tkzcname{FPpi}. Les valeurs qui déterminent le domaine sont évaluées par \tkzname{fp.sty}. Il est possible d'utiliser soit \tkzname{pi}, soit  \tkzcname{FPpi}.}
 \end{NewMacroBox}

\subsection{Équation polaire exemple 1}

$ \rho(t)= \cos(t)*\sin(t) $

\begin{tkzexample}[latex=8cm]    
\begin{tikzpicture}[scale=0.75] 
 \tkzInit [xmin=-0.5,xmax=0.5,
           ymin=-0.5,ymax=0.5,
           xstep=0.1,ystep=.1]   
 \tkzDrawX   \tkzDrawY
 \tkzFctPolar[domain=-2*pi:2*pi]{cos(t)*sin(t)}
\end{tikzpicture}    
\end{tkzexample}

\newpage
\subsection{Équation polaire exemple 2} 
$ \rho(t)= \cos(2*t)  $
  
\begin{center}
\begin{tkzexample}[] 
\begin{tikzpicture}[scale=1.25] 
   \tkzInit [xmin=-1,xmax=1,
             ymin=-1,ymax=1, 
             xstep=.2,ystep=.2]
  \tkzDrawX   \tkzDrawY
  \tkzFctPolar[domain=0:2*pi]{cos(2*t)}
\end{tikzpicture}    
\end{tkzexample} 
\end{center}

 
 \newpage
 \subsection{Équation polaire Heart} 
From Mathworld :  \url{http://mathworld.wolfram.com/HeartCurve.html}

 $\rho(t)= 2-2*\sin(t)+\sin(t)*\sqrt(|\cos(t)|)/(\sin(t)+1.4  $
 
\vspace{2cm}
\begin{center}
\begin{tkzexample}[]    
\begin{tikzpicture}[scale=3] 
	\tkzInit[xmin=-5,xmax=5,ymin=-5,ymax=5]
	\tkzFctPolar[domain     = -pi:pi,
	             samples    = 800,
	             ball color = red,
	             shading    = ball]%
	  {2-2*sin(t)+sin(t)*sqrt(abs(cos(t)))/(sin(t)+1.4)}
\end{tikzpicture}
\end{tkzexample}
\end{center}
                   
 \subsection{Équation polaire exemple 4}    
 $\rho(t)= 1-sin(t)$

\vspace{2cm}
\begin{center}
\begin{tkzexample}[vbox]
\begin{tikzpicture}[scale=4] 
 \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1]
 \tkzFctPolar[domain=0:2*pi,samples=400]{ 1-sin(t) }
\end{tikzpicture}
\end{tkzexample} 
\end{center}

   
   \newpage
\subsection{Équation polaire Cannabis ou Marijuana Curve} 
 Cannabis curve from mathworld : \url{http://mathworld.wolfram.com/CannabisCurve.html}
 
$ \rho(t)=(1+.9*\cos(8*t))*(1+.1*\cos(24*t))*(1+.1*\cos(200*t))*(1+\sin(t)) $
 
\begin{center}
\begin{tkzexample}[vbox]
\begin{tikzpicture}[scale=2.5] 
  \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,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)) }  
\end{tikzpicture}  
\end{tkzexample}
\end{center}

 
\newpage
\subsection{Scarabaeus  Curve}
From mathworld : \url{http://mathworld.wolfram.com/Scarabaeus.html}

$\rho(t)=1.6*\cos(2*t)-3*\cos(t) $

\vspace{2cm}
\begin{center}
\begin{tkzexample}[]   
\begin{tikzpicture}[scale=2.5] 
	\tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1]
	\tkzFctPolar[domain=0:2*pi,samples=400]{1.6*cos(2*t)-3*cos(t) }  
	\end{tikzpicture} 
	\end{tkzexample}
\end{center}


\endinput