This pages presents the URDL (up right down left) version of the rotor router algorithm with the same extensions as in the UDLR version. The code is the same as the code provided in the main page except the rotor movement is moved from UDLR to URDL.
Case 1: same extension as case1 of the main page but with an URDL version of the rotor router.
Case3:
Its is very fun to observe that the extension that removes the Moiré on the UDLR rotor router does not have the same effect on the URDL rotor router where the Moiré remains.
case 3c:
When initializing the grid with a 500*500 square with value=UP before launching the rotor router we get this picture.
case 3d:
When initializing first a radius=1000 circle, after 15min of computation, here the output of the URDL rotor router algorithm for 100K iterations.
During computation, at iteration 3770, the agent makes more than 10Milllions moves before finding an empty cell, but its not an endless loop!
case 3d:
Here the URDL rotor router with the grid initialized with a circle of the type described below prior to launching the rotor router algorithm.
for(yy=-radius; yy<=radius; yy++){
for(xx=-radius; xx<=radius; xx++){
if(xx*xx+yy*yy <= radius*radius){
if((5000+xx)%2 == 0 && (5000+yy)%2 == 0 ){grid[5000+xx][5000+yy]=2;}else{grid[5000+xx][5000+yy]=1;}
}
}}
The image in the middle is with:
for(yy=-radius; yy<=radius; yy++){
for(xx=-radius; xx<=radius; xx++){
if(xx*xx+yy*yy <= radius*radius){
if((5000+xx)%2 == 0 && (5000+yy)%2 == 0 ){grid[5000+xx][5000+yy]=1;}else{grid[5000+xx][5000+yy]=3;}
}
}}
And finally on the right it is with:
if((5000+xx)%2 == 0 && (5000+yy)%2 == 0 ){grid[5000+xx][5000+yy]=1;}else{grid[5000+xx][5000+yy]=4;}
All images presented in this website are courtesy of Cedric Vandenweghe at https://sites.google.com/site/projectsced/home