Skip to content

Instantly share code, notes, and snippets.

@rhettallain
Created March 25, 2014 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhettallain/9762855 to your computer and use it in GitHub Desktop.
Save rhettallain/9762855 to your computer and use it in GitHub Desktop.
rotating stick
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