1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
|
############################################################
# Making a Circle
par(mfrow = c(1, 2))
x=-100:100
y=sqrt(100**2 - x**2)
x=c(x, x)
y=c(y, -y)
plot(x, y, cex=0.5)
lines(x, y, col="red", lty=21)
abline(h=0, lty=21, col="blue")
abline(v=0, lty=21, col="blue")
text(0, 10, "x^2 + y^2 = r^2", pos=4)
############################################################
x=0:200
y=sqrt(100**2 - (x-100)**2)
x=c(x, x)
y=c(y, -y)
plot(x, y, cex=0.5)
lines(x, y, col="red", lty=21)
abline(h=0, lty=21, col="blue")
abline(v=100, lty=21, col="blue")
text(100, 10, "(x-100)^2 + y^2 = r^2", pos=4)
|