Reposting of Hidden Surface documentation: man directory

Ken Turkowski ken at turtleva.UUCP
Sun Jan 8 11:03:16 AEST 1984


echo x - man
mkdir man
echo x - man/bb_to_txtr.1l
cat >man/bb_to_txtr.1l <<'!Funky!Stuff!'
.TH BB_TO_TXTR 1L local
.SH NAME
bb_to_txtr - make a texture image file from a section of the big buffer
.SH SYNOPSIS
bb_to_txtr [filename]
.SH DESCRIPTION
Takes an output file name (prompted for if not in the command line) and
writes a texture image file in it.  Texture images consist of 128 by 128
pixels each represented by 5 shorts.  The 5 parameters represented are
red, green, blue, transmittance and shininess, all ranging from 0-255.
.sp
A 128 by 128 section of the big buffer is read to produce the file.  At
this writing the most significant byte (coverage) is used for
transmittance
and the shininess parameter is ignored.  The portion of the big buffer
read is taken centered on the current view.
When the buffer is zoomed by a factor of 4, you see about 160 by 121
pixels.
Thus what you see is 16 pixels wider on left and right and about 4
pixels
narrower on top and bottom than what you get for a texture pattern.
.SH SOURCE
/usr/src/local/pic_utils/bb/bb_to_txtr.c
.SH SEE ALSO
bbzoom(1L),
mk_txcoords(1L),
world(1L),
fb_to_txtr(1Paul)
.SH AUTHOR
F. C. Crow
!Funky!Stuff!
echo x - man/bbackfill.1l
cat >man/bbackfill.1l <<'!Funky!Stuff!'
.TH BBACKFILL 1L Local
.SH NAME
bbackfill - fill in partly covered pixels with background
.SH SYNOPSIS
bbackfill [redbyte grnbyte blubyte [Xres Xofset Yres Yofset]]
.SH DESCRIPTION
.nf
WARNING! THIS PROGRAM IS OUT OF DATE!
PLEASE USE BGSHOW INSTEAD!
.fi
.br
.sp
Using the most significant byte to indicate how much of the pixel has
been covered by closer surfaces, bbackfill will add the input color
in sufficient amount to adjust for the partial coverage.
The arguments [redbyte grnbyte blubyte] indicate what color the
background
should be, where the three arguments may have the range 0.0-1.0 or
0-255.
The default background is 0 0 0. The entire screen will be backfilled
unless
the arguments [Xres Xofset Yres Yofset] are given. In that case, the
backfilled
area is Xres pixels wide, Yres pixels deep and is bounded by Xofset on
the
left and Yofset on the bottom.
Bbackfill is used as the
last stage in an anti-aliasing front-to-back hidden-surface algorithm.
.SH FILES
/dev/bb
.br
.sp
libraries:
.ta
lbb, lm
.SH SEE ALSO
bb*(1L), bb(3L)
.SH AUTHOR
F. C. Crow
!Funky!Stuff!
echo x - man/bin_tags.1l
cat >man/bin_tags.1l <<'!Funky!Stuff!'
.TH BIN_TAGS 1L local
.SH NAME
bin_tags - add magic number tags to binary files
.SH SYNOPSIS
bin_tags [filename]
.SH DESCRIPTION
Adds 4-byte binary code word to beginning of file to make file
identifiable
as to format.  Bin_tags assumes that the filename uses one of the
standard
extensions.  Non-standard extensions should be fixed by renaming the
file.
The user will be prompted for a file name if in is left out of the
command line.
The first 4 bytes of the file are printed before modifying the file to
prevent
inadvertantly adding double tags to a file.
.SH AUTHOR
Frank Crow
.SH DIAGNOSTICS
Non-standard extensions are rejected.
The original file is saved as filename.bak in case anything goes wrong
.SH STATUS
A temporary fix to be expunged from the system in the near future
!Funky!Stuff!
echo x - man/ftb_zsort.1l
cat >man/ftb_zsort.1l <<'!Funky!Stuff!'
.TH FTB_ZSORT(1L) local
.SH NAME
ftb_zsort - depth sorted polygon display algorithm with texture mapping
.SH SYNOPSIS
ftb_zsort
.SH DESCRIPTION
Takes input of the form specified in "man hsalg-input" and produces
full-color images of polygon objects on the 32-bit frame buffer only.
Will
load proper pan and zoom coefficients for animations in big buffer.

