views:

141

answers:

2
A: 

It seems like what you want to do is to project the vertices of one plane onto the other one, and then match vertices of plane A with vertices of plane B according to a rule which works well for your problem. (Your drawings make it look as though the plane figures are not only translated and rotated relative to each other, but also scaled.)

aem
You're right, they are also scaled. Sorry for not mentioning that.
Tchami
+2  A: 

After ensuring that your rectangles are not intersecting and are not orthogonal, try minimizing the total distance between the paired points. There are only 24 ways to pair the vertices, so a clever solution is probably not needed. The other obvious way to approach this would be to ensure that the 4 new faces formed by connecting the vertices do not intersect, ie. you've formed a topologically simple solid.

Checking that the 4 new faces do not intersect seems like a good and simple way of doing it. Just need to figure out how to do the intersection test.. hmm.
Tchami
Of course, it depends on *why* you want to do this, but minimizing the total distance (or total square distance or something) sounds like the way to go. I wouldn't spend too much time thinking about intersecting faces. If I understand the second picture correctly, none of the "faces" containing a red edge is in a single plane, so there is no flat surface that could reasonably be called a face; you'd either have to use some complicated surface, or break it into a couple of triangles (which there are two ways to do).
Anton Geraschenko
I'm not exactly sure I understand how that would work though. Is the suggestion to run through all 24 ways to pair the vertices, and then take the solution where the total distance between each pair of vertices are lowest? A pseudo representation this would be very much appreciated.
Tchami
Thanks, I can see minimizing the total distance between the paired points work. I'm still not sure why I can be sure of this though.
Tchami