| 15 |
|
#include "color.h" |
| 16 |
|
#include "lookup.h" |
| 17 |
|
|
| 18 |
+ |
#define PI 3.14159265358979323846 |
| 19 |
+ |
|
| 20 |
|
int o_face(), o_cone(), o_sphere(), o_ring(), o_cylinder(); |
| 21 |
|
int o_instance(), o_source(), o_illum(); |
| 22 |
|
int o_plastic(), o_metal(), o_glass(), o_mirror(), o_trans(), o_light(); |
| 46 |
|
|
| 47 |
|
#define NVERTS 256 |
| 48 |
|
|
| 49 |
< |
long clock; /* incremented at each vertex request */ |
| 49 |
> |
long vclock; /* incremented at each vertex request */ |
| 50 |
|
|
| 51 |
|
struct vert { |
| 52 |
|
long lused; /* when last used (0 if unassigned) */ |
| 347 |
|
register LUENT *lp; |
| 348 |
|
register int i, vndx; |
| 349 |
|
|
| 350 |
< |
clock++; /* increment counter */ |
| 350 |
> |
vclock++; /* increment counter */ |
| 351 |
|
mkvkey(vkey, vp); |
| 352 |
|
if ((lp = lu_find(&vertab, vkey)) == NULL) |
| 353 |
|
goto memerr; |
| 373 |
|
lp->data = (char *)&vert[vndx]; /* set it */ |
| 374 |
|
} else |
| 375 |
|
vndx = (struct vert *)lp->data - vert; |
| 376 |
< |
vert[vndx].lused = clock; /* record this use */ |
| 376 |
> |
vert[vndx].lused = vclock; /* record this use */ |
| 377 |
|
sprintf(vname, "v%d", vndx); |
| 378 |
|
return(vname); |
| 379 |
|
memerr: |
| 730 |
|
puts("\tc"); |
| 731 |
|
if (d > FTINY) |
| 732 |
|
printf("\t\tcxy %.4f %.4f\n", cxyz[0]/d, cxyz[1]/d); |
| 733 |
< |
printf("\ted %.4g\n", cxyz[1]*WHTEFFICACY); |
| 733 |
> |
printf("\ted %.4g\n", cxyz[1]*(PI*WHTEFFICACY)); |
| 734 |
|
return(0); |
| 735 |
|
} |