Python Forum
Creating a circular matrix with one input
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a circular matrix with one input
#18
Previous posts have shown that whatever algorithm, you need a kind of "GPS" to navigate
through the different turns in the matrix. Fortunately these "moves" are predictable.
In order to help our TS even further, this is my GPS:
These are not coordinates, but index increments (decrements) that are associated with the move.
dictMoves = {'LEFT':(0,-1),'DOWN':(1,0),'RIGHT':(0,1),'UP':(-1,0)} 
And these are the "rails" you need to move along. (The vector is initiated dynamically, based on the seed number.
[2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6]
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
RE: Creating a circular matrix with one input - by DPaul - Oct-02-2020, 06:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with a Matrix nxn with black and white input Rosko 3 2,039 Nov-24-2019, 07:39 AM
Last Post: buran
  Creating a wavelet matrix pingaan 4 2,571 May-26-2019, 06:25 PM
Last Post: heiner55
  define a diagonal matrix from a matrix amalalaoui 1 2,400 May-15-2019, 01:12 PM
Last Post: ichabod801
  Code for a circular wire?? hiphopopot0mous 11 6,768 Dec-03-2017, 06:23 PM
Last Post: micseydel
  Creating lists or arrays as the input nickalvar 4 4,313 May-03-2017, 04:46 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020