Let us create a ball:

#run (move (new_state ())) ;;

To observe the position of the ball, we program a process which displays the value of the draw signal.

let process window =
  loop
    await draw (all) in
    Graphics.clear_graph();
    List.iter
      (fun state ->
        let x, y = last ?state.pos in
        Graphics.set_color state.color;
        Graphics.fill_circle
          (int_of_float x) (int_of_float y)
          (int_of_float state.radius))
      all
  end

#run window ;;