let gray intensity =
assert (if 0. <= intensity && intensity <= 1. then true
else (Printf.printf "intensity received: %f\n%!" intensity; false));
let intensity = int_of_float (intensity *. 255.) in
Graphics.rgb intensity intensity intensity