Created
March 25, 2014 14:22
-
-
Save rhettallain/9762855 to your computer and use it in GitHub Desktop.
rotating stick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from visual import * | |
stick=box(pos=(0,0,0), length=1, width=.2, height=.2, color=color.cyan) | |
w=.5 | |
t=0 | |
dt=0.01 | |
while True: | |
rate(100) | |
stick.rotate(angle=w*dt, axis=(0,0,1), origin=stick.pos) | |
t=t+dt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment