p=0.7*R;q=0.3*R
A=p+1i*q ; pt(A,'A(p,q)')
seg(A,0,col=8)
OA=abs(A-0)
(θ=atan(q/p)) ; Arg(A)
pt(0.1*OA*cos(θ/2)+1i*0.1*OA*sin(θ/2),'θ')
th=seq(0,θ,0.01)
lines(0.2*OA*cos(th),0.2*OA*sin(th),col=8)
th=seq(pi/2-β,pi/2+β,0.01)
lines(OA*cos(th),OA*sin(th),col=8)
B=OA*1i ; pt(B,'B',cex=1.2)
C=OA*cos(pi/2-β)+1i*OA*sin(pi/2-β) ; pt(C,'C')
(rdash=OA*β/pi) # ⌒BC=πr' where β = pi*sin(α), then rdash=OA*sin(α)
cir(0,OA+rdash,rdash,col=8)
D=1i*(OA+rdash) ; pt(D,'D')
th=seq(θ,pi/2,0.1)
lines(OA*cos(th),OA*sin(th),col=2,lwd=2)
# arc(BA)=arc(BE) OA*(pi/2-θ)=rdash*δ
δ=OA*(pi/2-θ)/rdash # OA*(pi/2-θ)/OA*sin(α) = (pi/2-θ)/sin(α)
th=seq(-pi/2,-pi/2+δ,0.01)
lines(rdash*cos(th),rdash*sin(th)+(OA+rdash),lwd=2,col=4)
lines(0.2*rdash*cos(th),0.2*rdash*sin(th)+(OA+rdash),col=8)
E=rdash*sin(δ)+1i*(rdash*(1-cos(δ))+OA) ; pt(E,'E')
seg(D,E,col=8)
pt((D+E)/2,'r\'')
pt(0.2*rdash*cos(-pi/2+δ/2)+1i*0.2*rdash*sin(-pi/2+δ/2)+D,'δ')
}
opened(40*pi/180)