Skip to content

Smooth arclength interpolation #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

SouthEndMusic
Copy link
Member

Over the past few weeks, in my hobby math and coding time I have been fixated on a question that arose here, namely: What is a good way to interpolate through a set of points in $\mathbb{R}^n, n \ge 2$ , which is $C^1$ smooth and parameterized by arc length?

I understood that a common approach here is to make an interpolation that is not by arc-length and then approximate the arc-length parameterization using numerical methods. I however figured there should be a way to do this without such heavy lifting. I tried several algebraic approaches which didn't really get me anywhere, so then I started looking for a more geometrically informed approach.

A quick Google search reveals this pathological method, which suffers from not being at all flexible, the effect of points being non-local, and having arbitrarily large detours if the points are distributed in an unfortunate way.

The core idea I had is to again start with a non arc-length parameterized curve, but then to approximate it with segments that are trivially parameterizable by arc-length, namely line- and circle-segments. I explain the full construction of the method in a notebook that I checked into this branch.

I am not sure this method is suitable for DataInterpolations.jl, but it can make good use of the internals, so maybe it should be a separate package depending on DataInterpolations.jl.

I now use QuadraticSpline as the default 'shape-defining' curve, because it is a method that is $C^1$ smooth and supports vector valued interpolation. However, for this method also the effect of data points is non-local, which was my motivation for opening #401.

I am btw not completely sure what to put in the docstring of struct SmoothArcLengthInterpolation, because there are several different methods which are different entrypoints in the construction of the interpolation.

image

@yolhan83
Copy link

Wow, you really went through that 👍 for usefulness, for now I only really got the case of advection simulation on the curve where you really need that, I don't know if there are others.

@ChrisRackauckas
Copy link
Member

Looks reasonable to me.

I am btw not completely sure what to put in the docstring of struct SmoothArcLengthInterpolation, because there are several different methods which are different entrypoints in the construction of the interpolation.

🤷 put the notebook up somewhere and cite that.

But the notebook shouldn't be in the history of the package, since that would cause repo bloat.

Copy link
Member

@ChrisRackauckas ChrisRackauckas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires a squash merge to make sure the memory of the notebook isn't in the core repo.

@ChrisRackauckas
Copy link
Member

Just realized, this is missing tests.

@SouthEndMusic
Copy link
Member Author

Yep, I'm on it

@ChrisRackauckas ChrisRackauckas merged commit e2da584 into SciML:master Mar 21, 2025
16 checks passed
sathvikbhagavan pushed a commit to sathvikbhagavan/DataInterpolations.jl that referenced this pull request Mar 22, 2025
…rpolation

Smooth arclength interpolation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants