Compassless construction of the tangent to a circle at a given point
(c1) block([equalscale:true,plot_style:White_space2D],demo("c:\\rwg\\climax\\tan.dem"))$
First, we have to tell Macsyma how to intersect two lines, given the coordinates of two points on each:
-*- Mode: Macsyma -*-
(c2)
interseg(x1,y1,x2,y2,x3,y3,x4,y4):=
[ ((x2-x1)*(x3*y4-x4*y3)-(x4-x3)*(x1*y2-x2*y1)),
-((y2-y1)*(y3*x4-y4*x3)-(y4-y3)*(y1*x2-y2*x1))]/((x2-x1)*(y4-y3)-(x4-x3)*(y2-y1))$
(c3) xl:[cos(2*%pi*t),cos(1.)]$
(c4) yl:[sin(2*%pi*t),sin(1.)+t*.05]$
(c5) paramplot(xl,yl,t,0,1)$
This draws our circle, with the target point marked by an up-tick at about 1 o'clock.
Now we begin the construction. Choose at random four more points on the circle, marked by horizontal ticks.
(c6) xl:append(xl,[cos(3.),cos(.5),cos(-.7),cos(-2.)]+.05*t)$
(c7) yl:append(yl,[sin(3.),sin(.5),sin(-.7),sin(-2.)])$
(c8) paramplot(xl,yl,t,0,1)$
(There's a faint yellow one at about 4 o'clock. Click to clarify.)
(c9)
xl:append([cos(1.)*(1-t)+t*cos(-.7),cos(-.7)*(1-t)+t*cos(3.),cos(3.)*(1-1.5*t)+1.5*t*cos(.5),
cos(.5)*(1-t)+t*cos(-2.),cos(-2.)*(1-t)+t*cos(1.)],
xl)$
(c10)
yl:append([sin(1.)*(1-t)+t*sin(-.7),sin(-.7)*(1-t)+t*sin(3.),sin(3.)*(1-1.5*t)+1.5*t*sin(.5),
sin(.5)*(1-t)+t*sin(-2.),sin(-2.)*(1-t)+t*sin(1.)],
yl)$
(c11) paramplot(xl,yl,t,0,1)$
Connect the five points in a pentagram, extending the side shown.
(c12)
block([p1:interseg(cos(1.),sin(1.),cos(-.7),sin(-.7),cos(.5),sin(.5),cos(-2.),sin(-2.)),
p2:interseg(cos(-.7),sin(-.7),cos(3.),sin(3.),cos(-2.),sin(-2.),cos(1.),sin(1.)),
p3],
push(p2[1]*(1-2*t)+2*t*p1[1],xl),
push(p2[2]*(1-2*t)+2*t*p1[2],yl),
paramplot(xl,yl,t,0,1),
p3:interseg(p1[1],p1[2],p2[1],p2[2],cos(3.),sin(3.),cos(.5),sin(.5)),
push(p3[1]*(1-2*t)+2*t*cos(1.),xl),
push(p3[2]*(1-2*t)+2*t*sin(1.),yl))$
Join the two intersections as shown, and extend to the extended side:
(c13) paramplot(xl,yl,t,0,1)$
The line through the intersection of the extensions and the original point is the desired tangent!