Force Flow
11-02-2003, 03:52 PM
I'm having a problem trying to fill a 6x6 matrix in C
Filling it like this is a piece of cake:
0 1 1 1 1 1
-1 0 1 1 1 1
-1 -1 0 1 1 1
-1 -1 -1 0 1 1
-1 -1 -1 -1 0 1
-1 -1 -1 -1 -1 0
But I'm having a real hard time trying to fill it like this without having to define almost every single cell:
1 1 1 1 1 0
1 1 1 1 0 -1
1 1 1 0 -1 -1
1 1 0 -1 -1 -1
1 0 -1 -1 -1 -1
0 -1 -1 -1 -1 -1
Is there a way to invert the matrix from the "piece of cake" one?
Here's what I have so far, such as it is.
Filling it like this is a piece of cake:
0 1 1 1 1 1
-1 0 1 1 1 1
-1 -1 0 1 1 1
-1 -1 -1 0 1 1
-1 -1 -1 -1 0 1
-1 -1 -1 -1 -1 0
But I'm having a real hard time trying to fill it like this without having to define almost every single cell:
1 1 1 1 1 0
1 1 1 1 0 -1
1 1 1 0 -1 -1
1 1 0 -1 -1 -1
1 0 -1 -1 -1 -1
0 -1 -1 -1 -1 -1
Is there a way to invert the matrix from the "piece of cake" one?
Here's what I have so far, such as it is.