Advertisement
linesguy

simple asteroid generator

Aug 30th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. 0 rem todo: save asteroids to redraw each frame, like in the game asteroids
  2.  
  3. 1 si = 30 : bh = 10 : bq = 10 : rem size, bump height, bump quantity
  4.  
  5.  
  6. 100 hgr2 : hcolor = 3
  7. 105 ra = int(rnd(1)*bh)-bh/2 : hplot sin(x)*(si+ra)+140,cos(x)*(si+ra)+96
  8. 110 for x = 0 to 6.282 step 1/bq : ra = int(rnd(1)*bh)-bh/2 : hplot to sin(x)*(si+ra)+140,cos(x)*(si+ra)+96 : next
  9. 120 x = 0 : ra = int(rnd(1)*bh)-bh/2 : hplot to sin(x)*(si+ra)+140,cos(x)*(si+ra)+96
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement