Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- View.Set ('graphics:752;752,offscreenonly')
- const midx := maxx div 2
- const midy := maxy div 2
- type cart :
- record
- m : array 0 .. 752, 0 .. 752 of boolean
- x : array 0 .. 752 of int
- y : array 0 .. 752 of int
- z : array 0 .. 752 of int
- end record
- var x, y, z : int
- var map : array 0 .. 360 of cart
- for q : 0 .. 360 by 2
- cls
- for s : 0 .. midx
- for t : 1 .. midy
- map (q).x (s) := round (cosd (t) * s) + midx
- map (q).y (t) := round (sind (s) * t) + midy
- map (q).z (s) := t
- x := map (q).x (s) - midx
- z := map (q).z (s)
- x := round (cosd (q/2) * x - sind (q/2) * z)
- map (q).x (s) := x + midx
- Draw.Dot(map(q).x(s), map(q).y(t), black)
- end for
- end for
- for i : 0 .. maxx
- for o : 0 .. maxy
- if whatdotcolour(i,o) = 7 then
- map(q).m(i,o) := true
- else
- map(q).m(i,o) := false
- end if
- end for
- end for
- Draw.FillArc (midx, midy, 100, 100, 90, round(q/2) + 90, red)
- locate (1, 1)
- put round ((q / 720) * 1000) / 10, '%'
- View.Set ('title:Rendering: ' + realstr (round ((q / 720) * 1000) / 10, 3) + '% complete')
- View.Update
- end for
- cls
- View.Update
- Input.Pause
- loop
- for q : 0 .. 360 by 2
- cls
- for s : 0 .. maxx
- for t : 0 .. maxy
- if map(q).m(s,t) then
- Draw.Dot (s, t, black)
- end if
- end for
- end for
- View.Update
- end for
- cls
- Input.Pause
- end loop
Advertisement
Add Comment
Please, Sign In to add comment