{
	Calculate coordinates for a 180 degree fisheye lens.
	Assume view direction is (0,1,0), view up (0,0,1), (1,0,0) right.

	4/30/90
}

dx = Px-A1;
dy = Py-A2;
dz = Pz-A3;


isx = abs(A4)-abs(A5);
d = dx*A4+dy*A5;
x = dx*(1-abs(A4))+dy*(1-abs(A5));
r = sqrt(x*x+dz*dz);
phi = atan(r/d);
rp = phi/PI;
theta = PI-atan2(dz,if(isx,-abs(dx)/dx,abs(dy)/dy)*x)+A7*DEGREE;

fish_v = .5 + rp*sin(theta)+A8/180;
fish_u = .5 - rp*cos(theta)+A6/180;
