# [SciPy-User] Arc length of parametric spline

2 messages
Open this post in threaded view
|
Report Content as Inappropriate

## [SciPy-User] Arc length of parametric spline

 Hi,I have a curve given by x,y points and interpolated it using splines with parameter t. t is in [0-1] by default but I would like to remap this to [0-arclength]. My plan was to calculate the arc length analytically or numerically using the light blue highlighted formula in http://tutorial.math.lamar.edu/Classes/CalcII/ParaArcLength.aspx i.e. int_0to1(sqrt((dx/dt)^2 + (dy/dt)^2))dtIn order to do this I need the splines dx/dt and dy/dt,. I was going to do this as followstck, u = interpolate.splprep([x, y])dspl = interpolate.splder(tck)hoping to get dx/dt and dy/dt and then solving the integral. Unfortunately that doesn't work since splder doesn't seem to accept parametric splines. Do you have any suggestions on how to get the spline parameter from 0 to arclen?Thanks!Kenny _______________________________________________ SciPy-User mailing list [hidden email] https://mail.python.org/mailman/listinfo/scipy-user