Images are anti-aliased and may use highlights
and transparency with up to 16 light sources of arbitrary colors.
Texture
may be painted on surfaces for which a texture coordinate file exists.
(See
man mk_txcoords).

Polygon objects must be non-intersecting and made of polygons which are
all
of roughly the same size, in general.  Priority is determined merely on
the
z-coordinate of the closest vertex (in eye space).
.SH SOURCE
~frank/hsalgs/c_code/[ftb_zsort.c u_tiler.c ftb_pxls.c]
.SH SEE ALSO
scn_assmblr(1L) poly_zsort(1L) mk_txcoords(1L) bb_to_txtr(1L)
.SH AUTHOR
F. C. Crow
!Funky!Stuff!
echo x - man/hsalg_input.5l
cat >man/hsalg_input.5l <<'!Funky!Stuff!'
.TH HSALG_INPUT 5L local
.SH NAME
hsalg_input - standard display algorithm input format
.SH DESCRIPTION
The following keywords are used to specify input to hidden-surface and
other
display algorithms.  All keywords are optional, although pictures
without some
of these, for example "object" would be pointless.  A number of keywords
are
applicable only to polygon objects for historical reasons.  We hope that
other
surface-specific keywords won't be necessary.  Non-applicable keywords
are
ignored.
.TP
device <device> <frame #>
Specify display device, quadrant, etc.;
frame # for sequences ( see scene(5L) )
.TP
light x y z r g b radius
Position, color and radius covered by
light (one entry for each light source).
The radius is used for square-law attenuation.
.TP
view_angle float
Angle included in the field of view (default = 45.).
.TP
object filename
Object description file (".obj" file)
(remaining attributes always apply to most recent object).
.TP
no_clipping
No clipping needed (default clips).
.TP
transform
Eyespace transform for object (4 rows of 4 floats).
The matrix goes from (longitude latitude altitude)
to eyespace (left-handed 3rd coordinate is depth).
.TP
transmittance float1 float2
The transmittance keyword identifies the line that gives
the transmittance and the rolloff power for the object.
The transmittance may vary from 0.0 (opaque) to 1.0
(perfectly transparent).
The rolloff power may vary from (1.0 to 3.0) and controls
the opacity of the object as the cosine of the surface
normal changes.
.TP
shininess float
The shininess keyword identifies the line containing the
highlight exponent necessary for Phong shading.  The
highlight exponent usually varies from 100.0 to 500.0.
.PP
The keywords may appear in any order.  Keywords which affect an object
always
refer to the last one specified.
.SH SEE ALSO
shape_data(5L) scene(5L)
.SH AUTHOR
F. C. Crow
!Funky!Stuff!
echo x - man/hsalgs.treedoc
cat >man/hsalgs.treedoc <<'!Funky!Stuff!'
.:
data	drivers	hsalgs

./data:
code		- programs for modifying objects, defining textures, etc.
dg		- machine-generated shapes
glassware	- files for the champagne glass
hand_built	- laboriously hand-edited shapes
terrains	- tilings of the plane
utah		- shapes from early Utah days (<1975)
xport_data.scn	kln_champ.scn	banana.scn	- files describing arrangements
of objects

./data/code:
bb_to_txtr.c	- make a texture file from pixels in the frame buffer
bin_tags.c	- put "magic number" headers at the beginning of binary files
circle_eye.c	- generate a script to move the eyepoint in a circular path
color_bin.c	- translate an ASCII color file to binary
make_bin.c	- translate an ASCII shape file to binary
make_obj.c	- generate a properly formated ".obj" file by prompting the user
make_texture.c	- generate some algorithmicallly-defined textures
makefile
mk_txcoords.c	- generate a texture coordinate file covering a regular polygon mesh
move_eye.c	- generate a script moving the eyepoint along a periodic function
rescale_bin.c	- scale a shape by changing the values in its ".det" file
txtr_bin.c	- translate a texture file to binary form

