AutoMovie API
    Preparing search index...

    Function physicalHullSegment

    • The unit parameter of the point of a segment nearest a convex hull, or deepest inside it, in the hull's own frame.

      Apart, the nearest pair of a hull and a segment is the point of their Minkowski difference nearest the origin, which the Gilbert-Johnson-Keerthi iteration finds exactly for two polytopes: each step adds the difference's support point against the current nearest point and keeps the face of the simplex nearest the origin (Ericson's region tests), and the segment parameter is the barycentric mix of the simplex's segment ends. Once the difference reaches within the hull's tolerance of the origin, the segment meets the hull, and its deepest point minimises the greatest face plane distance along it: a convex piecewise linear function of the parameter, whose least value the walk along its upper envelope reaches exactly. A segment that only grazes the hull within the tolerance takes the iteration's parameter: that of its nearest point, or of the origin's barycentric mix when a tetrahedron of the difference holds the origin.

      Parameters

      Returns number

      The parameter in [0, 1].

      When the points span no volume.