<> <> DIRECTORY HerculesStorage USING [PointList, ConstrList]; HerculesSolver: DEFINITIONS = BEGIN OPEN Stor: HerculesStorage; PointList: TYPE = Stor.PointList; ConstrList: TYPE = Stor.ConstrList; displayingMotions: PUBLIC BOOL; Solve: PROC [points: PointList, constrs: ConstrList] RETURNS [success, impossible: BOOLEAN] -- Attempts to satisfy the given constraints by adjusting the positions of the given points -- while keeping all other points fixed. -- Uses the Newton-raphson method. Iterates the latter until -- (a) no point changes position (after rounding to integer coordinates), or -- (b) all constraints are found to be satisfied, or -- (c) it concludes it is impossible to satisfy them all, or -- (d) 20 iterations have been performed. -- Returns impossible=TRUE in case (c), and success=TRUE in cases (a) and (b). END. <> <<-- Added Tioga formatting>> <> <<>> <> <<-- Added Tioga formatting>> <> <<>> <> <<-- Renamed to herculesSolver>> <> <<>> <> <> <<>> <> <>