Source PostScript (solidnumsommets.pps)

Retour Texte non formaté
/solidnumsommets { 8 dict begin % Font findfont 10 scalefont setfont dup issolid not { %% on a un argument /option exch def } if /sol exch def /n sol solidnombresommets def /m sol solidnombrefaces def currentdict /option known not { /option [0 1 n 1 sub {} for] def } if /result [ n {false} repeat ] def 0 1 option length 1 sub { /k exch def option k get /i exch def %% indice du sommet examine 0 1 m 1 sub { /j exch def %% indice de la face examinee i sol j solidgetface in { %% le sommet i est dans la face j pop exit } if } for %% le sommet i est dans la face j sol j solidcentreface /G defpoint3d sol i solidgetsommet /S defpoint3d i ( ) cvs G S vecteur3d normalize3d 15 dup ptojpoint pop mulv3d S addv3d 3dto2d cctext } for end } def