Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!batcomputer!eric From: eric@batcomputer.tn.cornell.edu (Eric Fielding) Newsgroups: comp.lang.postscript Subject: Drawing lots of triangles Message-ID: <9561@batcomputer.tn.cornell.edu> Date: 17 Jan 90 23:53:12 GMT Reply-To: eric@geology.tn.cornell.edu Distribution: na Organization: Department of Geological Sciences, Cornell University Lines: 45 I was glad to see all of the helpful suggestions about how to draw boxes fast, but I have a different problem that seems to me much harder to optimize under PS. I have a picture that consists almost entirely of 180,000 filled triangles. (This is the output from a 3D rendering program.) Here is a sample of one of the files: %! %%BoundingBox: 0 0 612 792 %%EndComments initgraphics 8.5 72 mul 0 translate 90 rotate 72 1000 div dup scale 2.0 setmiterlimit 60 45 {add .5 mul} setscreen /NP {newpath} def /SD {setdash} def /SG {99 div setgray} def /MT {moveto} def /LT {lineto} def /CP {closepath} def /GS {gsave} def /FL {fill} def /GR {grestore} def /SK {stroke} def /LW {setlinewidth} def /PLP {1024 1 true [1024 0 0 1 0 0] {<8080808080808080>} imagemask} def /WLP {1024 1 true [1024 0 0 1 0 0] {<8888888888888888>} imagemask} def erasepage [... other graphics stuff deleted, triangles follow] NP 8761 6576 MT 8781 6584 LT 8782 6574 LT 8761 6576 LT CP GS 99 SG FL GR NP 8761 6576 MT 8760 6587 LT 8781 6584 LT 8761 6576 LT CP GS 99 SG FL GR NP 8740 6581 MT 8760 6587 LT 8761 6576 LT 8740 6581 LT CP GS 99 SG FL GR ... about 180,000 times Is there anything obviously inefficient about the way this is being printed? I see from the 'boxes' discussion that I could redefine the NP, MT, LT, etc. to be one letter, but that is a small savings. Any other suggestions? (I don't have the source the graphics package, but I could get it, or use post-processing under either Ultrix or VMS.) ++Eric Fielding eric@geology.tn.cornell.edu eric@crnlthry.bitnet