Xref: utzoo comp.graphics:18845 comp.lang.postscript:9138 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!mcsun!ukc!canon!ads From: ads@canon.co.uk (Adam Billyard) Newsgroups: comp.graphics,comp.lang.postscript Subject: Re: How do I draw a depth-cued line in PostScript? Message-ID: <1991Jun26.140611.1052@canon.co.uk> Date: 26 Jun 91 14:06:11 GMT References: <1991Jun26.054357.7870@cs.UAlberta.CA> Reply-To: ads@canon.co.uk Organization: Canon Research Europe, Guildford, UK Lines: 35 lnds@sherlock.mmid.ualberta.ca (Mark Israel) writes: > How do I draw a depth-cued line in PostScript? > The PostScript imaging model has no notion of variable shading over the area to be filled. The metaphor is of opaque paint being pushed through a stencil. Display PostScript extends this a little by including transparency, but in general if you want continuous shading, you must write your own filler. The standard way to create continuous shading (in PostScript) is to overpaint the path again and again while altering the path (usually by scaling) and altering the colour you're using. Its very inefficient. e.g. gsave clippath pathbbox 4 2 roll translate scale % 1,1 space 1 -0.1 0 { newpath .5 .5 2 index 0 360 arc 1 exch sub setgray fill } for grestore Depth-cueing implies a 3rd dimension, so you'll have to keep the control points you use as triples. Since PostScript is a complete language, its quite possible to do this sort of thing. You might look in Salmon and Slater "Computer Graphics". They present a complete 3D viewing model and wireframe rendering entirely written in PostScript. It might help demonstrate how you enrich the 2D paths with a 3rd dimension. Adam.