| 40 |
|
|
| 41 |
|
float *gausstable; /* gauss lookup table */ |
| 42 |
|
|
| 43 |
< |
#define lookgauss(x) gausstable[(int)(-10.*(x)+.5)] |
| 43 |
> |
#define lookgauss(x) gausstable[(int)(10.*(x)+.5)] |
| 44 |
|
|
| 45 |
|
|
| 46 |
|
initmask() /* initialize gaussian lookup table */ |
| 67 |
|
int xcent, ycent; |
| 68 |
|
int c, r; |
| 69 |
|
{ |
| 70 |
< |
static int wsum; |
| 71 |
< |
static double d; |
| 72 |
< |
static int y; |
| 70 |
> |
int wsum; |
| 71 |
> |
double d; |
| 72 |
> |
int y; |
| 73 |
|
register int x; |
| 74 |
|
register COLOR *scan; |
| 75 |
|
|
| 102 |
|
int xcent, ycent; |
| 103 |
|
int c, r; |
| 104 |
|
{ |
| 105 |
< |
static double dy, dx, weight, wsum; |
| 106 |
< |
static COLOR ctmp; |
| 107 |
< |
static int y; |
| 105 |
> |
double dy, dx, weight, wsum; |
| 106 |
> |
COLOR ctmp; |
| 107 |
> |
int y; |
| 108 |
|
register int x; |
| 109 |
|
register COLOR *scan; |
| 110 |
|
|
| 119 |
|
if (x < 0) continue; |
| 120 |
|
if (x >= xres) break; |
| 121 |
|
dx = (x_c*(x+.5) - (c+.5))/rad; |
| 122 |
< |
weight = lookgauss(-(dx*dx + dy*dy)); |
| 122 |
> |
weight = lookgauss(dx*dx + dy*dy); |
| 123 |
|
wsum += weight; |
| 124 |
|
copycolor(ctmp, scan[x]); |
| 125 |
|
scalecolor(ctmp, weight); |