In [72]:
import matplotlib.pyplot as plt
from numpy import pi , sin , cos, linspace
In [9]:
plt.plot(0, 0)
Out[9]:
In [10]:
plt.plot(0, 0, marker = 'o')
Out[10]:
In [11]:
plt.plot(0, 0, marker = '*')
Out[11]:
In [12]:
plt.plot(0, 0, marker = 'o', color = 'red')
Out[12]:
In [13]:
plt.plot(0, 0, marker = 'o', color = 'green')
Out[13]:
In [14]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
Out[14]:
In [15]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 70)
Out[15]:
In [18]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('Nutan',
xy = (0, 0)
)
Out[18]:
In [22]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('Nutan',
xy = (0 + 1, 0)
)
Out[22]:
In [23]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('Nutan',
xy = (0 + 1, 0)
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
Out[23]:
In [25]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('Nutan',
xy = (0 + .1, 0 + .1)
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
Out[25]:
In [26]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('Nutan',
xy = (0 + .1, 0 + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
Out[26]:
In [27]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('A(0, 0)',
xy = (0 + .1, 0 + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
Out[27]:
In [28]:
plt.plot(0, 0, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('A(0, 0)',
xy = (0 + .1, 0 + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [ ]:
In [ ]:
In [29]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('A(0, 0)',
xy = (0 + .1, 0 + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [30]:
x = 1
y = 1.5
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('A(0, 0)',
xy = (0 + .1, 0 + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [31]:
x = 1
y = 1.5
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate('A(0, 0)',
xy = (x + .1, y + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [32]:
x = 1
y = 1.5
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'A({x}, {y})',
xy = (x + .1, y + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [33]:
x = -1
y = 1
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'A({x}, {y})',
xy = (x + .1, y + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [34]:
x = 3
y = 4
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'A({x}, {y})',
xy = (x + .1, y + .1),
fontsize = 20
)
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [36]:
x = 3
y = 4
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'A({x}, {y})',
xy = (x + .1, y + .1),
fontsize = 20
)
plt.xlim(-2, 4)
plt.ylim(-2, 5)
plt.show()
In [40]:
x = -2
y = -3
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'A({x}, {y})',
xy = (x + .1, y + .1),
fontsize = 20
)
plt.xlim(-2, 4)
plt.ylim(-2, 5)
plt.show()
In [41]:
x = -2
y = -3
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'A({x}, {y})',
xy = (x + .1, y + .1),
fontsize = 20
)
plt.xlim(-3, 4)
plt.ylim(-4, 5)
plt.show()
In [43]:
x = -2
y = -3
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'A({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
plt.xlim(-3, 4)
plt.ylim(-4, 5)
plt.show()
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [45]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
plt.gca().annotate(f'O({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
x = 1
y = 0
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'R({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
x = 0
y = 1
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
plt.gca().annotate(f'T({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
x = 0
y = -1
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
plt.gca().annotate(f'L({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
x = -1
y = 0
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [46]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
plt.gca().annotate(f'O({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 0/4 * 2 * pi
x = 1
y = 0
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'R({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 1/4 * 2 * pi
x = 0
y = 1
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
plt.gca().annotate(f'T({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 2/4 * 2 * pi
x = 0
y = -1
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
plt.gca().annotate(f'L({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 3/4 * 2 * pi
x = -1
y = 0
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [47]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
plt.gca().annotate(f'O({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 0/4 * 2 * pi
x = cos(theta)
y = sin(theta)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'R({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 1/4 * 2 * pi
x = cos(theta)
y = sin(theta)
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
plt.gca().annotate(f'T({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 2/4 * 2 * pi
x = cos(theta)
y = sin(theta)
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
plt.gca().annotate(f'L({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 3/4 * 2 * pi
x = cos(theta)
y = sin(theta)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [48]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
plt.gca().annotate(f'O({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 0/4 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'R({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 1/4 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
plt.gca().annotate(f'T({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 2/4 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
plt.gca().annotate(f'L({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 3/4 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [49]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
plt.gca().annotate(f'O({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 0/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'R({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 1/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
plt.gca().annotate(f'T({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 2/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
plt.gca().annotate(f'L({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 3/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 4/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 5/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 6/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 7/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [50]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
plt.gca().annotate(f'O({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 0/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'R({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 1/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
plt.gca().annotate(f'RT({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 2/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
plt.gca().annotate(f'T({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 3/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'LT({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 4/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'L({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 5/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'LB({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 6/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 7/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'RB({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.show()
In [51]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
plt.gca().annotate(f'O({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 0/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
plt.gca().annotate(f'R({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 1/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
plt.gca().annotate(f'RT({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 2/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
plt.gca().annotate(f'T({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 3/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'LT({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 4/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'L({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 5/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'LB({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 6/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'B({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
theta = 7/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
plt.gca().annotate(f'RB({x}, {y})', xy = (x + .1, y + .1), fontsize = 10)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [53]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
theta = 0/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
theta = 1/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
theta = 2/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
theta = 3/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 4/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 5/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 6/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 7/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [ ]:
x = 0
y = 0
plt.plot(x, y, marker = 'o', color = 'indigo', markersize = 7)
theta = 0/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
theta = 1/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'pink', markersize = 7)
theta = 2/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'black', markersize = 7)
theta = 3/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 4/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 5/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 6/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
theta = 7/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'green', markersize = 7)
#optional code
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [54]:
for i in range(16):
print(i)
pass
In [56]:
for i in range(16):
print(i)
theta = 0/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
In [57]:
for i in range(16):
print(i)
theta = i/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
In [58]:
for i in range(16):
print(i)
theta = i/8 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [59]:
for i in range(16):
print(i)
theta = i/16 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [60]:
for i in range(16):
theta = i/16 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [61]:
for i in range(4):
theta = i/16 * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [62]:
parts = 4
for i in range(parts):
theta = i/parts * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [63]:
parts = 10
for i in range(parts):
theta = i/parts * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [64]:
parts = 100
for i in range(parts):
theta = i/parts * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [65]:
parts = 500
for i in range(parts):
theta = i/parts * 2 * pi
x = round(cos(theta), 1)
y = round(sin(theta), 1)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 7)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [70]:
parts = 1000
for i in range(parts):
theta = i/parts * 2 * pi
x = cos(theta)
y = sin(theta)
plt.plot(x, y, marker = 'o', color = 'red', markersize = 1)
pass
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [78]:
linspace(0, 9, 10)
Out[78]:
In [79]:
linspace(0, 2, 3)
Out[79]:
In [80]:
linspace(0, 2, 2)
Out[80]:
In [75]:
parts = 1000
theta = linspace(0, 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [76]:
parts = 4
theta = linspace(0, 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [77]:
parts = 5
theta = linspace(0, 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [ ]:
In [ ]:
In [84]:
parts = 1000
theta = linspace(0/4 * 2 * pi, 2/4 * 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [85]:
parts = 1000
theta = linspace(2/4 * 2 * pi, 4/4 * 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [87]:
parts = 1000
theta = linspace(1/8 * 2 * pi, 5/8 * 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [88]:
parts = 1000
theta = linspace(1/4 * 2 * pi, 4/4 * 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [89]:
parts = 1000
theta = linspace(2/8 * 2 * pi, 8/8 * 2 * pi, parts)
x = cos(theta)
y = sin(theta)
plt.plot(x, y, color = 'red')
plt.xlim(-2, 2)
plt.ylim(-2, 2)
plt.gca().set_aspect('equal')
plt.show()
In [ ]: