the function is generating duplicate data even if when it shouldn\'t be my 2d version of the function works just fine but the 3d curve version just isnt working and im not s