1. ## Matrix help

Lets say that I have some matrix A,with values:
[1 0 0;
0 0 0;
0 0 0;];

How do I mathematically alter the matrix to change from its current for to (s=0 is the initial iteration) :
[1 1 1;
1 1 1;
1 1 1;];
s=1

[1 2 2;
2 2 2;
2 2 2;];
s=2

[1 2 3;
2 2 3;
3 3 3;];
s=3

My first thought: I can think of any point on the matrix as the vertex of some inverted pyramid ( abs(x-i) + abs(y-j)), and place the pyramid on top of that point, and pull it down. At each step down, the elements of matrix A that grow become farther and farther apart. But apparently, I am wrong. Any tips? Once again, you guys rock.

2. ## Re: Matrix help

Attachment 23697

It makes more sense now that I thik about it. As x and y increase, the values of the matrix go up accordingly. I attached a picture of what the matrix looks like at each iteration (via color) the center color represents 1, and each iteration outside of it increases by 1 (i.e., black=1, grey = 2, brown = 3, red =4, etc). each value outside of the initial value increases linearly, but I cannot for the life of me figure out how to apply a function like that

3. ## Re: Matrix help

(Sorry for the repeated responses to my own post, I am just spitting out thoughts as a I go).

not sure if this helps: (just derived it :P)
(abs(x*cos(45)-y*sin(45))+abs(x*sin(45)+y*cos(45))) = z

vertices start at z.

Made my equation for the square more 'pretty':
z = (abs(x-y))/sqrt(2)+(abs(x+y))/sqrt(2)