ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/gensurf.1
Revision: 1.6
Committed: Tue Sep 4 17:36:40 2007 UTC (16 years, 8 months ago) by greg
Branch: MAIN
CVS Tags: rad4R2P2, rad5R0, rad5R1, rad4R2, rad4R1, rad4R0, rad3R9, rad4R2P1
Changes since 1.5: +2 -2 lines
Log Message:
Added backslashes in front of hyphens (thanks to Bernd Zeimetz for his effort)

File Contents

# Content
1 .\" RCSid "$Id: gensurf.1,v 1.5 2004/01/01 19:31:45 greg Exp $"
2 .TH GENSURF 1 11/15/93 RADIANCE
3 .SH NAME
4 gensurf - generate a RADIANCE or Wavefront 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 .B \-o
15 ]
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 ][
25 .B \-o
26 ]
27 .br
28 .B "gensurf mat name dfile dfile dfile m n"
29 [
30 .B \-s
31 ][
32 .B \-o
33 ]
34 .SH DESCRIPTION
35 .I Gensurf
36 produces either a RADIANCE scene description or a Wavefront .OBJ
37 file of a functional surface defined by the parametric equations
38 .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 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 A single "usemtl" statement will appear at the beginning
74 of the .OBJ output, echoing the modifier given on the command line.
75 .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 genbox(1), genrev(1), genworm(1), icalc(1),
119 obj2mesh(1), obj2rad(1), rpict(1), rvu(1), xform(1)