Anonymous user
User talk:VHF: Difference between revisions
→Spiral
(→Spiral) |
|||
Line 207:
== Spiral ==
We split the task up in 2 functions, one that adds a 'ring' around a present matrix. And a function that adds rings to a 'core':
<lang Mathematica>AddSquareRing[x_List/;Equal@@Dimensions[x] &&
Length[Dimensions[x]]==2]:=Module[{new=x,size,smallest},
size=Length[x];
smallest=x[[1,1]];
|