[metapost] Cannot fill sector
Yasir Malik
ymalik at stevens.edu
Sun Nov 14 06:00:02 CET 2010
Hi,
I'm having trouble filling a sector. Metapost does not return an error,
but the "area" path is not filled. Here's my code:
beginfig(1);
u = 1cm;
pair o, p[];
path halfcirc, area, triangle;
numeric diam;
diam = 10u;
o := (0, 0);
p0 := (diam/2, 0);
p0 := p0 rotated 72; % a cycle cannot be formed with 10 degrees
p1 := p0 rotated 72;
triangle = p0--o--p1;
halfcirc = halfcircle scaled diam;
draw halfcirc;
draw triangle;
area = buildcycle(triangle, halfcirc);
fill area withgreyscale .7;
endfig;
Also, as I note in the comment, if I rotate p0 by 10 degrees, Metapost
says the two paths do not intersect.
I appreciate your help.
Thanks,
Yasir
More information about the metapost
mailing list