if I want to pass the curve through some specific points, where do I make the changes? I tried to make the changes in the 6,7,8 lines. Code works for 3 points only, if I introduce 4 points , code shows error
in lines 6, 7, and 8 you specify the coordinates of these points, and the number of points have to match with the number you specified in line 3 for the number of control points. If you want 4 control points, change that 3 for a 4.