Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

291
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

0

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

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda