the time labels when comparing Figures \[fig:evol:kdv1\] and \[fig:evol:kdv2\]. As a final initialization step, we project onto the space of initial conditions satisfying (\[eq:init:trav\]) by zeroing out the imaginary parts of $\hat\eta_k(0)$ and the real parts of $\hat\varphi_k(0)$, which are already small. Surprisingly, this improves the time-periodicity of the initial guess in (\[eq:f1\]) to $\tilde f = 2.3\times 10^{-8}$.

![\[fig:evol:kdv1\] Evolution of two Stokes waves that collide repeatedly, at times $t\approx T/2+kT$, $k\ge0$. (left) Traveling solutions A and B in Figure \[fig:bif:stokes\] were initialized with wave crests at $x=0$ and $x=\pi$, respectively. The combined solution is approximately time-periodic, with period $T=138.399$. (right) The same solution, at later times, starting with the second collision ($t=3T/2$).](figs/evol_kdv1){width="\linewidth"}

![\[fig:pov:kdv1\] A different view of the solutions in Figure \[fig:evol:kdv1\] shows the generation of background waves. Shown here are the functions $\eta(x+8\pi t/T,t)$, which give the dynamics in a frame moving to the right fast enough to traverse the domain four times in time $T$. In a stationary frame, the smaller and larger solitary waves traverse the domain 5 and 6 times, respectively.](figs/pov_kdv1){height="2in"}

We emphasize that our goal is to find *any* nearby time-periodic solution by adjusting the initial conditions to drive $\tilde f$ to zero. 