====== Différences ====== Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.
pgf:tikz:surface1 [2010/03/23 20:07] jms |
pgf:tikz:surface1 [2010/03/24 09:05] (Version actuelle) jms |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Surface avec pgfplots ====== | ====== Surface avec pgfplots ====== | ||
- | |||
- | {{ :pgf:tikz:pgfplots-01.png }} | ||
- | |||
- | Cette surface est la même que celle produite avec [[octave/index|octave]]. | ||
<code latex> | <code latex> | ||
Ligne 12: | Ligne 8: | ||
\pagestyle{empty} | \pagestyle{empty} | ||
\begin{document} | \begin{document} | ||
- | |||
- | |||
\begin{tikzpicture} | \begin{tikzpicture} | ||
\begin{axis}[grid=major,view={150}{30}] | \begin{axis}[grid=major,view={150}{30}] | ||
\addplot3[surf,shader=faceted,samples=40,domain=-2:2,y domain=-2:2]% | \addplot3[surf,shader=faceted,samples=40,domain=-2:2,y domain=-2:2]% | ||
- | {100*sin(x)*sin(y)*exp(-x*x+x*y-y*y)}; | + | {100*sin(deg(x))*sin(deg(y))*exp(-x*x+x*y-y*y)}; |
\end{axis} | \end{axis} | ||
\end{tikzpicture} | \end{tikzpicture} | ||
\end{document} | \end{document} | ||
</code> | </code> | ||
+ | {{ :pgf:tikz:pgfplots-01.png }} | ||
+ | |||
+ | Cette surface est la même que celle produite avec [[octave/index|octave]]. Petite précision: les angles sont, par défaut, en radians dans //Octave//, en degrés dans //pgfplots//. | ||
+ | |||
+ |