--- ray/doc/man/man1/gensurf.1 2003/03/11 19:20:21 1.1 +++ ray/doc/man/man1/gensurf.1 2021/04/15 23:51:04 1.8 @@ -1,7 +1,7 @@ -.\" RCSid "$Id" +.\" RCSid "$Id: gensurf.1,v 1.8 2021/04/15 23:51:04 greg Exp $" .TH GENSURF 1 11/15/93 RADIANCE .SH NAME -gensurf - generate a RADIANCE description of a curved surface +gensurf - generate a RADIANCE or Wavefront description of a curved surface .SH SYNOPSIS .B "gensurf mat name 'x(s,t)' 'y(s,t)' 'z(s,t)' m n" [ @@ -10,6 +10,8 @@ gensurf - generate a RADIANCE description of a curved .B "\-f file" ][ .B \-s +][ +.B \-o ] .br .B "gensurf mat name 'x(s,t)' 'y(s,t)' dfile m n" @@ -19,16 +21,20 @@ gensurf - generate a RADIANCE description of a curved .B "\-f file" ][ .B \-s +][ +.B \-o ] .br .B "gensurf mat name dfile dfile dfile m n" [ .B \-s +][ +.B \-o ] .SH DESCRIPTION .I Gensurf -produces a RADIANCE scene description of a -functional surface defined by the parametric equations +produces either a RADIANCE scene description or a Wavefront .OBJ +file of a functional surface defined by the parametric equations .I x(s,t), .I y(s,t), and @@ -54,9 +60,21 @@ in any number of and .I \-f options. +The variable and function definitions in each +.I \-f source +file are read and compiled from the RADIANCE library where it is found. The .I \-s option adds smoothing (surface normal interpolation) to the surface. +The +.I \-o +option produces a Wavefront .OBJ file rather than a RADIANCE +scene description. +This is most useful as input to the +.I obj2mesh(1) +program for producing a compiled mesh. +A single "usemtl" statement will appear at the beginning +of the .OBJ output, echoing the modifier given on the command line. .PP Rough holes may be cut in the mesh by defining a valid(s,t) function. Where this function is positive, polygon vertices will be produced. @@ -93,11 +111,14 @@ gensurf crystal ball 'sin(PI*s)*cos(2*PI*t)' 'cos(PI*s To generate a 10x20 smoothed height field from 12 recorded vertex z values: .IP "" .2i -gensurf dirt ground '10*s' '20*t' height.dat 2 3 -s +gensurf dirt ground '10*s' '20*t' height.dat 2 3 \-s +.SH ENVIRONMENT +RAYPATH the directories to check for auxiliary files. .SH AUTHOR Greg Ward .SH BUGS The smoothing operation requires that functions be defined beyond the [0,1] boundaries of s and t. .SH "SEE ALSO" -calc(1), genbox(1), genrev(1), genworm(1), rpict(1), rview(1), xform(1) +genbox(1), genrev(1), genworm(1), icalc(1), +obj2mesh(1), obj2rad(1), robjutil(1), rpict(1), rvu(1), xform(1)