my question part academic, doesn't belong here, since want code aspect of twisted torus, hope no 1 minds me posing question here. i'm modelling called "grid cells" repeating patterns of activity. need here wrap subset of 2d plane onto torus such walking in of 6 directions return 1 starting point.
torus approach: take square piece of paper , tape top , bottom tube. tape left , right ends of tube donut. if start out in center of piece of paper (that donut), if travel in of 8 directions:
- n
- ne
- e
- se
- s
- sw
- w
- nw
you circle around donut once , return starting position.
now if choose specific size 'square paper' lets 10x10, environment of size 100x100, when travelling in straight line in environment, 1 loop around 'torus' 10 times, , return same point. benefit here environment can expanded indefinitely, , torus react circling more times
the code trivial involves calculating environment coordinates, mod width/length of 'square paper'. problem that, pythagoras rule, diagonal travels (ne,se,sw,nw) longer other 4 directions (n,e,s,w). deal use equilateral triangles, or hexagonal mesh such if 1 travels in each of 6 directions, travel same distance:
twisted torus: take piece of paper , somehow tape such distance travelled same of following 6 directions:
- 0
- 60
- 120
- 180
- 240
- 300
the problem can't find straight forward explanation of how make twisted torus. have looked on following , vague me
can provide me small snippet of code how implement this? cheers
edit need map continuous space onto twisted torus such travelling in of 6 directions in environment periodically return same location in 'square paper'.
Comments
Post a Comment