./data/dg:
tube.obj	tube.std	- cylindrical shape
tubend.obj	tubend.std	- conical shape

./data/glassware:
champagngl.com	- command file for generating texture coordinates (input to mk_txcoords.c)
champagngl.obj	- top-level description of champagne glass
champagngl.std	- shape (points and polygons) of champagne Glass

./data/hand_built:
icosa.obj	- top-level description of icosahedron
icosa.tx_std	- texture cordinates for icosahedron
icosa_pcl.obj	- top-level description of icosahedron with polygon colors
icosa_pcl.std	- icosahedron polygon colors
icosa_vcl.obj	- top-level description of icosahedron with vertex colors
icosa_vcl.scn	- script for image using icosahedron vertex colors
icosa_vcl.std	- icosahedron vertex colors
square.obj	- top-level description of square
square.scn	- script for image using square
square.tx_std	- shape for squre with texture coordinates
trunc_pyr.obj	- top-level description of truncated pyramid
trunc_pyr.std	- shape file for truncated pyramid
trunc_pyr.tx_s	- texture coordinates for truncated pyramid

./data/terrains:
chkrbd.obj	chkrbd.std	- files describing checkerboard pattern of polygons

./data/utah:
banana.obj	banana.std	- the banana
egg.obj		egg.std		- the egg

./drivers:
bb.h		bb_util.c	fbutil.c

./hsalgs:
Makefile
bbackfill.c	- fill pixels not completely covered by closer surfaces with background color
bbox_task.c	- generate bounding boxes of objects and send them to display
error.c		- Display error messages
ftb_pxls.c	- calculate blended pixel values from coverage, old value, etc.
ftb_zsort.c	- depth-sort and display polygonal objects (handles texture)
hiq_pxls.c	- fancier pixel value calculator (subsamples small highlights, etc.)
hiq_tiler.c	- fancier tiler (subsamples small highlights, etc.)
jag_tiler.c	- tiler without antialiasing
obj_sort.c	- sorts objects to determine display order
poly_drawl.c	- generates line-drawings from polygons
poly_zsort.c	- depth-sort and display polygonal objects
ptiler.c	- simple tiler for pseudo-color displays
regurgitate.c	- print back output from scn-assmblr rather than starting display
rgbtiler.c	- simple full-color tiler
scn_assmblr.c	- front-end for display system, script parser, etc.
scn_assmblr.h	- header file shared by system modules
shiny_tlr.c	- tiler for full-color, anti-aliasing and highlights
task_master.c	- calls display algorithm for each object or cluster in depth order
tiler.c		- tiler (?)
u_tiler.c	- "universal" tiler (interpolates over an arbitrary number of supplied parameters)
update_obj.c	- changes a ".obj" file as indicated by input to scn_assmblr


!Funky!Stuff!
echo x - man/hueload.1l
cat >man/hueload.1l <<'!Funky!Stuff!'
.TH HUELOAD 1L local
.SH NAME
hueload,vhueload \- load gamma compensated ramps into a frame buffer
.SH SYNOPSIS
hueload
.br
vhueload
.SH DESCRIPTION
Used by
.I scn_assmblr
to load a frame buffer's color map for display output from
.I poly_zsort,
.I ftb_zsort,
etc.
.PP
The first line of input has the format:

.ce
device quadrant divisions frame#

.IP device
is the name of the frame buffer.
.IP quadrant
is which quadrant to display on.
.IP divisions
is ignored.
.IP frame#
is ignored.
.PP
The following lines all have the format:

.ce
red_factor green_factor blue_factor

