[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Placement problem with coloured circles in pic
From: |
Ted Harding |
Subject: |
[Groff] Placement problem with coloured circles in pic |
Date: |
Thu, 05 Jul 2012 21:33:30 +0100 (BST) |
Greetings all!
The folloowing exemplifies a placement problem I am
experiencing when creating coloured circles in pic.
This is just a simple example: my ultimate intention
is to be able to place a circle of arbitrary size
and arbitrary colour, define by "RGB", at an arbitrary
point.
.PS
line from (-2,0) to (2,0)
line from (0,-2) to (0,2)
define cblob {
command sprintf(".defcolor COL rgb %.3ff %.3ff %.3ff.sp 2",$4,$5,$6)
circle rad $1 at ($2,$3) coloured "COL"
}
circle rad 1 at (0,0) ## First (black outline) circle (see below)
for i=0 to 20 do{ ## 2nd (i=0), 3rd (i=1) ... green circles.
r = (1 - i/20)
cblob(r,0,0, 0,r,0)
}
.PE
The first (plain black outline) circle is correctly placed
with its centre at (0,0).
The second (pure green circle corresponding to i=0) is
displaced some distance above the point (0,0).
The third (slightly smaller greenish circle corresponding to i=1)
is displaced much further above (0,0).
All subsequent circles appear to have their centres at the
centre of the third circle, so from i=1 onwards things are
as they should be apart from being centred in the wrong place.
I'm puzzled about why the r=0 and r=1 circles get displaced!
Any comments?
Ted.
-------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 05-Jul-2012 Time: 21:33:27
This message was sent by XFMail
-------------------------------------------------
- [Groff] Placement problem with coloured circles in pic,
Ted Harding <=