"an exercise for the reader"... :)
Okay, how about this: calculate some intermediate points, and store them in an x-y array. If a new piece tries to add points that are too close to an old point, it's a collision.
Actually, I like
Dr. Mu's concept of transforming successful closed layouts, although I wouldn't necessarily do it as a 'parsing problem' because that gets trickier as pieces become more varied in length, angle and radius. Either the programmer or the program need to figure out what transformations work geometrically, and I'd much rather it be the program. Heesh's right to focus on successful layouts rather than random ones, because that will give you more solutions more quickly. Won't be as entertaining to watch, though!
:D
Don Wilde
"There's more than one level to any answer."