laser-lovers@uw-beaver (laser-lovers) (03/02/84)
From Furuta@WASHINGTON.ARPA Thu Mar 1 20:13:22 1984 Recently a flurry of messages went over the mailing list TeXhax@Score discussing the lack of drawing primitives in TeX and in TeX's Device Independent output format (.DVI). (TeXhax is a list for TeX installers and maintainers.) Unfortunately, the discussion died off rather abruptly. I've appended the collected messages to the end of this one and would like to solicit your comments on the question raised by David Fuchs: What graphics primitives should a typesetter language provide? I think I would like to avoid further discussion of the form "the xyz typesetter does/does not have the ability to do function abc", but I would like to hear some ideas of what sorts of things should be in a device independent typesetter format. I think this is appropriate for this list to consider since it seems to be tightly tied in to the ability to do high-quality document preparation for printing on the devices of interest to the people on this list. To prevent some duplication, let me here enumerate what functions typesetter independent troff provides (taken directly from "A Typesetter-independent TROFF" by Brian W. Kernighan): D1 dh dv draw line from current position by dh dv Dc d draw circle of diameter d with left side here De d1 d2 draw ellipse of diameters d1 d2 Da dh1 dv1 dh2 dv2 draw arc from current position to dh1+dh2 dv1+dv2, center at dh1 dv1 from current position D~ dh1 dv1 dh2 dv2 ... draw B-spline from current position to dh1 dv1, then to dh2 dv2, then to ... In all of these, dh dv is an increment on the current horizontal and vertical position, with down and right positive. For those of you who read this list for hardware updates, thanks in advance for your indulgence. Here's the collected messages from TeXhax: ==================== Date: Sun, 26 Feb 84 22:22:05 pst From: sdcarl!rusty@Berkeley (Rusty Wright) Message-Id: <8402270622.AA10363@sdcarl.CARL> Phone-Number: (619) 452-4383 Subject: picture drawing one of the complaints i get here against tex is that it isn't possible to draw complex pictures conveniently as one can with "pic" and/or "ideal" with troff. is this true? if so, are there any plans to do something about it? Date: Monday, 27 Feb 1984 12:58-PST To: sdcarl!rusty@UCB-VAX (Rusty Wright) Subject: Re: picture drawing In-reply-to: Your message of Sun, 26 Feb 84 22:22:05 pst. <8402270622.AA10363@sdcarl.CARL> From: greep@SU-DSN No reason it shouldn't be possible if you have fonts containing pieces in the shapes you want, such as circles or arcs. I've seen TeX make circles this way. You don't even need straight line segments since you can use rules. Date: Mon, 27 Feb 84 16:49:09 CST From: William LeFebvre <phil@rice> Subject: Re: picture drawing Message-Id: <304.phil.Dione@Rice> In-Reply-To: a message from greep@SU-DSN dated Monday, 27 Feb 1984 12:58-PST Yeah, but the nice thing about ditroff's drawing stuff is that the specification is more general than in TeX. You can tell ditroff to draw a circle of any given radius, or any shape of arc and ellipse, or any type of B-spline. Ditroff outputs special commands provided in the intermediate language which specifies these things. The back-end filter worrys about how to print them and therefore can do so in the most efficient way possible on the device. Doing this with a font is not nearly as versatile (and in some cases, not nearly as pretty, either). I would really like to see a similar type of thing in the DVI file format. Currently, my biggest gripe about TeX is the lack of a reasonable graphics interface. This would cure that problem. More specifically, here are the graphical objects that I would like to see specifiable in a DVI file: line from one given point to another circle of a given radius and position ellipse of given axes at a given point arc of given radius and starting and ending points spline that spans any number of lines Ditroff always incorporates the current position as part of the object (for example, a line starts at the current point and connects to some specified point). William LeFebvre Department of Mathematical Sciences Rice University <phil@rice> Date: Mon, 27 Feb 84 16:02:57 pst From: sdcarl!rusty@Berkeley (Rusty Wright) Message-Id: <8402280002.AA23146@sdcarl.CARL> Phone-Number: (619) 452-4383 To: greep@SU-DSN.ARPA Subject: Re: picture drawing From ucbvax!@SU-DSN.ARPA:greep@SU-DSN Mon Feb 27 15:04:37 1984 Date: Monday, 27 Feb 1984 12:58-PST To: sdcarl!rusty@BERKELEY (Rusty Wright) Cc: texhax@SU-AI.ARPA Subject: Re: picture drawing In-Reply-To: Your message of Sun, 26 Feb 84 22:22:05 pst. <8402270622.AA10363@sdcarl.CARL> From: ucbvax!greep@SU-DSN.ARPA No reason it shouldn't be possible if you have fonts containing pieces in the shapes you want, such as circles or arcs. I've seen TeX make circles this way. You don't even need straight line segments since you can use rules. well, yes. if you could see what one can do with pic and ideal, and how easily it can be done, you would realize how silly your approach is (in a certain sense). for example, imagine someone that has been using pascal and then has to use fortran (no, i'm not trying to equate troff with pascal and TeX with fortran) and asking how they can do something they've taken for granted with pascal and some fortran hacker says "yes, you could do it by doing thus and so" where "thus and so" is clearly some crude hack. i don't want to start any religious TeX vs. troff wars, and i'm not trying to downgrade TeX, but i do wish TeX had some comparable facility that was as powerful, easy to use, convenient, easy to understand, etc. Date: 27 Feb 84 1723 PST From: David Fuchs <DRF@SU-AI> Subject: TeX vs. Graphics Allow me to explain the `party line' on why the TeX language and DVI format lack graphics commands and in DVI format. The primary reason is that we saw no way to provide these capabilities in a device-independent way. It's hard enough as it is to get various printers and typesetters to handle Metafont characters; it would be virtually impossible to get them all to draw arbitrary splines. Does ditroff actually talk to, say, APS-5 or Compugraphic 8600 or Linotron 202 typesetters? What about on an EPSON or other dot-matrix printer? If so, how hard was it to write the special graphics code? On the other hand, TeX is going to get nowhere fast if the best we can do is give reasons why you can't use it to do things that are easy in ditroff. We specifically included the \special command to allow capable device drivers to merge in graphics created by other systems (such as ideal) at print-time. This sort of feature is in use at a handfull of TeX installations (mutually incompatible, of course). The second reason that TeX lacks graphics commands is that the world lacks a standard, comprehensive, accepted language for describing pictures (consider shading, half-tones, splines, color, etc.) This whole issue is too important for us to just dash off a quick solution that everyone will be unhappy with in a year or two. It would be much better to start (or join) a cooperative, long-range effort to establish the ultimate graphic description language that we all can adopt. Who knows, maybe printer manufacturers would eventually latch on to a standard, and everything would be solved. Perhaps this mailing list would be a good place to discuss the issues in more detail. We already have a proposal on the table saying that the language must be able to describe simple shapes like ovals and splines. What about half-tones, shading an texture? Color pictures? What else? On the other hand, is anyone aware of any existing work on standards in this area? I am told that Xerox's PRESS II language handles these sorts of things, but they're keeping it under wraps. -david Date: Mon 27 Feb 84 17:53:26-PST From: Pierre MacKay <MACKAY@WASHINGTON.ARPA> Subject: TeX and Graphics David has preempted my planned remarks on DVI and said it better. I would add a footnote however to the reference to APS, Compugraphic, Linotron (not to mention VideoComp, Alphatype, Digiset) etc. \footnote{*} A laser-printer is not (or not often) a typesetter. The PURUP PE 4000 at 1270 lines/inch may qualify as a typesetter, but the vast majority of devices on which \TeX is at this moment producing output are not anywhere near typesetting quality. Don't get me wrong. I would be wretched without my Versatec and Symbolics pseudo-typesetting output, but I still regard their product as pseudo-typesetting. Typesetting really starts at about 1200 lines/inch (which makes the Linotron a rather marginal device at that.) Vector graphics on devices of that sort is a very different thing from our \special{begin-vector} \special{vector} pair which will draw a vector from any addressable point on the LGP bit map to any other. There is no common instruction that will do that on any of the typesetters I know. But the nice thing about \TeX\ is that if I took the DVI file which draws the vectors on the LGP and ran it through another driver, there would be no serious incompatibility. The LOG file would tell me that there was a \special at each of the points where it occurred, and would do nothing at all with it. I could always strip the line in later if I felt it was really needed. Pierre ------- Date: Mon, 27 Feb 84 23:50:44 EST From: Doug Gwyn (VLD/VMB) <gwyn@brl-vld> To: David Fuchs <DRF@su-ai> Subject: Re: TeX vs. Graphics I believe TiTroff just uses dots to draw "pic" curved lines. Date: Mon, 27 Feb 84 23:13:42 CST From: William LeFebvre <phil@rice> Subject: Re: TeX vs. Graphics To: David Fuchs <DRF@SU-AI> Message-Id: <306.phil.Dione@Rice> In-Reply-To: a message from David Fuchs dated 27 Feb 84 1723 PST In response to your questions about ditroff, Bell does distribute drivers for the APS-5 and the Linotron 202 as part of ditroff. Not having either of these devices, I cannot vouch for the speed or reliability of the drivers. There is also a collection of drawing subroutines that make it very easy (from a graphics standpoint, anyway) to write a driver for the device of your choice. Basically, you give one of these routines the necessary information and it calls a primitive to fill the pixels. The standard method for drawing things on a device that has no graphics commands is to print a zillion periods in appropriate positions. This may sound awfully kludgy and you may think that it wouldn't look good, but it really isn't all that bad (just VERY slow). The documents that come with ditroff include a "pic" and "ideal" manual. I don't know what they were printed on, but the diagrams look quite good (if you ignore the lousy xeroxing job). I suspect that those pictures were drawn with bunches of little periods. William LeFebvre Department of Mathematical Sciences Rice University <phil@rice> -------