These factors are as usual.
.PP
The first color given is the background color.
It will occupy only one position of the color map.
The remaining colors are allocated equal parts of the rest of the color
map.
The ramps will be loaded in the order that the colors were named.
.SH EXAMPLES
aed 8           # use aed
.br
0.2 0.3 0.6     # background kinda bluish
.br
1 1 1           # grey ramp
.br
1 1 0           # followed by a yellow ramp
.SH FILES
/dev/aed0
.br
/dev/bb0
.br
/dev/fb0
.br
/fr/$user/vbb (vhueload)
.SH SOURCE
~local/scn/little/hueload.c
.SH SEE ALSO
cmap(1L), scenes(1L)
.SH AUTHOR
Franklin C. Crow
.br
Maintained by Julian Gomez
.br
Virtual buffer by Julian Gomez
!Funky!Stuff!
echo x - man/make_bin.1l
cat >man/make_bin.1l <<'!Funky!Stuff!'
.TH MAKE_BIN 1L local
.SH NAME
.nf
make_bin  - convert ASCII object description files to binary form
color_bin - convert ASCII polygon color or vertex color files to binary
txc_bin  - convert ASCII texture coordinate files to binary
.fi
.SH SYNOPSIS
.nf
make_bin  <inputfile >outputfile
color_bin <inputfile >outputfile
txc_bin  <inputfile >outputfile
.fi
.SH DESCRIPTION
.I Make_bin
searches for the "data" keyword in a ASCII standard object description
file (see "man shape_data") and converts it to a binary shape file.
.PP
.I Color_bin
takes a file in a format similar to the ASCII standard object
description.  However, only one number is read after the "data" keyword
and
each line thereafter is expected to contain 4 numbers, a value for red,
green
blue and transmittance respectively.  All color values range from 0.-1.
.PP
.I Txtr_bin
reads a file in a manner similar to
.I color_bin.
However, each line
represents the texture coordinates at the vertices of a polygon or
patch.
Therefore the first number on the line represents the number of
vertices.
Succeeeding numbers are X-Y coordinate pairs representing the texture
coordinates for each vertex in turn.
.SH EXAMPLES
.nf
Typical input files for the above:

title   shape data file for a square
data    4   1
 0.  0.  0.
 0.  1.  0.
 1.  1.  0.
 1.  0.  0.
 4  1  2  3  4

title   vertex color file for a square
data    4
 .9 .8 .2 .0
 .8 .9 .2 .0
 .2 .8 .9 .0
 .9 .2 .8 .0

title   polygon color file for a square
data    1
 .9 .8 .2 .0

title   texture coordinate file for a square
data    1
 4   0. 0.   1. 0.  0. 1.  1. 1.
