groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Bug in pic? And how to do this right?


From: joerg van den hoff
Subject: Re: [Groff] Bug in pic? And how to do this right?
Date: Fri, 12 Dec 2003 09:54:27 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007

Greg 'groggy' Lehey wrote:

I'm trying to draw a picture of a "volume" with pic.  Basically, it
should be an ellipse at the top, straight vertical sides, and the
front of an ellipse at the bottom.

Two things stop me from doing this:

1.  I can't do only part of an ellipse, or at least that's the way I
   read both the documentation and the code.

2.  I can't get an arc to start at the bottom of the left hand side.
   If I write the code the way it should be, it starts too far to the
   left.  If I gradually move the start to the right, it suddenly
   jumps past the reference point and leaves a gap.  This behaviour
   has been there for several years now.

I'm attaching the source code and the resultant PostScript output from
the following command:

  groff -p pic1.mm > pic1.ps

Questions (yes, the sequence is deliberate):

2.  This is a bug, right?  Any idea how to fix it?

1.  Am I correct in my assumption that I can draw only whole ellipses?
   Is there any other way to draw the correct partial ellipse?  It
   seems that it would be nice to have a feature in pic to draw
   arbitrary curves (specified by a formula), but I can't quite see
   how to do it.  If it's not there, and people think it's a good
   idea, I'm prepared to have a crack at it some time.  In that case,
   can anybody give me an idea how to go about it?  I've had a look
   in the code, and it doesn't look impossibly difficult or
   convoluted.

Greg
--
Finger address@hidden for PGP public key.
See complete headers for address and phone numbers.
------------------------------------------------------------------------

.PS
T: ellipse ht .3i wid 4i
  line from T.e down 4i
  line from T.w down 4i
B: arc from T.w+(0,-4) rad 10i to T.e+(0,-4)
.PE

sorry, no solution but only a confirmation that something indeed seems wrong. I modified your script slightly, adding some support lines to see how far the arc segment does deviate from the intended ellipse segment. especially, it is remarkable, that dashing goes wrong, too, in the postscript output.
joerg

image/pict


reply via email to

[Prev in Thread] Current Thread [Next in Thread]