[comp.graphics] Dbl line cleanup. Novice question

awd@dbase.UUCP (Alastair Dallas) (06/10/89)

This is a novice question.  Reading this newsgroup's 100 or so postings
has convinced me that access to Quickdraw on a Macintosh does not make
you a graphics programmer.  The math gets pretty heavy all too quickly.

Here's my problem.  I'd line to take a line drawing, like:

	+-----------+
	|           |
	|           +----+
	|                |
	+----------------+

And make all the lines double.  The problem is that corners come out like:

	+-+-------
	+-|-------
	| |
	| |
	| |

Has this been discussed here before?  I'd like to come up with a general-
purpose algorithm to take a series of line segments (described by start
and end points) and convert them to another series of line segments, where
each original line is now flanked by parallel lines at some distance.  I
would also like to handle T-intersections and non-perpendicular connections.

Have I stumbled onto some vast area of theoretical research, or is this
stuff fairly straightforward?  Any clues or pointers to literature would be
appreciated.

/alastair/

Disclaimer: Do what you will with me; my employer has nothing to do with this.