Fichier test_03.jps — Modifié le 10 Mai 2008 à 11 h 25

test_03.pdf
Source
-2 2 setxrange
-2 2 setyrange
100 setxunit


6 -6 4 SetCamPos
0 0 0 SetCamView
2 setlinejoin
.1 setlinewidth

GetCamPos setlightsrc
1.5 setlightintensity
%/aretescachees false def

/triangulemaillage {
10 dict begin
   /solid exch def
   /n solid solidnombrefaces def
   0 1 n 1 sub {
      /i exch def
      solid i solidgetface /F exch def
      solid i solidcentreface /G defpoint3d
      solid G solidaddsommet /k exch def
      /ni F length def
      0 1 ni 1 sub {
         /j exch def
	 solid [
	    F j get
	    F j 1 add ni mod get 
	    k
	 ] solidaddface
      } for
   } for
   solid [0 1 n 1 sub {} for] solidrmfaces
end
} def

1 newtetraedre
dup triangulemaillage
dup triangulemaillage
%dup triangulemaillage
dup {normalize3d} solidtransform
dualpolyedreregulier
dup [.5 .6] solidputhuecolors
dup .8 solidaffine
dup videsolid
dup (.5 setgray) inputcolors
drawsolid**