.fi
.SH SEE ALSO
mk_txcoords(1L), shape_data(5L), dumpdet(1L), dumpnbr(1L), dumppcl(1L),
dumptxc(1L), dumpvcl(1L)
.SH AUTHOR
F. C. Crow
.SH BUGS
Color_bin always tags file as a .pcl file.
!Funky!Stuff!
echo x - man/make_obj.1l
cat >man/make_obj.1l <<'!Funky!Stuff!'
.TH MAKE_OBJ 1L local
.SH NAME
make_obj - generate .obj file
.SH SYNOPSIS
make_obj
.SH DESCRIPTION
Prompts user for a file name, title, display program name, and
binary detail file name.  Then produces properly formatted file
as described by
.IR shape_data (5L).
.PP
Appends
.B .obj
or
.B .det
whenever necessary.
.SH EXAMPLES
.nf
% make_obj
object file name: icosa
title: Icosahedron made by Frank
display routine (default poly_zsort):
detail file (default is icosa.det):
% make_obj
object file name: mushroom
title: reality away !
display routine (default poly_zsort): ftb_zsort
detail file (default is mushroom.det): ~julian/g/d/mushroom
%
.fi
.SH SEE ALSO
shape_data(5L)
.SH AUTHOR
Julian E. Gomez
.br
Original program by F. C. Crow
!Funky!Stuff!
echo x - man/mk_txcoords.1l
cat >man/mk_txcoords.1l <<'!Funky!Stuff!'
.TH MK_TXCOORDS 1L local
.SH NAME
mk_txcoords - make texture coordinates for an object
.SH SYNOPSIS
mk_txcoords filename stripsize numstrips x1 y1  x2 y2  x3 y3  x4 y4
.SH DESCRIPTION
Produces a texture coordinate file defining the mapping of a square
imagemake_obj.l      mk_txcoords.l
of texture onto a polygonal mesh of quadrilaterals.  The polygonal mesh
must be organized as a matrix with "numstrips" columns of polygons each
of which
contains "stripsize" polygons.
.br
.nf
Hint: for objects created as a solid of revolution
      stripsize == number of points on a profile - 1
      numstrips == number of points on the path - 1^[
.fi
Four coordinate pairs must be supplied. The
first (x1,y1) defines what part of the texture file is mapped to the
beginning
of the first strip of polygons. The second (x2,y2) shows the mapping
from
the texture image to the end of the first strip of polygons. The third
and
fourth coordinate pairs go to the beginning and end of the last strip of
polygons.
.SH EXAMPLES
mk_txcoords object.txc 15 20  0. 0.  1. 0.  0. 1.  1. 1.

The above would map one instance of the texture image over the entire
object
which might be a surface of revolution defined by a path of 21 points
used
15 times in a revolution.

mk_txcoords object.txc 15 20  0. 0.  4. 0.  0. 10.  4. 10.

The above would repeat the texture pattern 40 times over the surface, 4
times
around and 10 times from top to bottom.

mk_txcoords object.txc 15 20  0. 0.  4. 1.5  1.5 10.  5.5 11.5

The above would skew the mapping onto the surface so that it would
appear
to swirl around the surface rather than being pasted on.
.SH FILES
libraries:
.ta
lm
.SH SEE ALSO
txc_bin(1L), bb_to_txtr(1L), shape_data(5L)
.SH AUTHOR
F. C. Crow
.SH STATUS
working but subject to frequent upgrades
!Funky!Stuff!
echo x - man/poly_drawl.1l
cat >man/poly_drawl.1l <<'!Funky!Stuff!'
.TH POLY_DRAWL 1L local
.SH NAME
poly_drawl - draw polygonal objects on line-drawing devices
.SH SYNOPSIS
poly_drawl
.SH DESCRIPTION
Used by scn_assmblr to display polygonal objects on line-drawing
devices.
Takes input in the form specified by "man hsalg_input".
.SH EXAMPLES
.nf
poly_drawl

device meg

object icosahedron.det

transform
                1 0 0 0
                0 1 0 0
                0 0 6 0
                0 0 0 1
.fi
.SH FILES
/usr/local/poly_drawl /usr/local/[crtdrawl megdrawl vtdrawl h19drawl]
.SH SEE ALSO
hsalg_input(5L), scn_assmblr(1L)
.SH AUTHOR
F. C. Crow
!Funky!Stuff!
echo x - man/poly_zsort.1l
cat >man/poly_zsort.1l <<'!Funky!Stuff!'
.TH POLY_ZSORT 1L local
.SH NAME
poly_zsort, vpoly_zsort - depth sorted polygon display algorithm
.SH SYNOPSIS
poly_zsort
.br
vpoly_zsort
.SH DESCRIPTION
Takes input of the form specified in "man hsalg-input" and produces
images of polygon objects on the frame buffers.
Can produce smooth-shaded pseudo-color images
on the smaller frame buffers.
Will load proper pan and zoom coefficients for animations in big buffer.
.PP
Full-color images on the big buffer can be anti-aliased and may use
highlights
and transparency with up to 16 light sources of arbitrary colors.
.PP
.I vpoly_zsort
draws virtual big buffer images
.PP
Polygon objects must be non-intersecting and made of polygons which are
all
of roughly the same size, in general.  Priority is determined merely on
the
Z-coordinate of the closest vertex (in eye space).
.SH FILES
/dev/aed
.bb
/dev/bb
.bb
/dev/fb?
.bb
/fr/$user/vbb.bbl
.SH SOURCE
~local/scn/poly_zsort/
.SH SEE ALSO
scn_assmblr(1L)
.SH AUTHOR
F. C. Crow
.br
Virtual buffer by Julian Gomez
!Funky!Stuff!
echo x - man/scenes.5l
cat >man/scenes.5l <<'!Funky!Stuff!'
.TH SCENES 5L local
.SH NAME
scenes - standard scene definition syntax
.SH DESCRIPTION
The scene definition is intended for arranging objects in a scene,
establishing lighting and viewing parameters, and controlling the
production of images on various graphic output devices.  Object
attributes
such as texture, data type,
faceting, etc. are defined elsewhere (see "man shape_data").
.PP
Default parameters are set up for looking at an object centered on the
origin and about 2 units in diameter.  Objects are a dull white by
default
and one white light source is defined.  Fifteen additional light sources
called "light1" through "light15" are defined and may be turned on by
"placing" them.  Default positions for predefined objects (eyepoint,
center
of interest) are shown below.
.PP
Lights, the eyepoint, center_of_interest and other special
names may be treated as objects in general.  Thus lights may be painted
with
a color, placed, and scaled to vary their strength at a distance.
Ambient
light is a characteristic of each object (30% of maximum, by default).
Angle
included in the field of view is an explicit keyword input
(45 degrees, default).
.TP
Defaults
.sp
eyepoint             0     5      10
.br
center_of_interest   0     0       0
.br
light             1000   500   -1000
.br
background color    .2    .3      .6
.SH Keywords and format for scene description
.SH

.SH User conveniences
.SH

.TP
dump_to <filename>
dump current image description to
.I filename
.TP
show <object>
show active object descriptions
.TP
?
help message (list of commands)
.TP
!<shell command>
execute shell command
.sp
.ti -5
@<filename>
.br
temporarily take input from named input stream
.TP
#<comment>
comment line for explanations
.SH Image production commands
.SH

.TP
display_on <device> [<frame_number>]
generate image, quality determined by device (no background fill)
.TP
render_on <device> [<frame_number>]
generate full-quality image or line drawing as appropriate
.TP
sketch_on <device>
generate image using just bounding boxes
.SH Object attributes and positioning
.SH

.TP
attach <object> to <object> at <point>
set up object hierarchy
.TP
blend <object> to <object> by <fraction>
blend shapes
.TP
call <filename> by <object>
read in object description and tag it with object name
(file used as image if <object> is "background" or "foreground")
.TP
delete <object>
remove object from further use (deleting lite just turns it off)
.TP
detach <object>
detach object (and descendents) from hierarchy
.TP
paint <object> with <color> [<gloss> [<transmittance>
 [<rolloff power>]]]
assign color and surface attributes to object (modifies .obj file)
.TP
place <object> [on <object>] at <point>]
position object with optional support relationship
(placing a light turns it on)
.TP
replace <object>
read in object description anew (for dynamically changing shapes)
.TP
rotate <object> about <axis> by <number> [then
           about <axis> by <number>]
