Talk:Spiral matrix: Difference between revisions

Deleted my post of a couple of days ago. On reflection it didn't add anything to the conversation.
(Deleted my post of a couple of days ago. On reflection it didn't add anything to the conversation.)
 
Line 321:
 
:: It's a lot better, thanks. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 12:46, 30 September 2015 (UTC)
 
== As an exercise in Turtle Graphics. ==
 
As Quackery is not a well known language, here are my working notes in case anyone wants to take this approach. I think they're self-explanatory.
 
<pre>x,y| 0 1 2 3 4
---+---------------
0| 0 1 2 3 4
1| 15 16 17 18 5
2| 14 23 24 19 6
3| 13 22 21 20 7
4| 12 11 10 9 8
 
The turtle starts at (0,0) facing east.
 
When it walks a specified distance, it
leaves a trail of numbers behind it.
 
"right" means "turn right 90 degrees".
 
These are its movements to fill a 5*5 matrix.
 
4 walk right
 
4 walk right 4 walk right
3 walk right 3 walk right
2 walk right 2 walk right
1 walk right 1 walk right
 
1 walk
 
("1 walk": The turtle must vacate the final
position as it leaves numbers /behind/ it.)
</pre>
 
--[[User:GordonCharlton|GordonCharlton]] ([[User talk:GordonCharlton|talk]]) 23:12, 9 February 2022 (UTC)
1,462

edits