1 |
.\" RCSid "$Id" |
2 |
.TH GENSURF 1 11/15/93 RADIANCE |
3 |
.SH NAME |
4 |
gensurf - generate a RADIANCE description of a curved surface |
5 |
.SH SYNOPSIS |
6 |
.B "gensurf mat name 'x(s,t)' 'y(s,t)' 'z(s,t)' m n" |
7 |
[ |
8 |
.B "\-e expr" |
9 |
][ |
10 |
.B "\-f file" |
11 |
][ |
12 |
.B \-s |
13 |
] |
14 |
.br |
15 |
.B "gensurf mat name 'x(s,t)' 'y(s,t)' dfile m n" |
16 |
[ |
17 |
.B "\-e expr" |
18 |
][ |
19 |
.B "\-f file" |
20 |
][ |
21 |
.B \-s |
22 |
] |
23 |
.br |
24 |
.B "gensurf mat name dfile dfile dfile m n" |
25 |
[ |
26 |
.B \-s |
27 |
] |
28 |
.SH DESCRIPTION |
29 |
.I Gensurf |
30 |
produces a RADIANCE scene description of a |
31 |
functional surface defined by the parametric equations |
32 |
.I x(s,t), |
33 |
.I y(s,t), |
34 |
and |
35 |
.I z(s,t). |
36 |
The surface normal is defined by the right hand rule as |
37 |
applied to |
38 |
.I (s,t). |
39 |
.I S |
40 |
will vary from 0 to 1 in steps of |
41 |
.I 1/m, |
42 |
and |
43 |
.I t |
44 |
will vary from 0 to 1 in steps of |
45 |
.I 1/n. |
46 |
The surface will be composed of |
47 |
.I 2*m*n |
48 |
or fewer triangles and quadrilaterals. |
49 |
The expressions are of the same type used in RADIANCE |
50 |
function files. |
51 |
Auxiliary expressions and/or files may be specified |
52 |
in any number of |
53 |
.I \-e |
54 |
and |
55 |
.I \-f |
56 |
options. |
57 |
The |
58 |
.I \-s |
59 |
option adds smoothing (surface normal interpolation) to the surface. |
60 |
.PP |
61 |
Rough holes may be cut in the mesh by defining a valid(s,t) function. |
62 |
Where this function is positive, polygon vertices will be produced. |
63 |
Where it is negative, no geometry will be output. |
64 |
Surface normal interpolation will ignore any invalid vertices. |
65 |
.PP |
66 |
The second invocation form reads z data values from the file |
67 |
.I dfile. |
68 |
This file must give either m*n or (m+1)*(n+1) floating point z |
69 |
values. |
70 |
If m*n values are given, then the values correspond to the centroid |
71 |
of each quadrilateral region. |
72 |
If (m+1)*(n+1) values are given, then the values correspond to the |
73 |
vertices of each quadrilateral region. |
74 |
The ordering of the data in the file is such that the s values are |
75 |
changing faster than the t values. |
76 |
If a minus ('-') is given for |
77 |
.I dfile, |
78 |
then the values are read from the standard input. |
79 |
.PP |
80 |
The third invocation form is used to read coordinate triplets from a |
81 |
file or the standard input. |
82 |
The three |
83 |
.I dfile |
84 |
arguments must all be the same, and the corresponding file must |
85 |
contain three floating point values for each point location. |
86 |
The ordering and other details are the same as those described |
87 |
for z value files above. |
88 |
.SH EXAMPLE |
89 |
To generate a tesselated sphere: |
90 |
.IP "" .2i |
91 |
gensurf crystal ball 'sin(PI*s)*cos(2*PI*t)' 'cos(PI*s)' 'sin(PI*s)*sin(2*PI*t)' 7 10 |
92 |
.PP |
93 |
To generate a 10x20 smoothed height field from 12 recorded vertex |
94 |
z values: |
95 |
.IP "" .2i |
96 |
gensurf dirt ground '10*s' '20*t' height.dat 2 3 -s |
97 |
.SH AUTHOR |
98 |
Greg Ward |
99 |
.SH BUGS |
100 |
The smoothing operation requires that functions be defined |
101 |
beyond the [0,1] boundaries of s and t. |
102 |
.SH "SEE ALSO" |
103 |
calc(1), genbox(1), genrev(1), genworm(1), rpict(1), rview(1), xform(1) |