.br
rotation about arbitrary axis
(up to four may be concatenated by using "then")
.TP
set <global attribute> to <number>
sets various global attributes (see below)
.TP
scale <object> by <point>
scale object on its 3 axes (first axis is range for light)
.SH Metasymbols
.SH

.TP
<axis> :== <point> <point>
.TP
<color> :== <fraction> <fraction> <fraction>
.TP
<global attribute> :== "view_angle" | "tilt_angle" | "ambient_light"
.TP
<gloss> :== <number>
ranges 20-500, typical 200 (background gloss used as ambient light)
.TP
<rolloff power> :== <number>
ranges .5-2.0 (power on transmittance function)
.TP
<transmittance> :== <fraction>
.TP
<device> :== "meg" | "vt" | "crt" | "h19" |
        "fb" | "fb" <quadrant> | "aed"
        "bb" | "bb" <bits> <screen_division> |
        "file" <filename> | "dummy"
.br
<quadrant> :== "1" | "2" | "3" | "4"
.br
<bits> :== "1" | "2" | "4" | "8" | "16" | "32"
.br
<screen_division> :== "1" | "4" | "9" | "16" | "25" |
                      "36" | "49" | "64"
.TP
<filename> :== existing UNIX object description file
either local or complete path name
.TP
<fraction> :== floating pt. number between 0.0 and 1.0
.TP
<frame_number> :== integer
.TP
<number> :== floating pt. number
.TP
<object> :== "all" (where appropriate) |
        "eyepoint" | "center_of_interest" |
        "light" | "light1"-"light15" |
        "background" | "foreground" |
