Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

289
Views
Interpolation with bounded curvature

With the code below, I use scipy.interpolate.splprep routine to interpolate a set of points using B-splines. Evidently, this curve in the figure on the left is quite "sharp" near the 6th point: it's curvature is too large (see right figure).

enter image description here

I want the curvature to be limited to <10. I can improve this by increasing the smoothness factor s, e.g. setting it to s=8 gives:

enter image description here

Which satisfies my curvature bound. However, I currently have to find this smoothness factor s through trial and error (also, higher s does not necessarily imply a lower curvature). Is there anyway I can explicitely bound the curvature? I know it is theoretically possible based on this question.

Code (Python fiddle)

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

This is only a suggestion, but one thing that is possible as an alternative to deliberate smoothing is introduction of additional (fake) data points through which the curve should pass.

The condition to insert such points is to detect if there is a sharp reversal in direction between any two consecutive (real) points. This could be done by comparing the angle between directions of vectors containing any two consecutive nodes and if this angle is lower than certain threshold, the point is considered a 'reversal' point.

Once such reversal points are identified you can introduce P (fake) points, where the integer P depends on how smooth you would like these transitions to be. E.g. if you don't mind a U-shape, then you could introduce just one fake point per each reversal point that is slightly offset in the direction orthogonal to the reversal direction.

over 4 years ago · Santiago Trujillo Report

0

One known method is to interpolate points using Dubins paths. It provides the shortest curve between any two curves, while satisfying a minimum curvature. One implementation is described in this paper, called Markov-Dubins interpolation.

enter image description here

However, I do not recommend this approach because the curves are not smooth (there are discontinuities in the acceleration due to fixed levels of curvature).

over 4 years ago · Santiago Trujillo Report

0

Not at the moment, at least not in scipy. Sadly.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!