You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm curious what's the best way to find the closest point on a bezier segment given a point. It seems there is no utility function for this currently.
Eg. bezier.js has a method project which does this.
The text was updated successfully, but these errors were encountered:
Sounds like a useful addition to lyon_geom. I haven't looked into it yet so I don't have an answer to the question of the best way to do this, but bezier.js appears to do a rather simpler search through the t parameter of the curve.
It's actually an analytical solution. Certainly more difficult to solve for a higher degree but it might still be possible to use a similar approach. The insight is that the tangent at the closest point on the curve is necessarily perpendicular to the line going from the reference point to the closest point.
It's actually an analytical solution. Certainly more difficult to solve for a higher degree but it might still be possible to use a similar approach. The insight is that the tangent at the closest point on the curve is necessarily perpendicular to the line going from the reference point to the closest point.
Thank you, that sounds useful. So maybe I can estimate my cubic with a quadratic and use that, or implement something similar for cubic. At first look just searching through t doesn't seem too bad either, but this is certainly more elegant.
I'm curious what's the best way to find the closest point on a bezier segment given a point. It seems there is no utility function for this currently.
Eg. bezier.js has a method project which does this.
The text was updated successfully, but these errors were encountered: