
% Run pplane6 with the quation for a pendulum:
%
% x''=-(g/l) sin(x)
% use: 
% g=l=1
% add 4 zeros to tolerance, ie 1e-8 (options->settings)
% run a specific orbit (solutions->keuboard input), ie x=3.14, y=0

alpha=3.14;
k=sin(alpha/2);
x=-40:0.5:40;
x=x+K;
[K,E] = ellipke(k^2);
[Sn,Cn,Dn] = ellipj(x,k^2);
theta=2*asin(k*Sn);

plot(x-K,theta,'ro')
axis tight
