USER FORUM

(you are viewing a thread; or go back to list of threads)

Tangent/perpendicular to bezier? (by whitequark)
Being able to constrain lines to be tangential or perpendicular to beziers would simplify some of my sketches quite a bit, and for some it's the only way I see to get a 0DOF solution. Are there fundamental reasons that's not possible?
Sun Jul 5 2015, 17:17:57
(no subject) (by Jonathan Westhues)
That's easy at the endpoints; it's just tangent or perpendicular to the line from the endpoint to the control point. Tangent is already handled nicely. Perpendicular is easy with a construction line, and could be special-cased like tangent if desired.

In the middle of the curve, that's harder for the same reason point-on-Bezier-curve is harder, basically because there's no easy way to go from the solver's representation of the curve (by its control points) to an implicit form. There's some discussion at:

Approaches mentioned there include (a) closed-form implicitization, like by Groebner bases or something; (b) numerical methods within the greater Newton solver; and (c) representation of the point by its parameter along the curve instead of (u, v) in the plane.

Those seem like (a) an academic science project, (b) the quickest way to get something working, but possibly slow and unstable, and (c) the most elegant solution, and one that makes good use of the symbolic algebra system underlying SolveSpace's constraint solver, but more work.