Home → Operators → Line/P,Perpto,L

Line/P,Perpto,L

Perpendicular Line Segment

Creates a line from any point perpendicular to an existing line. The point can be anywhere — it does not have to be on the reference line. The new line runs from that point perpendicular to L0. Left/Right selector specifies which side.

What It Does

The Line/P,Perpto,L operator creates a line from a specified point perpendicular to an existing reference line. The point does not have to be on the reference line — it can be anywhere in the workspace. The new line runs from that point at exactly 90° to the reference line. The segment length and direction (Left or Right) are specified in the Quick Input.

Syntax

Line/P0, Perpto, L0, Length, Dir=Left|Right

Quick Input

P: 0 L: 0 Len: 100 Direction: Left/Right
Quick Input panel

Quick Input panel — XyzPilot interface

Direction Selector

The Dir selector specifies which side of the reference line the perpendicular segment extends:

DirResult
LeftSegment extends to the left of the line direction (or upward for horizontal lines)
RightSegment extends to the right of the line direction (or downward for horizontal lines)

Worked Examples

Example 1 — point on the line: L0 = Horizontal line at Y=0 P0 = (40, 0) [point on L0] Line/P0, Perpto, L0, Length=100, Dir=Left → L1: from (40,0) to (40,100) [upward] Line/P0, Perpto, L0, Length=100, Dir=Right → L2: from (40,0) to (40,-100) [downward] Example 2 — point NOT on the line: L0 = Horizontal line at Y=0 P0 = (40, 30) [point above L0, not on it] Line/P0, Perpto, L0, Length=60, Dir=Right → L3: from (40,30) perpendicular down towards L0 The line is perpendicular to L0 regardless of where P0 is in the workspace.

Analytic Rule

Perpendicular direction = normal to L0. For horizontal L0: perpendicular is vertical. For vertical L0: perpendicular is horizontal. For angled L0: perpendicular slope = -1/slope(L0) P0 can be anywhere in the workspace. The foot of the perpendicular on L0 is computed analytically. Dir=Left/Right selects which side of L0 the segment extends from P0. Result: Exact analytic perpendicular line.

FAQ

Is Dir=Left/Right mandatory?

Yes. Dir is part of the operator syntax and is not optional. Without it, two solutions exist (one each side of P0).

Can I create a perpendicular bisector?

Yes. Create the midpoint of the line with Point/L,Start/Mid/End (Pos: Mid), then use Line/P,Perpto,L through that midpoint to create the perpendicular bisector.