Skip to content

Main content

Bezier Endpoint Join Tangent Audit

Audit actual degree-scaled endpoint tangents for C1 equality and same-direction alignment separately; zero tangents yield unknown alignment, position continuity is not assumed.

Loading tool…

Description

Compare endpoint derivative vectors and tangent directions of two supplied curves; test positional continuity separately.

A planar Bézier curve is defined by an ordered control polygon: three points for a quadratic or four for a cubic. Its parameter t runs from 0 to 1 and generally does not measure arc length. Derivative vectors, curve positions, control points and polynomial coefficients are different representations of the same parameterized geometry.

Compare endpoint derivative vectors and tangent directions of two supplied curves; test positional continuity separately.

When to use this tool

Use this tool to compare endpoint derivative vectors and tangent directions, then check endpoint positions separately before claiming a continuously joined curve.

How to use the tool and how it works

  1. Enter left, right, tolerance using the input definitions below.
  2. Run the operation. Resolve malformed-input errors before interpreting the result.
  3. Read result.leftTangent, result.rightTangent, result.c1, result.directionAligned. Interpret signs, units, ordering and null values using the rules below.

Compute the left curve’s final degree-scaled tangent and the right curve’s initial one. c1 tests their Euclidean difference≤tolerance. directionAligned is null if either tangent has zero norm; otherwise test |cross|≤tolerance×normProduct and dot>0.1

Input fieldMeaning and unitsAccepted input
leftLeft quadratic/cubic curve’s ordered control polygon.Dense list of at most 128 rows of at most 128 finite numbers; the operation’s shape constraints also apply.
rightRight quadratic/cubic curve’s ordered control polygon.Dense list of at most 128 rows of at most 128 finite numbers; the operation’s shape constraints also apply.
toleranceNonnegative tolerance interpreted by the specific position/tangent comparisons stated above.Finite number satisfying the stated comparisons.
Output fieldInterpretation
resultObject containing the fields below.
result.leftTangentLeft curve’s final degree-scaled derivative vector.
result.rightTangentRight curve’s initial degree-scaled derivative vector.
result.c1Whether endpoint derivative vectors differ by at most the absolute tolerance; position continuity is not included.
result.directionAlignedSame-direction normalized-cross test, or null if either tangent is zero.
json
{
  "input": {
    "left": [
      [
        0,
        0
      ],
      [
        1,
        0
      ],
      [
        2,
        0
      ],
      [
        3,
        0
      ]
    ],
    "right": [
      [
        3,
        0
      ],
      [
        4,
        0
      ],
      [
        5,
        0
      ],
      [
        6,
        0
      ]
    ],
    "tolerance": 0
  },
  "output": {
    "result": {
      "leftTangent": [
        3,
        0
      ],
      "rightTangent": [
        3,
        0
      ],
      "c1": true,
      "directionAligned": true
    }
  }
}

Limitations and assumptions

  • The c1 field compares endpoint derivatives only and does not test whether endpoints meet. Tolerance acts as an absolute derivative tolerance for c1 and a dimensionless normalized-cross tolerance for directionAligned.
  • Each geometric control point has two finite coordinates within ±1,000,000,000. t and interval endpoints are dimensionless in [0,1]. Calculations use floating arithmetic and do not perform curve fitting or robust topology analysis.
  • Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.

Alternative or Complementary methods

Keep control polygons and constant-first power coefficients clearly labeled. Use separate arc-length integration or adaptive sampling when physical spacing or geometric approximation error matters.

References

  1. Tool behavior and example: Bezier Endpoint Join Tangent Audit — tool.io

Similar or alternative tools

  • Bezier Endpoint Join Position Audit

    Audit endpoint positional continuity of two explicit planar Bezier segments against an absolute supplied tolerance; no tangent or curvature continuity inferred.

  • Cubic Bezier Tangent Value

    Evaluate first derivative tangent using De Casteljau arithmetic, not a screen-space or arc-length parameter.