12 |
|
|
13 |
|
mylong = atan2(Ny,Nx); |
14 |
|
|
15 |
< |
latlong = if(LATWIDTH-mod(Acos(Nz)+ LATWIDTH/2,LATSTEP), .05, |
15 |
> |
latlong = if(LATWIDTH-mod(Acos(Nz)+LATWIDTH/2,LATSTEP), .05, |
16 |
|
if(LONGWIDTH-mod(mylong+LONGWIDTH/2,90*DEGREE), .01, |
17 |
|
if(LONGWIDTH-mod(mylong+LONGWIDTH/2,LONGSTEP), .3, 1))); |
18 |
+ |
|
19 |
+ |
{ Compute up vector corresponding to sphere position } |
20 |
+ |
upx = Nx*Ny*(Nz-1); |
21 |
+ |
upy = Nx*Nx + Ny*Ny*Nz; |
22 |
+ |
upz = -Ny*(Nx*Nx+Ny*Ny); |
23 |
|
|
24 |
|
interp_arr2`(i,x,f):(i+1-x)*f(i)+(x-i)*f(i+1); |
25 |
|
interp_arr`(x,f):if(x-1,if(f(0)-x,interp_arr2(floor(x),x,f),f(f(0))),f(1)); |