9 |
|
|
10 |
|
#define _USE_MATH_DEFINES |
11 |
|
#include "rtio.h" |
12 |
+ |
#include "fvect.h" |
13 |
|
#include <stdlib.h> |
14 |
|
#include <ctype.h> |
15 |
|
#include <math.h> |
40 |
|
float *va; /* corresponding value array */ |
41 |
|
} PGINTERP; |
42 |
|
|
42 |
– |
extern void SDdisk2square(double sq[2], double diskx, double disky); |
43 |
– |
|
43 |
|
char *progname; /* global argv[0] */ |
44 |
|
|
45 |
|
int incident_side = 0; /* signum(intheta) */ |
129 |
|
|
130 |
|
/* Compute square location from normalized input/output vector */ |
131 |
|
static void |
132 |
< |
sq_from_ang(double sq[2], double theta, double phi) |
132 |
> |
sq_from_ang(RREAL sq[2], double theta, double phi) |
133 |
|
{ |
134 |
|
double vec[3]; |
135 |
|
double norm; |
140 |
|
vec[2] = sqrt(1. - vec[2]*vec[2]); |
141 |
|
norm = 1./sqrt(1. + vec[2]); |
142 |
|
|
143 |
< |
SDdisk2square(sq, vec[0]*norm, vec[1]*norm); |
143 |
> |
disk2square(sq, vec[0]*norm, vec[1]*norm); |
144 |
|
} |
145 |
|
|
146 |
|
/* Compute quantized grid position from normalized input/output vector */ |
147 |
|
static void |
148 |
|
pos_from_ang(int gp[2], double theta, double phi) |
149 |
|
{ |
150 |
< |
double sq[2]; |
150 |
> |
RREAL sq[2]; |
151 |
|
|
152 |
|
sq_from_ang(sq, theta, phi); |
153 |
|
gp[0] = (int)(sq[0]*ANGRES); |