On Mon, 22 Sep 2003 13:37:47 +0200 (MEST)
"Severin Obertuefer" <[EMAIL PROTECTED]> wrote:


> it works, but only with a "normal" circle.
> if the circle is xyscaled the same thing seems to bee much more
> complicate...

additionally, a more general solution:

%%%
\setupoutput[pdftex]
\setupcolors[state=start]

\startMPinclusions
vardef cutbetween (expr p,a,b)=
  if (xpart (p intersectiontimes a))>
     (xpart (p intersectiontimes b)):
    ((p cutbefore b) cutafter a)
  else:
    (p cutbefore b)--(p cutafter a)
  fi
enddef;
\stopMPinclusions

\starttext
\startMPpage
save c, A, B ; path c, A, B;

A := (origin--(3cm,2cm)) ;
B := (origin--(-5cm,1cm)) ;

draw B ; 
draw A ; 
c := fullcircle scaled 2cm xyscaled(1.3,.8) ;
clip currentpicture to c ;


draw c withpen pencircle scaled 1.4pt withcolor .7white ;
drawarrow cutbetween(c,B,A) withcolor .7green ;
drawarrow cutbetween(c,A,B) withcolor green ;

c := reverse c xyscaled (0.3,0.9) ;
draw c withpen pencircle scaled 1.4pt withcolor .7white ;
drawarrow cutbetween(c,B,A) withcolor .7red ;
drawarrow cutbetween(c,A,B) withcolor red ;

\stopMPpage
\stoptext
%%%

Jens
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to