Skip to content

Main content

Geometry: Planar Line Normal Form Coefficients Tool

Normalize ax+by+c=0 to a unit normal, either preserving its orientation or making the first nonzero normal coefficient positive.

Loading tool…

Description

Divide a, b, and c by hypot(a,b), optionally reversing sign so the first nonzero normal coefficient is positive, inside result.

Line and vector geometry depends on direction, orientation, and normalization. An unoriented line repeats after a half turn, while a directed bearing repeats after a full turn; a normal vector need not have unit length.

Divide a, b, and c by hypot(a,b), optionally reversing sign so the first nonzero normal coefficient is positive, inside result.

When to use this tool

Use Geometry: Planar Line Normal Form Coefficients when you need an explicit line-direction, vector, or local planar calculation.

How to use the tool and how it works

  1. Enter a, b, c, orientation. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Require nonzero finite normal (a, b) and orientation preserve or first-positive. Divide a, b, and c by hypot(a,b), optionally reversing sign so the first nonzero normal coefficient is positive, inside result.1

Input fieldMeaning and unitsAccepted input
aARequired. Finite number.
bBRequired. Finite number.
cCRequired. Finite number.
orientationOrientationRequired. Text; one of "preserve", "first-positive". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultObject containing the calculated members; expand to inspect the fields below.Required. Object.
result.aACalculated result member: number.
result.bBCalculated result member: number.
result.cCCalculated result member: number.
json
{
  "input": {
    "a": -3,
    "b": -4,
    "c": 10,
    "orientation": "first-positive"
  },
  "output": {
    "result": {
      "a": 0.6,
      "b": 0.8,
      "c": -2
    }
  }
}

Limitations and assumptions

  • Coefficients represent a·x+b·y+c=0 and normalization does not change that line; no line fitting, coordinate transformation, tolerance, or geometric data validation is performed.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Construct the actual lines or vectors and apply the appropriate geometric tolerance. Resolve directed versus unoriented conventions and scaling before comparing coefficients or angles.

References

  1. Calculation and input contract: geometry/planar-line-normal-form-coefficients — tool.io

Similar or alternative tools