PiDraw API
    Preparing search index...

    Interface LineConstraints

    How a line finds its place: each key is a constraint, and a line has exactly one. The XY are positions in pixels (a Point fits); a slope and an equation are in units of the coordinate system.

    interface LineConstraints {
        bisector:
            | { alternative?: boolean; d1: Line; d2: Line }
            | { A: XY; B: XY; C: XY };
        director: { A: XY; d: XY };
        equation: string;
        mediator: { A: XY; B: XY };
        parallel: { through: XY; to: Line };
        perpendicular: { through: XY; to: Line };
        slope: { A: XY; slope: number };
        tangent: { A: XY; f: Plot };
        through: { A: XY; B: XY };
    }
    Index
    bisector:
        | { alternative?: boolean; d1: Line; d2: Line }
        | { A: XY; B: XY; C: XY }

    The bisector of an angle (A is the vertex), or of two lines or axes: by default the one of the sum of their directions, the other one with alternative.

    director: { A: XY; d: XY }

    Through A, with the vector d in pixels.

    equation: string

    An equation in x and y: y=2x+1, 3x=6, 2x-3y+6=0.

    mediator: { A: XY; B: XY }

    The mediator of the segment AB.

    parallel: { through: XY; to: Line }

    Parallel to a line or an axis, through a point.

    perpendicular: { through: XY; to: Line }

    Perpendicular to a line or an axis, through a point.

    slope: { A: XY; slope: number }

    Through A, with a slope in units of the coordinate system.

    tangent: { A: XY; f: Plot }

    The tangent to the curve f at the abscissa of A, through A.

    through: { A: XY; B: XY }

    Through two points. The only constraint, with director, of a segment and a vector.