Use this specific two-link mechanism
Both ideal panels have equal joint-to-joint length w. One end is fixed at the origin. The common fold joint moves into positive y, and the far endpoint slides along the positive x-axis. The second panel mirrors the first about the fold joint. This is not a universal bifold product model.
Geometry
Track endpoint x = 2w cosθ
Fold-joint depth y = w sinθ
Endpoint retraction from flat = 2w(1 − cosθ)
These follow two equal right-triangle projections. With 18 in panels and 60°, endpoint x is 18 in, fold depth is 9√3 ≈ 15.588 in, and retraction is 18 in. At 0° the endpoint is 36 in away and depth is zero. At 90° the zero-thickness links fold onto one another, endpoint x is zero, and depth is 18 in.
Numerical outputs round to three decimals. Input angle is restricted to 0–90°; panel length must be positive. Actual door thickness, pivots, track carriages, overlaps, and collision limits change the motion and folded envelope. Do not interpret the ideal 90° result as a real zero-width stack or a clear-opening approval. The sliding-door travel tool models one translating leaf or two leaves moving apart instead.