added code to visualize the control points