yazdmich

Untitled

Oct 21st, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. var x1, y1, x2, y2, checkx, checky : int
  2. loop
  3. checky := Rand.Int (0, maxy)
  4. checkx := Rand.Int (0, maxx)
  5. x1 := Rand.Int (checkx, maxx)
  6. y1 := Rand.Int (checky, maxy)
  7. x2 := Rand.Int (checkx, maxx)
  8. y2 := Rand.Int (checky, maxy)
  9. Draw.Dot (x1, y1, black)
  10. Draw.Dot (x2, y2, black)
  11. Draw.Dot (x1, y2, black)
  12. Draw.Dot (x2, y1, black)
  13. exit when hasch
  14. end loop
  15. for x : 1 .. maxx
  16. drawdot(x, (round(1/(x/10000))), green)
  17. drawline(x, (round(1/(x/10000))), x+1, (round(1/((x+1)/10000))), brightred)
  18. end for
  19.  
  20. % output at http://i.imgur.com/9eDIcsb.png
Advertisement
Add Comment
Please, Sign In to add comment