AutoMovie API
    Preparing search index...

    Function boundAutoMovieConvexSeparation

    • A conservative separation of the convex hulls of nonempty finite XYZ vertex runs. Points, closed segments, filled triangles and convex cells are measured, including degenerate hulls. Coordinates are represented binary64 metres; vectors and arrays remain caller-owned and the scalar result owns no mutable snapshot.

      For any nonzero stored direction d, every convex combination has a projection between its vertices' extrema. A positive projection gap divided by |d| is therefore a lower bound on Euclidean separation by Cauchy-Schwarz. Each subtraction, product, sum, square root and division is enclosed outward by adjacent binary64 numbers. The direction's norm uses an upper enclosure. No fixed spatial tolerance or approximate closest distance can create PASS. Input coordinates and differences must admit finite enclosing arithmetic; overflow throws instead of returning an unqualified separation, as do an empty run, a non-finite coordinate and a negative or NaN sufficient.

      Candidate directions are every vertex-triple normal, b's first, then the displacement between the two first vertices, then the closest-point displacement of every vertex pair of a against every vertex pair of b, taken from the shared segment kernel. Approximate witnesses only choose directions: even a poor direction retains the projection proof. Zero means touching, intersecting, or unresolved; it does not assert an intersection. This is neither signed side classification nor a complete contact-manifold query. In particular a triangle containing an allowed attachment point still receives zero when another part crosses.

      sufficient stops once a direction already proves that nonnegative requested separation. The returned bound can then be weaker than another direction's; omitted or infinite sufficient examines all directions. This cost control changes no admission: callers accept only a bound at least their requested separation. spend is an optional caller-owned work counter, invoked before each normal triple, each projection axis and each pair calculation; the resident mesh separation query always supplies its budget and passes its resident triangle as b.

      Parameters

      Returns number