Near 1:1 resonances are fascinating to me. This little simulation is based on something that spontaneously arose in a planetary-accretion simulation I was running. Two Mercury-like planets evolved and shared nearly identical orbits, except in one of them the perihelion was rotated by about 90°. They briefly settled into a quasi-orbital pattern, but unlike many quasi orbitals, these had roughly equal mass. Unfortunately this situation was swiftly disrupted by the nearby formation of a hot-Neptune, so I recreated it in isolation.

The trailing planet tends to circularize the orbit of the leading, then they switch roles. The entire cycle has a period of about 40 sidereal years:

Changes in semi-major axis over time due to orbital libration. There are two obvious components; the low-frequency component has a period of 9.26 sidereal years; the high-frequency component has a period of 0.975 years.

The high-frequency component seems to have a relation to the precession rate. At each local minimum for a, ΔM = 2Δω. I don't know why this would be, and it may just be a coincidence over the period of observation. A suggested investigation would be to try changing the initial e holding all other parameters constant, which would alter the precession rates, then see whether this relationship holds. I will probably do this in the near future and post results here.

On an unrelated note, here's a look at where they "cross" each other in the quasi-orbit:

As an aside, in the original planetary accretion sim, these planets eventually settled into a remarkably stable 13:12 resonance, with the inner planet in a near-circular orbit and the outer in a moderately eccentric one, crossing inside of the orbit of the inner planet. I suspected the hot-Neptune was somehow maintaining this resonance, but even in isolation they remained stable.

this sim is really amazing . Never saw such thing ! Did these orbits really evolve out of a bunch ? Do you have any reference what the original setup was in tis case ?

Unfortunately, I do not have the exact initial conditions. The objects were generated randomly with masses of 0.025 earths and diameters of 3000 km. By the time the quasi-orbitals formed, almost everything inside of 0.7 AU had been swallowed up or driven out by a planet with a mass of almost 3 earths orbiting at that distance. This pair was nearly coorbital at a distance of about 0.21 AU with masses of about 0.25. There was a third object in an eccentric orbit that crossed the coorbitals (Mass 0.15, SMA~0.5, e~0.6). Unfortunately I didn't see it happen, but I was able to contrive a situation that gives rise to such a quasi-orbital system, attached.

Keep the stepsize at 4 seconds or lower; otherwise there is too much error introduced. (At 8 seconds, a quasi-orbital forms but is quickly disrupted by the third body; at 16 the quasi-orbital never even arises.) If it's rendering too slowly, try lowering the graphics interval to 1000. Unless you're running gravsim on a dinosaur, you'll get a reasonable simulation speed.

At 0000-7-4 2:57, the third body makes a close pass just as the coorbitals make their closest approach, resulting in a stable quasi-orbital system. I have not checked to see how long it lasts, but it survives a series of close passes that almost destroys it around 50 years in. I'm currently running this to instability (and capturing data for graphs and such).

EDIT:Well, that didn't take long. At around 60 years or so, the third body breaks the resonance with another near pass. I may upload some graphs later if I find anything particularly interesting. One thing I have noticed is several clear jumps where you can see energy transfers due to close encounters.