Planning camera motion in a 3D environment