Advertisement
kator

Untitled

May 8th, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. open Graphics;;
  2. open Printf;;
  3. open Unix;;
  4.  
  5. open_graph " 640x480";;
  6.  
  7.  
  8.  
  9. let colorR = function
  10. 0 -> yellow
  11. | 1 -> red
  12. | 2 -> green
  13. | 3 -> blue
  14. | x -> black;;
  15.  
  16. while true do
  17. for j = 255 downto 1 do
  18. for i = 12 downto 1 do
  19.  
  20. let radius = i * 20 in
  21. eprintf "radius is %d\n" radius;
  22.  
  23. (* set_color (rgb j (((j + 255/3) mod 255)) (((j + 255*2/3) mod 255)) ); *)
  24. set_color (rgb ( j/i mod 255) (255 mod j/i) (j/i));
  25. fill_circle 320 240 radius
  26.  
  27. done;
  28. Unix.sleepf 0.4
  29. done
  30.  
  31. done;
  32.  
  33. read_line ();;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement