Skip to content

Vector Constraints with Shared Vertices #28

@nickmccleery

Description

@nickmccleery

Hey @adamchalmers, dumping content here for discussion as I think this is quite insightful.

I think your formula for the derivative of the perpendicular constraint (see here)) only works if the two lines are between 4 separate points, and doesn't work if two of the lines share a common point.

Residual: R = (x1-x0)*(x3-x2) + (y1-y0)*(y3-y2)

If you have this situation where the lines L0 = (p0, p1) and L2 = (p0, p2) then the partial derivatives don't quite work out anymore, e.g. partial derivative of x0 is -x1-x3+2 or something.

Image Here's the general residual R of the perpendicular constraint: Image Then if we assume the two lines share a common point such that instead of p0, p1, p2 and p3 we have p0, p1 and p2, we get Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions