let draw_configuration () =
let pred_scale = pred scale in
let draw_cell =
if scale <> 1
then fun x y -> fill_rect x (* x is already scaled (1) *) (y*scale) pred_scale pred_scale
else fun x y -> plot x y in
fun color_of_state configuration time ->
let x = ((time*scale) mod (size_x ()*time_stroboscope) /time_stroboscope) in (* (1) x is scaled here *)
let f = (fun i state -> set_color (color_of_state state); draw_cell x i) in
for i = 0 to min (Array.length configuration - 1) (size_y ()) do f i configuration.(i) done