| 19 |
|
char *rtargv[32] = {"rtrace", "-h", "-ov", "-fff"}; |
| 20 |
|
int rtargc = 4; |
| 21 |
|
|
| 22 |
< |
VIEW ourview; /* our view */ |
| 22 |
> |
VIEW ourview = STDVIEW; /* our view */ |
| 23 |
|
VIEW pictview = STDVIEW; /* picture view */ |
| 24 |
|
VIEW leftview, rightview; /* leftmost and rightmost views */ |
| 25 |
|
|
| 292 |
|
return(-1); |
| 293 |
|
spinvector(vd, vd, ourview.vup, h_theta(x)); |
| 294 |
|
return(0); |
| 295 |
– |
} |
| 296 |
– |
|
| 297 |
– |
|
| 298 |
– |
spinvector(vres, vorig, vnorm, theta) /* rotate vector around normal */ |
| 299 |
– |
FVECT vres, vorig, vnorm; |
| 300 |
– |
double theta; |
| 301 |
– |
{ |
| 302 |
– |
extern double sin(), cos(); |
| 303 |
– |
double sint, cost, dotp; |
| 304 |
– |
FVECT vperp; |
| 305 |
– |
register int i; |
| 306 |
– |
|
| 307 |
– |
sint = sin(theta); |
| 308 |
– |
cost = cos(theta); |
| 309 |
– |
dotp = DOT(vorig, vnorm); |
| 310 |
– |
fcross(vperp, vnorm, vorig); |
| 311 |
– |
for (i = 0; i < 3; i++) |
| 312 |
– |
vres[i] = vnorm[i]*dotp*(1.-cost) + |
| 313 |
– |
vorig[i]*cost + vperp[i]*sint; |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
|