{
}
program pivot_reversed;

const
	fsd=4;{field dize decimals}
	fsr=1;{field size real}
	n=1.5;{refractive index}
	r=6;{mm radius of convex surface}
	t=2.75;{mm center thickness of lens}
	delta=0.0001;{mm step size}
	print_angle=false;{print arrival angle, mrad}
	print_dp=true;{print pivot to lens distance, um}
	ro=50.0;{mm range from aperture to object}

var 
	a,b,c,d,e,f:real;{rad angles}
	g:real;{mm adjacent to angle "a" in q-p triangle}
	q,s,v:real;{mm distances}
	p:real;{mm distance from aperture to back of lens}
	dp:real;{mm distance from pivot point to back of lens}
	error:real;{mm from circle}
	ho:real;{object height}
	i,j:integer;

function tan(x:real):real;begin tan:=sin(x)/cos(x); end;
	
begin
	for i:=-15 to 15 do begin
		if i<>0 then begin
			a:=i/100;
			write(a*1000:fsr:fsd,' ');
			for j:=0 to 10 do begin
				p:=j/5;
				g:=p-delta/2;
				repeat
					g:=g+delta/2;
					q:=g*tan(a);
					error:=sqrt(sqr(q)+sqr(p+r-g))-r;
				until (abs(error) < delta);
				c:=arcsin(q/r);
				e:=arcsin(sin(a+c)/n);
				b:=e-c;
				f:=arcsin(n*sin(b));
				v:=p+t-g;
				s:=q+v*tan(b);
				dp:=s/tan(f)-t;
				ho:=(ro-p+dp)*tan(f);
				if print_angle then
					write(1000*f:fsr:fsd,' ')
				else if print_dp then 
					write(1000*dp:fsr:fsd,' ')
				else
					write(ho:fsr:fsd,' ');
			end;
			writeln;
		end;
	end;
end.