[SciPy-User] Arc length of parametric spline

Kenny Vermeers kenny.vermeers at gmail.com
Thu May 11 06:12:05 EDT 2017


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))dt

In order to do this I need the splines dx/dt and dy/dt,. I was going to do
this as follows
tck, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20170511/6a79321b/attachment.html>


More information about the SciPy-User mailing list