#define angle 3.14/4.
struct inputstuff{
miBoolean environ_lens(miColor *result, miState *state, struct inputstuff *paras)
{
elev_pos = state->raster_y - (state->camera->y_resolution/2.);
elev_pos /= state->camera->y_resolution/2.;
azi_pos = state->raster_x - (state->camera->x_resolution/2.);
azi_pos /= state->camera->x_resolution/2.;
origin.x = 0;
origin.y = 0;
origin.z = 0;
dir.x = sin(azi_pos*3.14)*sin(elev_pos*3.14); /* right is +x */
dir.y = cos(elev_pos*3.14); /* top is up */
dir.z = cos(azi_pos*3.14)*sin(elev_pos*3.14); /* center is +z */
if ((state->raster_x == 250)&&(state->raster_y == 250))