I have a matrix
[ 0 0
1.0 0.9 ]
I want it rearranged so that it appears like so
[ 0.2 0
1.0 0.4 ]
If you take any one of these columns and concatenate it onto itself, the values loop from a minimum to a maximum. How can I get a program to automatically do this for a number of matrices? I'm not sure how to start this, so any help would be appreciated.
Ultimately, I need the pairs of points rearranged so that when they are graphed they form a polygon that does not intersect itself.