1 |
– |
/* Copyright (c) 1986 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* genblind2.c - make some curved or flat venetian blinds. |
6 |
|
* |
16 |
|
*/ |
17 |
|
|
18 |
|
#include <stdio.h> |
19 |
+ |
#include <stdlib.h> |
20 |
|
#include <math.h> |
21 |
|
|
22 |
< |
#ifndef atof |
23 |
< |
extern double atof(); |
26 |
< |
#endif |
22 |
> |
#define PI 3.14159265358979323846 |
23 |
> |
#define DELTA 10. /* MINIMAL SUSTAINED ANGLE IN DEGREES */ |
24 |
|
|
28 |
– |
#define PI 3.141592653589793 |
29 |
– |
#define DELTA 5. /* MINIMAL SUSTAINED ANGLE IN DEGREES */ |
30 |
– |
|
25 |
|
double baseflat[4][3], baseblind[4][3][180]; |
26 |
|
double A[3],X[3]; |
27 |
|
char *material, *name; |
65 |
|
|
66 |
|
/* HOW MANY ELEMENTARY SURFACES SHOULD BE CALCULATED ? */ |
67 |
|
|
68 |
< |
nsurf = (theta / ((PI/180.)*DELTA)); |
68 |
> |
nsurf = (theta / ((PI/180.)*DELTA)) + 1; |
69 |
|
|
70 |
|
/* WHAT IS THE DEPTH OF THE ELEMENTARY SURFACES ? */ |
71 |
|
|