right-moving Stokes waves that nearly return to their initial configuration after the interaction. (left) Solutions A and C were combined via (\[eq:AandC\]) and evolved through one collision to $t=137.738$. (right) Through trial and error, we adjusted the amplitude of the smaller Stokes wave and the simulation time to obtain a nearly time-periodic solution. ](figs/align_stokes){width="\linewidth"}

With traveling waves in hand, out next goal is to collide two of them and search for a nearby time-periodic solution, with $\theta=0$. As shown in Figure \[fig:bif:stokes\], varying $\hat\eta_1(0)$ from 0 to $7.4\times 10^{-4}$ causes the period of a Stokes wave with wavelength $\lambda=2\pi$ and mean fluid depth $h=0.05$ to decrease from $T_O=28.1110$ to $T_A=22.9739$, and the wave height (vertical crest-to-trough distance) to increase from 0 to $0.02892$. Solution C is the closest among the Stokes waves we computed to satisfying $5T_C=6T_A$, where $p=5$ is the smallest integer satisfying $\frac{p+1}{p}T_A<T_O$. We then combine solution A with a spatial phase shift of solution C at $t=0$. The resulting initial conditions are $$\label{eq:AandC}
  \begin{aligned}
  \eta^{A+C}_0(x) &= h + \big[\eta^A_0(x)-h\big] + \big[\eta^C_0(x-\pi)-h\big], \\
  \varphi^{A+C}_0(x) &= \varphi^A_0(x) + \varphi^C_0(x-\pi),
  \end{aligned}$$ where $h=0.05$ is the mean fluid depth. Plots of $\eta_0^A(x)$, $\eta_0^C(x-\pi)$, $\varphi_0^A(x)$ and $\varphi_0^C(x-\pi)$ are shown in Figure \[fig:AandC\]. 