Chaos game: Difference between revisions
Content added Content deleted
(→{{header|Using SDL}}: move render.present into loop) |
(→{{header|BASIC256}}: add Locomotive Basic version) |
||
Line 215: | Line 215: | ||
End |
End |
||
</lang> |
</lang> |
||
==={{header|Locomotive Basic}}=== |
|||
Adapted from the generic BASIC version. |
|||
<lang locobasic>10 mode 1:randomize time:defint a-z |
|||
20 x = 640 * rnd |
|||
30 y = 400 * rnd |
|||
40 for i=1 to 20000 |
|||
50 v = rnd * 2 + 1 |
|||
60 on v goto 70,100,130 |
|||
70 x = x/2 |
|||
80 y = y/2 |
|||
90 goto 150 |
|||
100 x = 320 + (320-x)/2 |
|||
110 y = 400 - (400-y)/2 |
|||
120 goto 150 |
|||
130 x = 640 - (640-x)/2 |
|||
140 y = y/2 |
|||
150 plot x,y,v |
|||
160 next i</lang> |
|||
==={{header|Sinclair ZX81 BASIC}}=== |
==={{header|Sinclair ZX81 BASIC}}=== |