Tiling of a Path with Trapezoids in a Constrained Environment with Backtracking Algorithm
There are two terminals, one green and one black. The green terminal is fixed; you can drag or click to change the position of the black one. A backtrack algorithm creates a tiled path between the terminals without colliding with the gray obstacles (a collision occurs when a vertex of a trapezoid is inside a gray rectangle). The number of trapezoids is limited to 40 for speed.