Fichier villarceau4.jps — Modifié le 3 Mai 2008 à 16 h 24

villarceau4.pdf
Source
%% D'apres une idee et un code original de Maxime Chupin

usecolor
-6 6 setxrange
-5 3 setyrange
30 setxunit
/ScreenDist .05 def

-10 -12 10 SetCamPos
0 0 0 SetCamView
2 setlinejoin 

GetCamPos setlightsrc
%2 setlightintensity


%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %% 1ere compilation : on calcule les 2 parties du tore
%% %% sectionne, puis on sauvegarde
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 
%% 3 5 [36 36] newtore
%% [1 0 -4 3 div 0] solideqplansepare
%% 
%% %% maintenant les 2 parties sont sur la pile
%% dup videsolid
%% dup (jaune) (rouge) inoutputcolors
%% /villarceau1 exch def
%% 
%% dup videsolid
%% dup (jaune) (rouge) inoutputcolors
%% /villarceau2 exch def
%% 
%% %% on sauvegarde
%% villarceau1 (villarceau1) writesolidfile
%% villarceau2 (villarceau2) writesolidfile
%% villarceau2 drawsolid**
%% stop

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 2eme compilation et suivantes : on charge les donnees du tore
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/villarceau1 (villarceau1) readsolidfile def
/villarceau2 (villarceau2) readsolidfile def


.1 setlinewidth
gris
%% 
%% %on trace
%% solidfuz
villarceau2
drawsolid**

%% villarceau2
%% {0 2 0 addv3d} solidtransform
%% drawsolid**

%% %% pour visualiser les axes
%%  -2 1 2 axesRVB

%% [1 0 -4 3 div 0] eq2plan
%% dup [-6 6 -9 9] planputrange
%% dup [.5 dup] planputngrid
%% newplan
%% dup (.3 setfillopacity AntiqueWhite) solidputcolors
%% dup videsolid
%% drawsolid**

bleu
1 setlinewidth
newpath
0 0 5 cercle_
0 3 0 [1 0 -4 3 div] false projpath
stroke
0 0 5 cercle_
0 -3 0 [1 0 -4 3 div] false projpath
stroke