a = 1.;
v0 = 1.;
H = 1.;
kappa = H*a/v0^2;

x = @(tau, kappa) -tau.^2*sqrt(2)*sqrt(1. + sqrt(1. + kappa^2))/kappa;
y = @(tau) -tau.^2;

taumin = 0;
taumax = 1.;
np = 100;
tau = linspace(taumin, taumax, np);

xx = x(tau, kappa);
yy = y(tau);

xx2 = x(tau, 2*kappa);

plot(xx, yy);
hold on
plot(xx2, yy);
grid on;
xlabel('x/H')
ylabel('y/H')
title('Fly trajectory in the moving reference frame')
legend('\kappa=1', '\kappa=2', 'Location','NorthWest')
hold off