.ti +8
user-defined string
.TP
<point> :== <number> <number> <number>
3-d coordinate triple (represent horizontal, vertical, and depth
respectively)
.SH SEE ALSO
shape_data(5L), hsalg_input(5L)
.SH AUTHOR
F. C. Crow
!Funky!Stuff!
echo x - man/scn_assmblr.1l
cat >man/scn_assmblr.1l <<'!Funky!Stuff!'
.TH SCN_ASSMBLR 1L local
.SH NAME
scn_assmblr \- priority sorts objects for display
.SH SYNOPSIS
scn_assmblr [-c]
.SH DESCRIPTION
Takes input described by "man scenes".  Sorts objects to priority order
based on bounding box tests, etc.  Objects must be defined as described
by
"man shape_data".
.PP
Scan-converts objects in priority order
by starting display algorithms specified in the object descriptions and
piping input in the format of "man hsalg_input" to them.
.IP -c
Forces all visible objects in a scene to be in the same cluster.
.SH FILES
All of the graphics devices
.SH SOURCE
~local/scn/big
.SH SEE ALSO
scenes(1L), poly_zsort(1L), ftb_zsort(1L)
.SH AUTHOR
F. C. Crow


!Funky!Stuff!
echo x - man/shape_data.5l
cat >man/shape_data.5l <<'!Funky!Stuff!'
.TH SHAPE_DATA 5L local
.SH NAME
shape_data - standard format for object descriptions
.SH DESCRIPTION
Naming conventions for data files:
.TP
*.det
Files in standard binary format for polygonal shapes
.sp
      - long code               (4 byte ascii file extension)
      - short #pts, #polys
      - float pts[#pts][3]
      - for each of #polys polygons:
       short #pts/pol, ptrs[#pts/pol]
.TP
*.obj
Files in the human-readable data structure. None of the
specified keyword lines are mandatory although certain
programs require the presence of particular keyword lines.
.TP
title
Title for the data
.TP
#
Rest of line is a comment
.TP
detail *.det
File containing binary point and polygon data.
.TP
display filename
Executable file which displays from detail file format
(e.g. poly_zsort, ftb_zsort, fbdisp)
.TP
data <#points> <#polygons>
The header for  the ascii vertex and polygon data of an object.
This header is followed by
the X, Y and Z coordinates of each vertex, and then the polygons of
the object. Each polygon entry has the format: <#points in polygon>
<point_indices>.
.TP
data_info  <number> vertices  <number> polygons  <number> patches
Size information on data for predicting display time.  Fields will vary.
.TP
bounding_box Xmn Xmx Ymn Ymx Zmn Zmx
Bounding box for object in definition space
.TP
vertex_colors *.vcl
File containing colors for vertices of shape (see "man color_bin")
.sp
.TP
poly_colors *.pcl
File containing colors for polygons of shape (see "man color_bin")
.TP
texture *.txc  *.txtr
File containing texture coordinates  followed by file containing
texture image
(see "man mk_txcoords" and "man bb_to_txtr")
.TP
poly_neighbors *.nbr
File containing neighboring polygon pointers
.TP
centroid&radius x y z r
Centroid and radius of enclosing sphere
.TP
poly_expansion filename
Executable file that expands detail file to polygons
.TP
type datatype characteristics
Type of surface element and further useful info
(for "polygon", "open" and "faceted" are characteristics)
.TP
color r g b
Overall color of object.  r, g, and b are real numbers in the
range (0.0 - 1.0).
.TP
transmittance float float
The first number (transmittance) is the fraction of incident
light passing through the surface.  Therefore, 0 is opaque
and 1 is totally transparent (invisible).  Typical values are
from .5 to .9 for transparent objects.  The second value (rolloff)
governs how the transparency changes as the angle of the light
striking the object changes.  This makes the edges of a transparent
object look less transparent.  Typical values are in the range .1 to
1.5 with small numbers being more etherial (thinner) and large numbers
being thicker or milkier.
.TP
shininess float
This parameter governs how large the highlights on an object will be.
Typical values are in the range 100 to 200.  Values smaller than 100
tend to make large (read as expensive computationally) highlights.
Values larger than 200 make small highlights.  Very large values
( >> 300 ) may be subject to aliasing problems.
.sp
.TP
*.pcl
This is the polygon color file. It is in binary with the following
format.
.sp
      - long code               (4 byte ascii file extension)
      - short #polys
      - float colors[#polys][4]
.sp
The colors are red, green, blue, and transparency.  They range from
zero to one.
.TP
*.vcl
This is the vertex color file. It is in binary with the following
format.
.sp
      - long code               (4 byte ascii file extension)
      - short #pts
      - float colors[#pts][4]
.sp
The colors are red, green, blue, and transparency.  They range from
zero to one.
.TP
*.nbr
This is the neighboring polygon file.  It is in binary with
the following format.
.sp
      - long code               (4 byte ascii file extension)
      - short #polys
      - for each of #polys polygons:
       short #pts/pol, pointers[#pts/pol]
.sp
The pointers are to the polygon which neighbors this polygon across
the edge from this point to the next point.
.TP
*.txc
This is the texture coordinate file.  It is in binary with the
following format.
.sp
      - long code               (4 byte ascii file extension)
      - short #polys
      - for each of #polys polygons:
       short #pts/pol, float coords[2]
.sp
The coords are the coordinates within the texture image (.txtr).  The
texture image has the coordinates of the unit square (0,0) (0,1) (1,1)
(1,0).  If the texture coordinates are outside of the (0 - 1) range,
then they are mapped as if the .txtr files are replicated side by side
and end to end throughout all infinity.
.SH EXAMPLES
.nf
.TP
cutcube.obj

title           Simple object - cube with one corner cut off
display         poly_zsort
detail          ~frank/data/hand_built/smpobj.det
type            polygon faceted
bounding_box    -1 1 -1 1 -1 1
data   10    7
  1.0  -1.0  -1.0
 -1.0  -1.0  -1.0
 -1.0  -1.0   0.0
 -0.0  -1.0   1.0
  1.0  -1.0   1.0
 -1.0  -0.0   1.0
 -1.0   1.0  -1.0
  1.0   1.0  -1.0
  1.0   1.0   1.0
 -1.0   1.0   1.0
       5       1       2       3       4       5
       4       8       1       5       9
       4       7       8       9      10
       5       2       7      10       6       3
       4       8       7       2       1
       5       5       4       6      10       9
       3       3       6       4
color           1 0 1
shininess       0.5
transmittance   0.5 0.5
vertex_colors  ~glenn/frctl/cube.vcl
.SH SEE ALSO
scenes(5L), hsalg_input(5L), make_bin(1L), mk_txcoords(1L),
bb_to_txtr(1L)
.SH AUTHOR
F. C. Crow
!Funky!Stuff!
echo x - man/tiler.1l
cat >man/tiler.1l <<'!Funky!Stuff!'
.TH TILER 1L local
.SH NAME
tiler - tiler which takes piped input
.SH SYNOPSIS
tiler
.SH DESCRIPTION
Tiler offers polygon tiling capabilities without packaging in the
standard
subroutines.  The input consists of a small set of keywords to identify
the display
device, or specify a polygon.   The "device" keyword specifies a device
as in
"man scenes".  The "polygon" keyword should be accomapnied by a number
representing
the number of vertices in the polygon.  Polygons are then specified by a
line
for each vertex with values for X, Y and color (1 to 3 values).

.SH EXAMPLES
.nf
For a multicolored triangle on the big buffer:

        device bb 24 1 0
        polygon 3
        -.5 -.5 .8 .8 .8
         .5 -.5 .8 .0 .0
         .0  .5 .0 .0 .8

For a triangle on the AED display:

        device aed
        polygon 3
        -.5 -.5 100
         .5 -.5 200
         .0  .5 150

.SH AUTHOR
F. Crow
.SH STATUS
Probably won't change much
!Funky!Stuff!



More information about the Comp.sources.unix mailing list