## General Question

# Is there a mathematical method that takes a matrix and generates a "diamond" of values from rotating it 45 degrees?

Asked by HeroicZach (195)
November 29th, 2010

I’m writing a program that simulates a game, and to do so I need to come up with a function that can rotate a matrix by 45 degrees, essentially. So if I have a 5 by 5 matrix, I need to generate a list of lists looking like:

5,5

4,1 5,2

3,1 4,2 5,3

etc etc all the way down to 1,5

I’m wondering how an operation like this would work…thanks!

Observing members:
0
Composing members:
0

## 3 Answers

## Answer this question

This question is in the General Section. Responses must be helpful and on-topic.

Have a question?
Ask Fluther!