def update(shapeModeler, val):
    global sliders , mainPlot, fig, pca_params
    pca_params = np.zeros((num_params, 1))

    for i in range(num_params):
        pca_params[i] = sliders[i].val
    
    shape = shapeModeler.makeShape(pca_params)
    shape = ShapeModeler.normaliseShape(shape)
    numPointsInShape = len(shape)/2
    x_shape = shape[0:numPointsInShape]
    y_shape = shape[numPointsInShape:]
    mainPlot.set_data(x_shape, -y_shape)
    fig.canvas.draw_idle()
dataset/ETHPy150Open chili-epfl/shape_learning/scripts/generate_custom_parametrization.py/update/original