let circ ~x ~y ~radius ?(r=0) ?(g=0) ?(b=0) screen = let t1 = ref (radius / 16) in let t2 = ref !t1 in let cx, cy = ref radius, ref 0 in while !cx >= !cy do set_pixel screen ( !cx + x) ( !cy + y) ~r ~g ~b ; set_pixel screen ( !cx + x) (-1 * !cy + y) ~r ~g ~b ; set_pixel screen (-1 * !cx + x) ( !cy + y) ~r ~g ~b ; set_pixel screen (-1 * !cx + x) (-1 * !cy + y) ~r ~g ~b ; set_pixel screen ( !cy + x) ( !cx + y) ~r ~g ~b ; set_pixel screen ( !cy + x) (-1 * !cx + y) ~r ~g ~b ; set_pixel screen (-1 * !cy + x) ( !cx + y) ~r ~g ~b ; set_pixel screen (-1 * !cy + x) (-1 * !cx + y) ~r ~g ~b ; cy := !cy + 1 ; t1 := !t1 + !cy ; t2 := !t1 - !cx ; if !t2 >= 0 then begin t1 := !t2 ; cx := !cx - 1 ; end done