yazdmich

Untitled

Jun 3rd, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. View.Set ('graphics:752;752,offscreenonly')
  2.  
  3. const midx := maxx div 2
  4. const midy := maxy div 2
  5.  
  6. type cart :
  7. record
  8. m : array 0 .. 752, 0 .. 752 of boolean
  9. x : array 0 .. 752 of int
  10. y : array 0 .. 752 of int
  11. z : array 0 .. 752 of int
  12. end record
  13.  
  14. var x, y, z : int
  15. var map : array 0 .. 360 of cart
  16. for q : 0 .. 360 by 2
  17. cls
  18. for s : 0 .. midx
  19. for t : 1 .. midy
  20. map (q).x (s) := round (cosd (t) * s) + midx
  21. map (q).y (t) := round (sind (s) * t) + midy
  22. map (q).z (s) := t
  23. x := map (q).x (s) - midx
  24. z := map (q).z (s)
  25. x := round (cosd (q/2) * x - sind (q/2) * z)
  26. map (q).x (s) := x + midx
  27. Draw.Dot(map(q).x(s), map(q).y(t), black)
  28. end for
  29. end for
  30.  
  31. for i : 0 .. maxx
  32. for o : 0 .. maxy
  33. if whatdotcolour(i,o) = 7 then
  34. map(q).m(i,o) := true
  35. else
  36. map(q).m(i,o) := false
  37.  
  38. end if
  39. end for
  40. end for
  41.  
  42. Draw.FillArc (midx, midy, 100, 100, 90, round(q/2) + 90, red)
  43. locate (1, 1)
  44. put round ((q / 720) * 1000) / 10, '%'
  45. View.Set ('title:Rendering: ' + realstr (round ((q / 720) * 1000) / 10, 3) + '% complete')
  46. View.Update
  47. end for
  48.  
  49. cls
  50. View.Update
  51. Input.Pause
  52.  
  53. loop
  54. for q : 0 .. 360 by 2
  55. cls
  56. for s : 0 .. maxx
  57. for t : 0 .. maxy
  58. if map(q).m(s,t) then
  59. Draw.Dot (s, t, black)
  60.  
  61. end if
  62. end for
  63. end for
  64. View.Update
  65. end for
  66. cls
  67. Input.Pause
  68. end loop
Advertisement
Add Comment
Please, Sign In to add comment