ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/gensurf.1
Revision: 1.4
Committed: Tue Dec 9 15:59:06 2003 UTC (20 years, 5 months ago) by greg
Branch: MAIN
Changes since 1.3: +1 -1 lines
Log Message:
Fixed RCSid specification

File Contents

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