Type Alias CurveSegment

    CurveSegment:
        | { from: V; kind: "line"; to: V }
        | {
            a: number;
            a0: number;
            a1: number;
            b: number;
            center: V;
            kind: "ellipseArc";
            rotation: number;
        }

    One curve piece: an SVG path command plus closed-form sampling by s ∈ [0,1].

    Type Declaration

    • { from: V; kind: "line"; to: V }
    • {
          a: number;
          a0: number;
          a1: number;
          b: number;
          center: V;
          kind: "ellipseArc";
          rotation: number;
      }
      • a: number

        Semi-axes along the rotated frame.

      • a0: number

        Start / end parameter angles in the rotated frame, radians.

      • a1: number
      • b: number
      • center: V

        Centre of the (possibly rotated) ellipse.

      • kind: "ellipseArc"
      • rotation: number

        Rotation of the ellipse's major axis from +x, in radians.