I am trying to approximate a surface from a set of given points in 3D space in sets like [[X1,Y1,Z1],[X2,Y2,Z2],.....] and I found this very nice library called geomdl this approximates the surface quite well. but I am not able to understand its input variables. I tried a random set of parameters size_u,size_v,degree_u,degree_v and they worked well while another random set of parameters didn't can someone please explain what are these u,v,size_u,size_v,degree_u,degree_v and how to select these? here is code I am using:-
from geomdl import fitting
import numpy as np
control_points = [[1,60,40],[1,40,35],[1,20,30],[1,10,20],[1,0,10],
[5,60,40],[5,40,35],[5,20,30],[5,10,20],[5,0,10],
[10,60,40],[10,40,35],[10,20,30],[10,10,20],[10,0,10],
[15,60,40],[15,40,35],[15,20,30],[15,10,20],[15,0,10],
[20,60,40],[20,40,35],[20,20,30],[20,10,20],[20,0,10]]
size_u=5
size_v=5
degree_u=3
degree_v=2
pts=np.array(geomdl.fitting.approximate_surface(control_points, size_u, size_v, degree_u, degree_v).evalpts)
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")
ax.plot(pts.T[0], pts.T[1], pts.T[2],"ko")
for i in ["x", "y", "z"]:
eval("ax.set_{:s}label('{:s}')".format(i, i))
plt.show()