PiMath API
    Preparing search index...

    Class Line3

    A line of space, stored by a point OA and a direction vector d. Built from two points or from a point and a direction vector. The output defaults to the parametric form; asSystem and asCartesian choose another one for the next tex or display only.

    new Line3(new Point(0, 0, 0), new Vector(1, 2, 3)).display // "((x,y,z)) = ((0,0,0)) + k\\cdot ((1,2,3))"
    

    Implements

    Index
    • get asCartesian(): this

      Output option for the next tex or display: the symmetric form (x-a)/p = (y-b)/q = (z-c)/r. Chainable.

      Returns this

    • get asParametric(): this

      Output option for the next tex or display: a point and a direction vector (default). Chainable.

      Returns this

    • get asSystem(): this

      Output option for the next tex or display: the parametric system of x, y and z. Chainable.

      Returns this

    • Full duplicate of this instance, including display state (selected form and options set via as*** / with***). Distinct from copy.

      Returns this

    • Copy the mathematical state of another instance into this (display state is NOT transferred — the receiver keeps its own formatting). Entry point used when constructing/parsing from a same-type input. Distinct from clone. Classes without a real implementation throw NotImplementedError.

      Parameters

      Returns this

    • Computes the relationship between this line and line.

      • isSame: coincident lines (infinitely many common points).
      • isParallel: parallel non-coincident lines.
      • hasIntersection + point: lines meet at exactly one point.
      • all false: skew lines (non-coplanar, no intersection).

      Parameters

      Returns LineIntersection

    • True when both lines are the same line, whatever their reference point and direction vector.

      Parameters

      Returns boolean

    • Returns true when the direction vectors are orthogonal (90°), regardless of whether the lines intersect.

      Parameters

      Returns boolean

    • True when the directions are parallel and the lines are not the same.

      Parameters

      Returns boolean

    • Returns true when the lines are both orthogonal and intersecting (strict perpendicularity).

      Parameters

      Returns boolean

    • A random point of the line: the reference point moved along the direction vector by a non-zero integer between -max and max.

      Parameters

      • max: number = 5

      Returns Point

    • Give the direction vector the smallest integer coordinates, with a positive first coordinate.

      Returns this