Changeset 86
- Timestamp:
- 07/10/08 14:21:50 (6 months ago)
- Files:
-
- trunk/solides.pro (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/solides.pro
r81 r86 1 1 %! 2 2 % PostScript prologue for pst-solides3d.tex. 3 % Version 4.0 , 2008/07/063 % Version 4.01, 2008/07/09 4 4 % 5 5 %% COPYRIGHT 2008 by Jean-Paul Vignault … … 314 314 /sysfill {systemdict /fill get exec} def 315 315 /sysatan {systemdict /atan get exec} def 316 /atan {2 copy 0 0 eqp { 0} {sysatan} ifelse} def316 /atan {2 copy 0 0 eqp {pop pop 0} {sysatan} ifelse} def 317 317 % Mise en place de la nouvelle procedure 318 318 /stroke { … … 1220 1220 1221 1221 %%%%% ### droite ### 1222 %% %% syntaxe : A B droite 1223 %% /droite { 1224 %% gsave 1225 %% 6 dict begin 1226 %% /yB exch def 1227 %% /xB exch def 1228 %% /yA exch def 1229 %% /xA exch def 1230 %% xA yA xB yB 1231 %% eqp 1232 %% {} 1233 %% { 1234 %% xA yA xB yB 1235 %% verticale? 1236 %% { 1237 %% newpath 1238 %% xA ymin smoveto 1239 %% xA ymax slineto 1240 %% stockcurrentcpath 1241 %% stroke 1242 %% } 1243 %% { 1244 %% newpath 1245 %% /alpha xA yA xB yB coeffdir def 1246 %% /beta xA yA xB yB ordorig def 1247 %% xmin dup alpha mul beta add smoveto 1248 %% xmax dup alpha mul beta add slineto 1249 %% stockcurrentcpath 1250 %% stroke 1251 %% } 1252 %% ifelse 1253 %% } 1254 %% ifelse 1255 %% end 1256 %% grestore 1257 %% } def 1258 1222 1259 %% syntaxe : A B droite 1223 1260 /droite { 1224 1261 gsave 1225 1262 6 dict begin 1226 /yB exch def 1227 /xB exch def 1228 /yA exch def 1229 /xA exch def 1230 xA yA xB yB 1231 eqp 1232 {} 1233 { 1234 xA yA xB yB 1235 verticale? 1236 { 1237 newpath 1238 xA ymin smoveto 1239 xA ymax slineto 1240 stockcurrentcpath 1241 stroke 1242 } 1243 { 1244 newpath 1245 /alpha xA yA xB yB coeffdir def 1246 /beta xA yA xB yB ordorig def 1247 xmin dup alpha mul beta add smoveto 1248 xmax dup alpha mul beta add slineto 1249 stockcurrentcpath 1250 stroke 1251 } 1252 ifelse 1253 } 1254 ifelse 1263 /B defpoint 1264 /A defpoint 1265 A pop B pop eq { 1266 %% droite verticale 1267 newpath 1268 A pop ymin smoveto 1269 A pop ymax slineto 1270 stockcurrentcpath 1271 stroke 1272 } { 1273 %% on cherche le point le + a gauche 1274 xmin A B xdpoint /C defpoint 1275 C exch pop ymin lt { 1276 %% trop a gauche 1277 ymin A B ydpoint /C defpoint 1278 } if 1279 C exch pop ymax gt { 1280 %% trop a gauche 1281 ymax A B ydpoint /C defpoint 1282 } if 1283 %% on cherche le point le + a droite 1284 xmax A B xdpoint /D defpoint 1285 D exch pop ymin lt { 1286 %% trop a droite 1287 ymin A B ydpoint /D defpoint 1288 } if 1289 D exch pop ymax gt { 1290 %% trop a gauche 1291 ymax A B ydpoint /D defpoint 1292 } if 1293 newpath 1294 C smoveto 1295 D slineto 1296 stockcurrentcpath 1297 stroke 1298 } ifelse 1255 1299 end 1256 1300 grestore … … 10922 10966 } if 10923 10967 proj-action (none) eqstring not { 10968 gsave 10924 10969 l@pl@n plangetrange aload pop 10925 10970 setyrange setxrange 10926 newpath10927 xmin ymin l@pl@n pointplan smoveto10928 xmin ymax l@pl@n pointplan slineto10929 xmax ymax l@pl@n pointplan slineto10930 xmax ymin l@pl@n pointplan slineto10931 xmin ymin l@pl@n pointplan smoveto10932 clip10933 %planprojpst bprojscene10971 %% newpath 10972 %% xmin ymin l@pl@n pointplan smoveto 10973 %% xmin ymax l@pl@n pointplan slineto 10974 %% xmax ymax l@pl@n pointplan slineto 10975 %% xmax ymin l@pl@n pointplan slineto 10976 %% xmin ymin l@pl@n pointplan smoveto 10977 %% clip 10978 planprojpst bprojscene 10934 10979 solidlinewidth setlinewidth 10935 10980 linestyle … … 10938 10983 newpath 10939 10984 range aload pop proj-args 10940 proj-definition cvx exec Cercle _10985 proj-definition cvx exec Cercle 10941 10986 planprojpst projectionsifacevisible projpath 10942 % eprojscene 10987 eprojscene 10988 grestore 10943 10989 } if 10944 10990 } def
