added code to visualize the bbox of the curve