Skip to content

Commit db761c1

Browse files
author
Rohit Malhotra
authored
Merge pull request #16 from applemonkey496/patch-1
Add 'np.' to sin, cos, and pi
2 parents a26809e + 5196be2 commit db761c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

code/shapes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ def construct(self):
1414
ring2 = Annulus(inner_radius=0.6, outer_radius=1, color=BLUE)
1515
ring3=Annulus(inner_radius=.2, outer_radius=1, color=BLUE)
1616
ellipse=Ellipse(width=5, height=3, color=DARK_BLUE)
17-
17+
18+
n = np.pi / 4
1819
pointers = []
1920
for i in range(8):
20-
pointers.append(Line(ORIGIN, np.array([cos(pi/180*360/8*i),sin(pi/180*360/8*i), 0]),color=YELLOW))
21+
pointers.append(Line(ORIGIN, np.array([np.cos(n * i), np.sin(n * i), 0]), color=YELLOW))
2122

2223
#Showing animation
2324
self.add(circle)

0 commit comments

Comments
 (0)