Fichier exemple_06.jps — Modifié le 9 Mai 2006 à 15 h 50

exemple_06.pdf
Source
autocrop
%% PhS
%%
%% échelle et étendue de l'image
30 setxunit
-1 9 setxrange
-5 2 setyrange

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Positionnement de la Caméra
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/ScreenDist 0.1 def
/ZoomFactor_x 50 def
/ZoomFactor_y 50 def

5 -8 4 SetCamPos
-1 1.1 -0.3 SetCamVec
0.03 0.03 1 SetCamUp
ComputeCamera

%% traces

1.5 setlinewidth
190 255 div 190 255 div 200 255 div setrgbcolor

%% syntaxe : x_min x_max y_min y_max z_min z_max quadrilleXYZ
-2 5 -3 5 0 0 quadrilleXYZ

%% la fonction z = f (x, y)
/f { % x y
2 dict begin
   /y exch def
   /x exch def
#rpn# Cos (x^2 + y^2) * 4 * Exp (-x^2 - y^2)
end
} def

1.2 setlinewidth
/coul1 {120 255 div 70 255 div 9 255 div setrgbcolor} def
coul1

/pas 0.25 def
-2 pas 4 -3 pas 3 {f} surfaceparam3d