Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open Graphics;;
- open Printf;;
- open Unix;;
- open_graph " 640x480";;
- let colorR = function
- 0 -> yellow
- | 1 -> red
- | 2 -> green
- | 3 -> blue
- | x -> black;;
- while true do
- for j = 255 downto 1 do
- for i = 12 downto 1 do
- let radius = i * 20 in
- eprintf "radius is %d\n" radius;
- (* set_color (rgb j (((j + 255/3) mod 255)) (((j + 255*2/3) mod 255)) ); *)
- set_color (rgb ( j/i mod 255) (255 mod j/i) (j/i));
- fill_circle 320 240 radius
- done;
- Unix.sleepf 0.4
- done
- done;
- read_line ();;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement