I want to select four points in a plane make a parallelogram. Tried
L = {x, y, z} /.
Solve[{2 x + 2 y + z - 5 == 0, -7 <= x <= 7, -7 <= y <= 7, -7 <=
z <= 7, x y z != 0, (x - y) (y - z) (z - x) != 0}, {x, y, z},
Integers];
Length[L]
ss = Subsets[L, {4}];
t = Select[
ss, (12 == Length[Union[#[[1]], #[[2]], #[[3]], #[[4]]]] ) &&
Norm[Cross[#[[2]] - #[[1]], #[[3]] - #[[1]]]] !=
0 && #[[2]] - #[[1]] == #[[4]] - #[[3]] &]
Length[t]
I got
{{{-7, 7, 5}, {-3, 6, -1}, {-2, 4, 1}, {2, 3, -5}}, {{-7, 7, 5}, {-2, 6, -3}, {-1, 2, 3}, {4, 1, -5}}, {{-6, 7, 3}, {-3, 5, 1}, {-1, 6, -5}, {2, 4, -7}}, {{-5, 4, 7}, {-2, 6, -3}, {2, -1, 3}, {5, 1, -7}}, {{-5, 6, 3}, {-2, 1, 7}, {2, 4, -7}, {5, -1, -3}}, {{-4, 7, -1}, {-2, 6, -3}, {3, 2, -5}, {5, 1, -7}}, {{-3, 3, 5}, {1, -2, 7}, {2, 4, -7}, {6, -1, -5}}, {{-2, 1, 7}, {-1, 6, -5}, {3, -3, 5}, {4, 2, -7}}, {{-1, 2, 3}, {1, 5, -7}, {4, -5, 7}, {6, -2, -3}}, {{-1, 5, -3}, {1, -2, 7}, {4, 2, -7}, {6, -5, 3}}, {{1, 4, -5}, {2, -1, 3}, {6, -2, -3}, {7, -7, 5}}, {{1, 5, -7}, {2, 3, -5}, {6, -2, -3}, {7, -4, -1}}, {{3, 2, -5}, {4, -2,1}, {6, -3, -1}, {7, -7, 5}}, {{4, 2, -7}, {5, -3, 1}, {6, -1, -5}, {7, -6, 3}}}
The order (from left to right) of the four points
{{-3, 3, 5}, {1, -2, 7}, {2, 4, -7}, {6, -1, -5}}
doesn't make a parallelogram.
How can I arrange the order of vertices from left to right to always get a parallelogram.
FindCurvePath
? $\endgroup$