% Witch of Agnesi % Copyright (c) Christian Obrecht 2002 box(-5,-1,5,3) O = point(0,0) J = point(0,1) c = circle(J,1) l = line(point(0,2),0:) trace(t,.1,179.9) { L = line(O,t:) O M intersection(L,c) P = intersection(L,l) point(abscissa(P),ordinate(M)) } draw(O) ; draw(line(O,0:),dotted) t = 50 L = line(O,t:) O M intersection(L,c) P = intersection(L,l) N = point(abscissa(P),ordinate(M)) thickness(.5) ; style(dashed) draw(c) ; draw(l) ; draw(L,dashed,halfline) draw(segment(M,N)) ; draw(segment(P,N))