Title: Hi HN,<p>For a robotics problem I have, I needed to determine the minimum distance between a point and an ellipse.<p>Existing stack overflow answers suggest using root finders to solve a quartic equation or specialised iterative methods that have instabilities.<p>https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;22959698&#x2F;distance-from-given-point-to-given-ellipse<p>One paper suggests using an initial guess on the ellipse as a root of the quartic, using the guess to simplify it to a cubic, and then solving it. The result is a fast converging stable algorithm, but solving the cubic and choosing the correct root is gross.<p>I&#x27;ve come up with a method that relies on maths that most programmers would not be familiar with, but the implementation boils down to 14 lines of python. It converges quickly (3 iterations) and is completely robust (no divergences or divide by zeros).<p>This is the first time I&#x27;ve been sitting on an algo that I genuinely believe to be novel. The robotics is a side project and work doesn&#x27;t lay claim to IP outside of work.<p>I intend to write up a blog post tomorrow, but if you were in my shoes what would you do?<p>Thanks
Upvote: