[metapost] Problem with quartercircle
Pétiard François
petiard.francois at free.fr
Thu Feb 16 00:07:45 CET 2006
Taco Hoekwater a écrit le 15/02/2006 19:39 :
> Pétiard François wrote:
>
>> Why the second quartercircle isn't cut after z1 ?
>
>
> The point z1 is not *on* the path qd, but only coincident with it.
>
> Do it like this:
>
> z1=point(xpart (qd intersectiontimes((0,0)--(4cm,4cm)))) of qd;
>
> Cheers, Taco
>
Sorry, but I don't understand ; consider the following file :
prologues:=1;
beginfig(1);
path qc,qd,qe,qf;
qc:=quartercircle scaled(3.05cm);
z0=qc intersectionpoint((0,0)--(3cm,3cm));
labels(0);
draw qc cutafter(z0) withcolor blue; %OK
qd:=quartercircle scaled(3cm);
z1=qd intersectionpoint((0,0)--(3cm,3cm));
labels(1);
draw qd cutafter(z1); %Not correct
qe:=quartercircle scaled(5.11cm);
z2=qe intersectionpoint((0,0)--(3.00009cm,3.0001cm));
labels(2);
draw qe cutafter(z2) withcolor red; %OK
qf:=quartercircle scaled(5cm);
z3=qf intersectionpoint((0,0)--(3.00009cm,3.0001cm));
labels(3);
draw qf cutafter(z3); %Not correct
endfig;
end;
Why qc and qe are cut, and not qd and qf ?
F. Pétiard
--
petiard.francois at free.fr
More information about the metapost
mailing list