15 |
|
* rcurv - curvature radius of slats (up:>0;down:<0;flat:=0) |
16 |
|
*/ |
17 |
|
|
18 |
< |
#include <stdio.h> |
19 |
< |
#include <stdlib.h> |
18 |
> |
#include "rtio.h" |
19 |
> |
#include <stdlib.h> |
20 |
|
#include <math.h> |
21 |
– |
#include <string.h> |
21 |
|
|
22 |
+ |
#ifndef PI |
23 |
|
#define PI 3.14159265358979323846 |
24 |
+ |
#endif |
25 |
|
#define DELTA 3. /* MINIMAL SUSTAINED ANGLE IN DEGREES */ |
26 |
|
|
27 |
|
double baseflat[4][3], baseblind[4][3][180]; |
33 |
|
|
34 |
|
static void makeflat(double w, double d, double a); |
35 |
|
static void printslat(int n); |
35 |
– |
static void printhead(register int ac, register char **av); |
36 |
|
|
37 |
– |
|
37 |
|
void |
38 |
|
makeflat( |
39 |
|
double w, |
66 |
|
int n |
67 |
|
) |
68 |
|
{ |
69 |
< |
register int i, k; |
69 |
> |
int i, k; |
70 |
|
|
71 |
|
for (k=0; k < nsurf; k++) { |
72 |
|
printf("\n%s polygon %s.%d.%d\n", material, name, n, k); |
80 |
|
} |
81 |
|
|
82 |
|
|
84 |
– |
void |
85 |
– |
printhead( /* print command header */ |
86 |
– |
register int ac, |
87 |
– |
register char **av |
88 |
– |
) |
89 |
– |
{ |
90 |
– |
putchar('#'); |
91 |
– |
while (ac--) { |
92 |
– |
putchar(' '); |
93 |
– |
fputs(*av++, stdout); |
94 |
– |
} |
95 |
– |
putchar('\n'); |
96 |
– |
} |
97 |
– |
|
98 |
– |
|
83 |
|
int |
84 |
|
main( |
85 |
|
int argc, |
185 |
|
} |
186 |
|
} |
187 |
|
|
188 |
< |
printhead(argc, argv); |
189 |
< |
|
188 |
> |
fputs("# ", stdout); |
189 |
> |
printargs(argc, argv, stdout); |
190 |
> |
|
191 |
|
|
192 |
|
/* REPEAT THE BASIC CURVED OR FLAT SLAT TO GET THE OVERALL BLIND */ |
193 |
|
|