Skip to content

Commit dc08092

Browse files
committed
start and stop rotating
1 parent b7bb0ac commit dc08092

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

animation/test4.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,17 @@ def __init__(self, drawobj, my_wrdobj):
203203

204204
# ---------------------------------
205205
def on_timer(self, event):
206+
self.time_count +=1
207+
206208
self.theta += .0
207-
self.phi += 1
209+
210+
if self.time_count < 360 or self.time_count>720:
211+
self.phi = 45
212+
else:
213+
self.phi += 1
214+
215+
216+
208217
self.model = np.dot(rotate(self.theta, (1, 0, 0)),
209218
rotate(self.phi, (0, 1, 0)))
210219
self.program['u_model'] = self.model

0 commit comments

Comments
 (0)