% consider the comparametric eq'n g=f+1, having d.c. sol'n f=log2(q), f=Q
Q=linspace(-3,3,6000);
q=2..^Q;
f=1../(1+2..^(-4*Q)).^(1/8);
g=(sqrt(2)*f./(15*f.^8+1).^(1/8));
subplot(261)
%axis('square')
gset nokey
xlabel('f')
ylabel('g')
title('comparagraph')
plot(f,g)

subplot(262)
%axis('square')
xlabel('F')
ylabel('G')
title('COMPARAGRAPH')
F=log(f)/log(2);
G=log(g)/log(2);
plot(F,G)

axis(); % hopefully get rid of axis square;

whateverf=1/2/pi*sin(2*pi*Q) + Q; % sine plus slope
f=1../(1+2..^(-4*whateverf)).^(1/8);
F=log(f)./log(2);
%% not used anywhere: F=log(f)/log(2);
grid
gset nokey
xlabel('q')
ylabel('f')
title('')
qintegers=[1/8 1/4 1/2 1 2 4 8];
fintegers=(qintegers.^4./(qintegers.^4+1)).^(1/8);
ftrue=(q.^4./(q.^4+1)).^(1/8);
subplot(263);
axis(); % set axis to "normal"
plot(q,f,qintegers,fintegers,'+',qintegers,fintegers,"*",q,ftrue)

subplot(264);
xlabel('Q')
ylabel('F')

Fintegers=log(fintegers)/log(2);
Qintegers=log(qintegers)/log(2);

Ftrue=log(ftrue)/log(2);
plot(Q,F,Qintegers,Fintegers,'+',Qintegers,Fintegers,"*",Q,Ftrue)

subplot(265);
xlabel('Q')
ylabel('-log(1/f^8-1)/4')
whateverFintegers=Qintegers;
whateverFtrue=Q;
plot(Q,whateverf,Qintegers,whateverFintegers,'+',Qintegers,whateverFintegers,"*",Q,whateverFtrue)

subplot(266); % Periodizer is dlogF/dQ
%%%axis([-3 3 -4 3])
Qt=Q(1:length(Q)-1); % Qtruncated
dwhateverFdQ=1000*diff(whateverf);
dwhateverFintegers=1*ones(size(Qintegers));
x=[-3 3]; y=[1 1];
xlabel('Q')
ylabel('dQ(f)/dQ')
plot(Qt,dwhateverFdQ,Qintegers,dwhateverFintegers,'+',Qintegers,dwhateverFintegers,'*',x,y)
subplot(111);

