groff
[Top][All Lists]
Advanced

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

Re: [Groff] parsing a corner specification


From: Keith Marshall
Subject: Re: [Groff] parsing a corner specification
Date: Sun, 26 Aug 2007 11:57:29 +0100
User-agent: KMail/1.8.2

On Sunday 26 August 2007 00:51, Joel E. Denny wrote:
> Third, there are cases where the interpretation of "left" alone is
> unambiguous and it should be interpreted as a corner, but it's a
> syntax error instead.  My original example in this thread is such a
> case:
>
>   .PS
>   A: circle "A"
>   B: A left
>   circle "B" at B
>   .PE
>
> I see no ambiguity because I don't see how it makes sense to
> reference an existing object with a direction modifier.  That is,
> even if A referenced a line, its direction was chosen when it was
> drawn.  Thus, it's clear to me that "B: A left" means set the label B
> to the left corner of A.

Even if this were true, it makes no sense in geometric terms, to refer 
to the `left corner' of an object.  What, exactly, should that be 
interpreted to mean?

In your example, object `A' is a circle; it doesn't have *any* corners!  
The only possible interpretation of `left', as a location rather than 
as a direction, is the x-ordinate of the tangent line touching the 
leftmost point on the circumference of `A', and that refers to an 
infinite set of locations, (although your intention is presumably to 
refer to the unique point at which this tangent touches the circle; in 
traditional pic, this would be referred to as `A.w').

Even if `A' represented a box, unless it is drawn inclined to the 
co-ordinate axes, it has no `left corner'.  The only situation in which 
`left corner' has any geometric meaning, is when the object is a 
polygon, of three or more sides, with exactly *one* vertex positioned 
further to the left, in the X-Y co-ordinate plane, than any other 
vertex.  In the general case, this usage is geometrically ambiguous, 
and IMO, it is best avoided.

Even in the gpic case, where `A.left' is accepted as an alternative to 
`A.w', this means `the centre point of the left side of object A', so 
it does not represent a `corner', and to refer to it as such is nothing 
but confusing; additionally, as Ted has already stated, the correct 
syntax is `A.left', or `at left of A', (strictly, this should probably 
be `at .left of A'), but not `A left'.  Your example can be written, 
much more intelligibly, as

  .PS
  A: circle "A"
  B: circle "B" at A.left
  .PE

or as

  .PS
  A: circle "A"
  B: circle "B" at left of A
  .PE

Why do we need to accept the more confusing form of expression?

Regards,
Keith.




reply via email to

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