yazdmich

Untitled

May 31st, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. View.Set ('graphics:max;max,offscreenonly')
  2.  
  3. const midx := maxx div 2
  4. const midy := maxy div 2
  5.  
  6. type cart :
  7. record
  8. x : array 0 .. 1472 of int
  9. y : array 0 .. 792 of int
  10. z : array 0 .. 792 of int
  11. end record
  12.  
  13. var x, y, z : int
  14. var map : array 0 .. 360 of cart
  15.  
  16. for q : 0 .. 360
  17. for s : 0 .. midx
  18. for t : 0 .. midy
  19. map (q).x (s) := round (cosd (t) * s) + midx
  20. map (q).y (t) := round (sind (s) * t) + midy
  21. map (q).z (s) := t
  22. x := map (q).x (s) - midx
  23. z := map (q).z (s)
  24. x := round (cosd (q) * x - sind (q) * z)
  25. map (q).x (s) := x + midx
  26. end for
  27. end for
  28. Draw.FillArc (midx, midy, 100, 100, 90, q + 90, black)
  29. locate (1, 1)
  30. put round ((q / 360) * 1000) / 10, '%'
  31. View.Set ('title:Rendering: ' + realstr (round ((q / 360) * 1000) / 10, 3) + '% complete')
  32. View.Update
  33. end for
  34.  
  35. cls
  36. Input.Pause
  37.  
  38. for q : 0 .. 360
  39. cls
  40. for s : 0 .. midx
  41. for t : 0 .. midy
  42. Draw.Dot (map (q).x (s), map (q).y (t), black)
  43. end for
  44. end for
  45. View.Update
  46. delay (2)
  47. end for
Advertisement
Add Comment
Please, Sign In to add comment