#==================== # Figure 9.3.R. # Right triangle inscribed in a circle. #==================== theta=(0:200)*2*pi/200 y=sin(theta) x=cos(theta) par(pin=c(4,4)) plot(x,y,type="l",axes=FALSE,ann=FALSE) abline(h=0) abline(v=0) th=4*pi/18 x0=c(0,cos(th),cos(th)) y0=c(0,sin(th),0) x1=c(cos(th),cos(th),0) y1=c(sin(th),0,0) segments(x0,y0,x1,y1,lwd=2) text(.6*cos(th),-.1,expression(italic(x)),cex=1.5) text(cos(th)+.1,.4*sin(th),expression(italic(y)),cex=1.5) text(cos(th)/2,.4,expression(italic(r)),cex=1.5) text(.3*cos(th),.1,expression(theta),cex=1.5) text(cos(th)+.1,sin(th)+.12,expression((list(italic(x),italic(y)))),cex=1.5) text(-.24*cos(th),-.1,expression((list(0,0))),cex=1.5)