|
|
In order to avoid self-intersecting knots, the program performs an
intersection test at each stage of the computation.
Specifically:
* Each bead is processed in turn.
* The resultant force on that bead is computed.
* The new position of that bead is computed.
* A triangle is constructed, having 3 corners:
* New bead position.
* Old bead position.
* Next bead along.
* Then every stick on the entire knot is tested to see if it
intersects this triangle. If a single stick does intersect, the bead is
left in its original position. (This applies only to that single bead.)
Stupid bug #3:
When performing the intersection tests, the stick endpoints are all
identical [resulting in 0-length sticks]. Hence, *all* intersection
tests pass, even when they shouldn't.
Duh.
Post a reply to this message
|
|