[Wolves] rotate 2d array by 45degrees

Andrew Lewis andrew at monkeysailor.co.uk
Fri Sep 23 23:08:23 BST 2005


Andrew Lewis wrote:

>>I was looking for a generic algorthim but I can't find any that seem to 
>>work the way I want.  I guess it;s numeric time
>>    
>>
>
>can't you just shift each element 25% of the width of the array, move it
>to the next line when you get to the end of the line and then just move
>the last 25% of the last line to the start of the array?
>  
>
Ah, didn't see Aq's post until just - I was quite clearly talking 
cobblers. I thought you just wanted to shift the array by 45 degrees, 
not actually rotate it into another, larger matrix. Doh! Let me think on 
it. I've got a shortcut to do this somewhere at the back of my brain. 
Need a winkle-stick and a bit of paper to get it right.

Spline



More information about the Wolves mailing list