Avec l’option file=false (option par défaut), le code TeXgraph est inclus dans un élément graphique utilisateur avant d’être envoyé au programme TeXgraphCmd :
\begin{texgraph}[name=surf1] view(-7,7,-7,7), Marges(0,0,0,0), size(7.5), FillStyle:=full, FillColor:=lightblue, Dsurface( M(u,v,cos(u)+sin(v)), -5+5*i, -5+5*i, 25+25*i) \end{texgraph}
| |
Dans ce premier exemple, le fichier véritablement envoyé au programme est :
TeXgraph# Graph image = [ view(-7,7,-7,7), Marges(0,0,0,0), size(7.5), FillStyle:=full, FillColor:=lightblue, Dsurface( M(u,v,cos(u)+sin(v)), -5+5*i, -5+5*i, 25+25*i) ];
Avec l’option file=true, le code TeXgraph est considéré comme un fichier source pour le programme TeXgraphCmd :
\begin{texgraph}[name=polyedre,file] Cmd Marges(0,0,0,0); size(7.5); Include "PolyedresII.mac"; Var A = M(3,0,0); Mac f = M(%1,%2,sin(%1)+cos(%2)); Graph objet1 = [ background(full,lightgray), ColorL:=slategray, StyleL:=12, CubeAdc(Origin, A,C,T1,T2,Ar), Build3D(C,T1,T2,Ar, bdSurf(f(u,v), [color:=steelblue, u:=[-pi,pi],v:=u, contrast:=0.125]), bdAxes(Origin, [color:=forestgreen,arrows:=1]) ), Display3D()]; \end{texgraph}
| |