// first set of points
// THIS WORKS
// intersection at y = 0
A = [12,8];
B = [21,-4];
C = [11,-3];
D = [25,3];
// second set of points
// THIS DON'T WORKS
// intersection at y 0
// the circle is draw reflected on X axes
//A = [3,4];
//B = [10,12];
//C = [10,2];
//D = [1,8];
// circle radius
radius = 2;
// segments
m = join(A,B);
n = join(D,C);
// lines
a = parallel(A,m);
b = parallel(C,n);
// intersection point
inter = meet(a,b);
// circle
k = circle(inter,radius);
// draw(A,B);
// draw(C,D);
// drawcircle(I,8);
// draw points, lines, circles and intersection point
drawall([A,B,C,D,a,b,k,inter]);