def append_cv(self, x, y):
        """ Appends a new cv and returns the index of the attached cv """
        self._cv_points.append([x, y])
        self.build_curve()
        self._modified = True
        return len(self._cv_points) - 1
 Appends a new cv and returns the index of the attached cv 
metadrive/render_pipeline/rpcore/util/smooth_connected_curve.py