SHARE
TWEET

CSH2012 FINAL sphere.py

calcpage Jun 6th, 2013 177 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2. #sphere.py    MrG     2013.0531
  3. #inspired by Kirby Urner
  4. # http://www.youtube.com/user/kirbyurner
  5. # http://www.4dsolutions.net/ocn/index.html
  6. from visual import *
  7. from random import randint
  8.  
  9. scene.width=1100
  10. scene.height=1100
  11. scene.range=(100,100,100)
  12. thecolors=[color.green,color.red,color.orange,color.cyan,color.magenta,color.yellow]
  13.  
  14. for i in range(1000):
  15.     place=(randint(-1000,1000),randint(-100,100),randint(-10,10))
  16.     rsize=randint(0,10)
  17.     rcolor=randint(0,5)
  18.     ball=sphere(pos=place,radius=rsize,color=thecolors[rcolor])
RAW Paste Data
Top