1
$\begingroup$

I'm currently trying to use maths in a pathing issue. Let me try to explain it. This is a path that is not smoothed and I would like to smooth it like the dashed line. I've tried a moving average filter, but it's not as good as I would like it to be.

Now someone suggested me using a line segment of constant length to smooth out the path. I've tried to draw it as well as I could. The smoothed path is the red line that forms thanks to the lines connecting

The two orange dots are 200 units apart and the two green dots are also 200 units apart.

I was curious if there is mathematical way to generate the right combined path. And if not, if there is a programming way to generate the red path. Or even another place I could ask for a closer step towards a solution.

Thanks in advance!

$\endgroup$
  • 1
    $\begingroup$ Look up Bezier curves $\endgroup$ – B. Mehta May 25 '18 at 14:11
  • $\begingroup$ If the angle between segments is right, then the curve is an astroid: en.wikipedia.org/wiki/Envelope_(mathematics)#Example_4 $\endgroup$ – Aretino May 25 '18 at 21:55
  • $\begingroup$ Did you try your method when the angle in the path is acute? I think there may be some problem in that case. $\endgroup$ – Aretino May 25 '18 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.