Closing the trajectories

A project log for PEAC Pisano with End-Around Carry algorithm

Add X to Y and Y to X, says the song. And carry on.

Yann Guidon / YGDESYann Guidon / YGDES 06/22/2021 at 00:460 Comments

As the mapping of the whole orbit of w=26 has exceeded 80%, it might be too late to revive the "optimised" dual orbit walker but I am still puzzled by the cause of its flaw. Indeed the program pt_orbit_07.c does not work as intended : it fails to "meet in the middle" approximatively every other time. I thought my design was good though, so what happens ?

Then I imagined the traces of 2 lines drawn on a bitmap. I supposed and assumed the algo would behave like this:

But it appears that it can do so as well:

So I guess one of the lines should have a slope of 1/2 instead of 1 as above, to ensure that nothing is missed. To put all the chances on our side, both lines would have a slope of 1/2 but even then, it's not enough :

To make sure that the lines share points, at least one must have a width of 2 pixels. If both do, it's even better.

Whatever the mutual alignment, there are 2 chances to catch the crossing.

In the algo, the "width" is translated in the number of previous numbers to check, on top of the current result. So ideally, both the forward and backwards iterators should keep at least one previous value to compare.