Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pac face
- # joe, 12/12/2014
- import appuifw as A
- import graphics
- import math
- def radians(degrees):
- return degrees*math.pi/180.0
- def degrees(radians):
- degrees=180*radians/math.pi
- return degrees
- math.radians=radians
- math.degrees=degrees
- ###########################
- run=1
- def stop():
- global run
- run=0
- A.app.screen='full'
- A.app.body=c=A.Canvas()
- A.app.exit_key_handler=stop
- w,h=c.size
- img=graphics.Image.new((w,h))
- x,y=w/2,h/2
- R=min(x,y)*.80
- while run:
- for deg in range(30):
- img.clear(0)
- img.pieslice((x-R,y-R,x+R,y+R),math.radians(deg),math.radians(360-(deg*2)),fill=0xffff00)
- px=x+(R*.65)* math.cos(math.radians(60))
- py=y+(R*.65)* -math.sin(math.radians(60))
- img.point((px,py),0,width=20)
- c.blit(img)
- A.e32.ao_sleep(1e-02)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement