ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/gensurf.1
Revision: 1.7
Committed: Fri May 4 23:56:49 2018 UTC (7 years ago) by greg
Branch: MAIN
CVS Tags: rad5R2, rad5R3
Changes since 1.6: +6 -1 lines
Log Message:
Added search to -f for genrev, gensurf, genworm, bsdf2klems, bsdf2ttree, & pcomb

File Contents

# User Rev Content
1 greg 1.7 .\" RCSid "$Id: gensurf.1,v 1.6 2007/09/04 17:36:40 greg Exp $"
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 greg 1.7 The variable and function definitions in each
64     .I \-f source
65     file are read and compiled from the RADIANCE library where it is found.
66 greg 1.1 The
67     .I \-s
68     option adds smoothing (surface normal interpolation) to the surface.
69 greg 1.2 The
70     .I \-o
71     option produces a Wavefront .OBJ file rather than a RADIANCE
72     scene description.
73     This is most useful as input to the
74     .I obj2mesh(1)
75     program for producing a compiled mesh.
76 greg 1.3 A single "usemtl" statement will appear at the beginning
77     of the .OBJ output, echoing the modifier given on the command line.
78 greg 1.1 .PP
79     Rough holes may be cut in the mesh by defining a valid(s,t) function.
80     Where this function is positive, polygon vertices will be produced.
81     Where it is negative, no geometry will be output.
82     Surface normal interpolation will ignore any invalid vertices.
83     .PP
84     The second invocation form reads z data values from the file
85     .I dfile.
86     This file must give either m*n or (m+1)*(n+1) floating point z
87     values.
88     If m*n values are given, then the values correspond to the centroid
89     of each quadrilateral region.
90     If (m+1)*(n+1) values are given, then the values correspond to the
91     vertices of each quadrilateral region.
92     The ordering of the data in the file is such that the s values are
93     changing faster than the t values.
94     If a minus ('-') is given for
95     .I dfile,
96     then the values are read from the standard input.
97     .PP
98     The third invocation form is used to read coordinate triplets from a
99     file or the standard input.
100     The three
101     .I dfile
102     arguments must all be the same, and the corresponding file must
103     contain three floating point values for each point location.
104     The ordering and other details are the same as those described
105     for z value files above.
106     .SH EXAMPLE
107     To generate a tesselated sphere:
108     .IP "" .2i
109     gensurf crystal ball 'sin(PI*s)*cos(2*PI*t)' 'cos(PI*s)' 'sin(PI*s)*sin(2*PI*t)' 7 10
110     .PP
111     To generate a 10x20 smoothed height field from 12 recorded vertex
112     z values:
113     .IP "" .2i
114 greg 1.6 gensurf dirt ground '10*s' '20*t' height.dat 2 3 \-s
115 greg 1.7 .SH ENVIRONMENT
116     RAYPATH the directories to check for auxiliary files.
117 greg 1.1 .SH AUTHOR
118     Greg Ward
119     .SH BUGS
120     The smoothing operation requires that functions be defined
121     beyond the [0,1] boundaries of s and t.
122     .SH "SEE ALSO"
123 greg 1.5 genbox(1), genrev(1), genworm(1), icalc(1),
124     obj2mesh(1), obj2rad(1), rpict(1), rvu(1), xform(1)