home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-24 | 67.5 KB | 1,275 lines |
-
-
- USER'S GUIDE TO SURFMODL 3.00C
-
-
- By Kenneth E. Van Camp
- November, 1991
-
-
- TABLE OF CONTENTS
-
- INTRODUCTION ............................................... 2
-
- REFERENCES ................................................. 3
-
- USING SURFMODL ............................................. 4
-
- INTERACTIVE OPERATION ...................................... 5
-
- CONFIGURATION/INITIALIZATION FILE FORMAT ................... 9
-
- SURFMODL DATA FILE FORMAT ..................................11
-
- USING PREPROC ..............................................13
-
- PREPROC DATA FILE FORMAT ...................................15
-
- USING PLAYBACK .............................................19
-
- USING REVOLUTION ...........................................21
-
- USING SURFEDIT .............................................23
-
- PRINTING THE SCREEN ........................................25
-
- INSTRUCTIONS FOR RECOMPILING SURFMODL 2.00C ................26
-
- INTERPRETATION OF ERROR MESSAGES ...........................27
-
- SURFMODL USER REGISTRATION .................................29
-
- UPGRADING SURFMODL .........................................30
- INTRODUCTION
-
-
- Surface modeling is the science of producing realistic three-
- dimensional images on a computer display. SURFMODL is a public
- domain surface modeling program that runs on the IBM PC and most
- compatibles. Specifically, it supports the IBM CGA, MCGA, EGA,
- VGA, PC3270, AT&T 6300, and Hercules graphics adapters. There is
- also limited support for the DEC VAXMATE and Commodore Amiga
- computers. Earlier versions of SURFMODL (versions 1.32 and
- earlier) also supported the Sanyo MBC-550 and Heath/Zenith Z100;
- this support does not presently exist in version 3.00C. SURFMODL
- requires only 256K RAM, runs amazingly fast, and is a general-
- purpose surface modeler. It creates displays of three-dimensional
- wire frame images, removes hidden lines, and performs surface
- modeling. Since it is a generalized program, it can be used to
- view any object from any angle, with single or multiple light
- sources. It is accompanied by PREPROC (a general-purpose non-
- interactive preprocessor), REVOLUTE (a special-purpose interactive
- preprocessor for generating objects of revolution), SURFEDIT (a
- general-purpose interactive data file editor), 3DSURF (a special-
- purpose preprocessor for generating 3-D function data files),
- PLAYBACK (a general-purpose program to replay saved SURFMODL
- screens to create animations and demonstrations), and PLAYPAL (a
- program to allow experimentation with the color palette of a VGA or
- Super VGA). This file contains instructions for the use of most of
- these. Source code for all of these utilities (over 5000 lines of
- Turbo Pascal source code) are included on the distribution
- diskettes. At the end of this file are some special notes on
- becoming a registered user of SURFMODL (for free).
- SURFMODL is placed in the public domain. SURFMODL may be
- freely distributed, or distributed at nominal copying/mailing fee,
- but may not be otherwise charged for. No warranty is provided,
- either express or implied. SURFMODL may not be incorporated into
- commercial software without express written permission of the
- principle author:
- Kenneth Van Camp
- RD #1 Box 1255
- East Stroudsburg, PA 18301 U.S.A.
- Surface modeling is often confused with solids modeling,
- which encompasses surface modeling but includes much more. The
- pictorial results are often equivalent, however, so the distinction
- is not important if the objective is to produce spectacular
- graphics. To use common solid modeling terminology, SURFMODL is a
- boundary representation (B-Rep) solid modeler for flat surfaces of
- any number of sides. (All surfaces are polygons of any order.)
- Applications of surface modeling are many and growing. SURFMODL
- was originally written to display finite element data and plots of
- three-dimensional curves. Computer-aided styling, general CAD/CAM,
- and artistic rendering are among the many applications at which
- SURFMODL excells. If you would like to learn more about SURFMODL,
- beyond this user's guide, there are several references provided
- below.
- REFERENCES
-
- 1. Bickel, Marilyn and Sheppard, Gene, "A Simple 3-D Surface",
- Journal of Pascal, ADA & Modula-2, Nov/Dec 1985, 12-23.
-
- 2. Haroney, George, "Graphing Quadric Surfaces", Byte, Dec. 1986,
- 215-224.
-
- 3. Crow, Franklin gw, "Shadow Algorithms for Computer Graphics",
- Computer Graphics, Vol. 11 No. 2, Summer 1977.
-
- 4. Newman, William M. and Sproull, Robert F., Principles of
- Interactive Computer Graphics, 2d ed., McGraw-Hill, New York, 1979.
- USING SURFMODL
-
-
- When used in conjunction with a finite element preprocessor,
- a special-purpose function generation routine, or one of SURFMODL's
- preprocessors, SURFMODL is a complete surface modeling system,
- capable of constructing models of any variety of objects of
- virtually unlimited complexity.
- Because SURFMODL is in the public domain, and is distributed
- with full source code, it has attracted the attention of many PC
- hackers, as well as educators. (There are at least two teachers
- now using SURFMODL in their computer graphics classes.) SURFMODL
- has the distinction of running on many different MSDOS systems, due
- to the support it has received from many users worldwide. Special
- recognition should be given to Kevin Lowey, who converted SURFMODL
- and PREPROC to run under Turbo Pascal 4.0. Kevin also wrote
- PLAYBACK, added SURFMODL support for the Borland Graphics Interface
- (BGI) device independent graphics, and made several other
- enhancements to the program. Ian Murphy should also be recognized,
- for his work adding support for heap memory (to drastically
- increase the maximum number of surfaces SURFMODL can handle on
- machines with at least 512K RAM), and for writing REVOLUTE and
- SURFEDIT. Both of these programs, incidentally, must still be
- compiled under Turbo Pascal 3.01A; the rest of the programs in
- this package must be compiled under Turbo Pascal 4.0 or higher.
- See the file 300NOTES.TXT for notes about compiling this release.
- Amnon Levav should also be recognized, for writing the 3DSURF
- program.
- With version 3.0, the limit on the complexity of the object
- SURFMODL can model is no longer dependent on how it was compiled.
- SURFMODL dynamically allocates all the major arrays in the program,
- so you can run as large a model as will fit in your computer's
- conventional memory. (There is no support for extended or expanded
- memory in SURFMODL, but PLAYBACK supports extended memory for
- longer animations.)
- INTERACTIVE OPERATION
-
-
- Invoking SURFMODL from DOS is accomplished by a command of
- the form:
- SURFMODL [filename [menuopt [keystroke]]]
- where the filename is the optional specification of a SURFMODL data
- file. If a filename is not specified on the command line, it must
- be read by menu options. If a filename is specified on the command
- line, it is read in immediately. If a menu option is also
- specified on the command line, then SURFMODL bypasses the title
- screen and main menu and immediately draws the screen. This can be
- useful for demonstrations, or automating SURFMODL usage through
- batch files. Legal values for menuopt are 2, 3 or 4. Finally, if
- a menu option is given on the command line, then you can also
- optionally add a single-letter keystroke that tells SURFMODL what
- to do when it is all done plotting. Currently the only keystroke
- that makes any sense to use here is 'f', which means that SURFMODL
- should automatically save the screen to a file and exit when it is
- done plotting. (See MOLECULE.DOC and MKMOVIE.BAT for an example of
- how to use this.)
- When SURFMODL is started without the menuopt parameter, or
- with no parameters at all, the main menu appears. Menu options are
- selected by pressing the number corresponding to the option
- desired. Option 0 always returns to the previous menu or, in the
- case of the main menu, exits the program. Pressing the space bar
- or escape key is equivalent to pressing 0.
- Option 5 of the main menu is generally the one you will
- start with. It brings up a file selector box to allow you to
- choose a data file. It searches the current directory for all
- files with a '.SRF' extension. (However, if you set a value for
- the environment variable SURFDIR prior to starting SURFMODL, the
- program will search in that directory instead of the current
- directory.)
- Options 2, 3 and 4 of the main menu will start the plotting
- of the selected data set in wire frame, hidden line removal, or
- surface modeling. During plotting, any time the user hits the 'A'
- key, the plot is aborted and the main menu is returned. When
- plotting is complete, the program will wait for a keypress before
- returning to the main menu. In general, any keypress will return
- the main menu; however there are two special keys: F and P. The
- 'F' key causes the current screen to be saved in a binary file
- called 'myfile.1', where we are assuming the original data file was
- called 'myfile.SRF'. Actually, what happens here is that SURFMODL
- checks for the existence of the file 'myfile.1' before creating it;
- if that file already exists then it tries 'myfile.2', etc. This
- allows you to do several screen saves without having to worry about
- overwriting your old data files.
- PICture files can be replayed with a special program called
- PLAYBACK (described later in this documentation). PICTURE FILES
- ARE SPECIFIC TO THE GRAPHICS DEVICE BEING USED, and cannot be used
- on other devices.
- The 'P' key enters a pause mode, whereby all keystrokes are
- ignored except the letter 'P', which then exits the pause mode.
- Then any other keystroke brings up the main menu.
- Option 1 of the main menu selects the parameters menu. This
- menu allows the user to change numerous viewing, system, and file
- parameters, and to save any of these parameters to disk. All
- numeric inputs in the menus have a common prompt. You are
- presented with the name of the input, the value presently being
- used, and an equal sign. For instance, the prompt to enter a new
- X coordinate for the eye looks like:
- X of Eye ( 100.0 ) =
- Hitting just the <return> key will keep the old value (in this
- case, 100). Typing any number instead will make that be the new
- value used.
- There are six options in the parameters menu. Options 2 and
- 3 set up the viewing angles by selecting three-dimensional
- coordinates of the viewer's eye and focal point. The distance
- between the eye and focal point is important, since SURFMODL uses
- perspective plotting. To start, always place the eye far from the
- focal point to avoid excessive distortion. The focal point is
- important because this point is always placed at the center of the
- screen. If the focal point is placed so that it lies outside the
- limits of the object, a warning message will be issued. This does
- not necessarily mean the plot will not be visible, but is merely
- meant to warn the user that his plot may not be within the limits
- of the screen. If a blank screen results, the user should move the
- focal point closer to the center of the object.
- Option 4 selects the magnification factor. A magnification
- of 1 makes the plot as large as possible without exceeding the
- screen limits in either the X or Y direction. To zoom in on a
- particular area of the figure, be sure to move the focal point to
- that area to center it on the screen, then gradually increase the
- magnification.
- Option 5 of the parameters menu selects the view type. By
- default, all plots are made in perspective view (selection 0).
- This is almost always the option you should choose. The only time
- a non-perspective drawing is done is when one of the orthogonal
- views is selected (X-Y, X-Z, or Y-Z). In this case, the eye
- coordinates are ignored.
- After selecting a view type, you will be asked if you want
- to show the axes. Typing Y will place coordinate system axes,
- labeled X, Y and Z at the lower left corner of all plots
- subsequently produced. This can be useful when trying to decide how
- to adjust eye coordinates. If you select axis drawing, you will be
- asked for the length to draw the axes in the X, Y and Z directions.
- These numbers are input in world coordinates, and should generally
- be about 10-20% of the maximum dimension in the data file.
- Finally, you are asked for a color to draw the axes. Again, make
- sure you choose a valid color for your system.
- Option 6 saves all of your current settings to a file with
- the same name as your data file, but with an extension of .INI.
- When a new data file is read with option 5 of the main menu (or
- specified on the command line), SURFMODL automatically searches the
- disk for the .INI file. If it exists, it is read in and used to
- initialize numerous parameters. Every setting in the parameters
- menu and the lighting menu is copied into the .INI file, plus there
- are some others that are not available in the menus but can be
- manually typed in by editing the .INI file. See the section on
- Configuration/Initialization files.
- There is a small redundancy between the main data file and
- the .INI file. Material properties can be set either in the main
- data file or in the lighting menu, and are therefore saved in the
- .INI file. Since the .INI file is read after the main file, the
- material properties saved in the .INI file will be the final ones
- used in the program.
- Option 1 of the parameters menu selects the lighting menu.
- The lighting menu has five options. Option 1 of the lighting menu
- allows the user to change material properties. The user should
- know what material numbers were specified for the surfaces in the
- data file. R1, R2 and R3 are reflectivity constants, which are
- used in the equation for the reflected light intensity:
- E = I[R1(cos s)**R2 + R3cos n] + Ambient
- where I is the incident light intensity, s is the angle between the
- reflected light vector and the line of sight, n is the angle
- between the light source and the surface normal (i.e., independent
- of the viewing angle), and **R2 means "raised to the R2 power".
- The ambient light intensity can be set for each material
- individually, so that different parts of the solid can be given
- different intensities. (This is one way to make a piece of an
- object stand out against the background of another piece. It can
- also be used to give the illusion of different colors on a
- monochrome monitor.) Light intensity is a real number between zero
- and one, with zero corresponding to black and one to white.
- Ambient light is usually set to a low level of around 0.1 - 0.3.
- The color selected for the material is used for wireframe and
- hidden line plots, and for surface modeling if the dithering option
- is selected. Entering a color number of 0 brings up three
- additional prompts, for the Red, Green and Blue values. These
- values are only used on VGA systems, or for the special Amiga IFF
- version of SURFMODL, SURFIFF (see SURFIFF.DOC for details). These
- values should be in the range from 1 to 256, with representing no
- color and 256 representing full color intensity. To help you
- experiment to find the best color combinations for your SURFMODL
- files, there is a special utility called PLAYPAL. There is no
- documentation on this utility, but it should be fairly self-
- explanatory (there is a help screen by pressing F1).
- Option 2 changes the light source data. Light source number
- one is the primary light source, and is the one used for shadowing
- calculations. The first prompt at this option is for the light
- source number. Entering a zero will delete the last light source
- (if there is more than one). You may add a new light source by
- entering a number that is one greater than the current number of
- light sources. The user is prompted for the new coordinates of the
- light source, and the intensity associated with it. As before,
- this number is usually between zero and one, although larger
- numbers can be used for very bright lighting. On color monitors
- (other than the VGA in 256-color mode), the dithering tends to
- darken the picture, so you may want to experiment with brighter
- lighting. If the lighting is too bright, the picture will become
- washed out and features will be indistinguishable.
- Option 3 changes Epsilon, the constant for Gouraud
- interpolation (smoothing). Entering zero will result in no
- interpolation whatsoever. Entering any other value will invoke the
- Gouraud interpolation option. This is a simple 3-dimensional
- interpolation scheme that will artificially "smooth out" shading of
- curved objects. Because SURFMODL uses flat surfaces for all
- plotting, curved objects (like FACES.SRF, the data file on the
- distribution diskette of my wife's face) normally look very patchy.
- The Gouraud option will smooth this out by averaging shading at the
- nodes and interpolating between them. The only problem with Gouraud
- interpolation is that sharp corners (which you may desire) tend to
- get washed out and look rounded. Therefore, Epsilon is a difference
- option. If the shades of any neighboring surfaces differ by more
- than Epsilon, they are not interpolated. A good value of Epsilon
- is usually around 0.3, but other values may be necessary for
- special cases.
- If you selected the Gouraud option (by entering a value of
- Epsilon greater than 0), then you are next prompted for a random
- shading value. The user is encouraged to enter a random shade of
- 0 the first time he views any Gouraud-interpolated image. If you
- find that the interpolation has created sharp lines of definition
- between neighboring shades, then you may want to go back and add a
- random shade (RandShade). The number you enter for RandShade
- causes SURFMODL to randomly select a number in the range of 0 -
- RandShade for each pixel, and add it to the lighting value for that
- pixel. RandShade should never be greater than one.
- Option 4 selects (or deselects) the shadowing option. This
- option will significantly increase computation time, so it should
- not be used until all viewing and lighting angles have been
- thoroughly tested. This option has never worked very well, so I
- usually disable it in the executable I send out in releases (this
- saves quite a bit of memory).
- CONFIGURATION/INITIALIZATION FILE FORMAT
-
- There are two types of files discussed in this section. One
- is the SURFMODL configuration file, and the other is the data
- initialization files. In fact, these two files have identical
- formats and have a good deal of overlap in functionality. Here's
- the specifics:
- When SURFMODL is started, it looks for a file called
- SURFMODL.CFG. If it doesn't find it in the current directory, then
- it checks to see if you have defined an environment variable called
- SURFDIR (see your MSDOS manual's explanation of the SET command),
- and if so uses the specified directory for locating SURFMODL.CFG.
- If it doesn't find SURFMODL.CFG, it kicks you out.
- If it does find SURFMODL.CFG, that file is read and all the
- options in the file are used to initialize many parameters. Most
- important of these is GRSYS and GRMODE, which set the graphic
- system type and graphics mode to plot in. SURFMODL.CFG is most
- easily created by running the installation program, SURFINST, but
- if you want you can create it manually. SURFINST will
- automatically detect your system type, and present you with a menu
- of available graphics modes for your system (if there is more than
- one).
- When you read in a new file (either by specifying it on the
- command line or through the file selector), SURFMODL checks for a
- file of the same name with a .INI extension. If it exists, all
- parameters saved in the file are read and used to set up the next
- plot. The .INI file is normally created by using the "Save
- Parameters" option in the Parameters Menu.
- Since SURFMODL.CFG and the .INI files share many of the same
- commands, you can use SURFMODL.CFG to set defaults for how you
- usually like to view files. And since the .INI files are always
- read AFTER the SURFMODL.CFG file, any parameters you save in there
- will override the SURFMODL.CFG file whenever you read in that data
- file.
- OK, enough about usage. The file format is pretty simple,
- and includes a number of symbolic commands. Like all the SURFMODL
- data files, an asterisk in the first column of any line makes that
- line a comment, and it is ignored. Otherwise, all lines must be of
- the format:
-
- cmmd: parameters
-
- where 'cmmd' is one of the valid commands, listed below. All
- commands are in capital letters, and you MUST type them that way;
- SURFMODL will not recognize these commands in lower case. Of
- course, you normally will not type in these lines at all, since the
- file will be created automatically with the "Save Parameters"
- option. You might want to edit it to change some values, however,
- since there are some options available through the .INI files that
- are not available through the menus. (The converse is not true,
- however; all menu parameters are saved in the .INI file.)
- Here is a summary of the available commands. An asterisk
- next to the command name means it is valid in both the SURFMODL.CFG
- file and the .INI files; two asterisks means it is only valid in
- the SURFMODL.CFG file; no asterisks means it is only valid in the
- .INI files. Some of the parameters are symbolic, while others are
- numeric. Where they are symbolic, I have followed the description
- with a list of valid symbols, enclosed in braces ({}). For
- example, { ON, OFF } means that valid parameters are the words "ON"
- or "OFF" (case-sensitive, again).
-
- COMMAND PARAMETERS DESCRIPTION
- **GRSYS system Graphic System Type
- **GRMODE mode Graphics Mode
- *VERSION num Version Number of .CFG/.INI file
- *EYE x y z Coordinates of eye
- *FOCAL x y z Coordinates of focal point
- *MAGNIFY val Magnification factor
- *VIEWTYPE type View Type { STD, XY, YZ, XZ }
- MATL n Set Material Number (applies to all
- following MAT* commands)
- MATCONST r1 r2 r3 Set Material Constants
- MATCOLOR n Color to plot material
- MATAMBIENT val Ambient light intensity
- MATRGB r g b Set RGB values for color (overrides
- MATCOLOR on VGA systems)
- *LIGHT n Set Light Number (applies to all
- following LT* commands)
- *LTCOORD x y z Set Light Source Position
- *LTINTENS val Light Source Intensity
- *GOURAUD epsilon Epsilon, or 0 if no smoothing
- *SHADOWING opt Select Shadowing Option? { ON, OFF }
- *AXISSHOW opt Show Axes? { ON, OFF }
- *AXISLEN x y z Length of 3 axes to draw
- *AXISCOLOR n Color to plot axes
- *RANDOM randshade Random number to add to all shades
- (0 to turn off option)
- *BORDERS opt Show the borders of all surfaces?
- { ON, OFF }
- *TEXTCOL n Color# to use in text mode
- *BGCOL n Background color# in text mode
- *GRAPHTEXT n Color# to display title on plots
- **REVVIDEO opt Reverse all text video? { ON, OFF }
- *SHOWTITLE opt Show title on plot? { ON, OFF }
- **XYADJUST val X-Y Adjustment factor (changes aspect
- ratio of screen)
- SURFMODL DATA FILE FORMAT
-
-
- All input in the main data file is line oriented, in free
- format. The separator between lines is a carriage return, and the
- separator between data items on a line is a space, tab or comma.
- Any line that begins with an asterisk (*) in the first column is a
- comment, and is ignored. This is true anywhere AFTER the first
- line of the file, which contains the Title for the file. If you
- put an asterisk on the first line, you'll just get a title that
- starts with an asterisk.
- The data file can be created in any ASCII line editor (like
- Edlin, or the Turbo Pascal editor), or by one of the SURFMODL
- preprocessors.
- Following is the format for the main data file. Numbers in
- brackets indicate the range of legal inputs.
-
-
- Title Line
- (The first line of the data file is the title of the plot.)
-
-
- Version Line
-
- Variable Description Type
- VERSION Version Number of SURFMODL data file format [4] Integer
- (This set of instructions is for data file format number 4.)
-
-
- Control Line
-
- Variable Description Type
- NMATL Total number of materials in solid [1..20] Integer
- NNODES Total number of nodes in solid [1..1024] Integer
- NSURF Total number of surfaces in solid [1..3000/MAXV] Integer
- MAXVERT Maximum number of vertices in any one surface Integer
- NSIDES Number of sides of the surface to use [1..2] Integer
-
- A note on NSIDES: For most objects, use NSIDES=1 to get the
- fastest plotting. NSIDES=2 is really only provided for plotting
- three dimensional functions, and other objects that really don't
- have any "depth" (i.e., the surfaces have a thickness of 0). For
- normal objects (NSIDES=1), the "visible side" of a surface is
- defined as the one that is visible when viewing the surface from a
- side such that the nodes are numbered in a counter-clockwise
- direction. When SURFMODL computes the angle of a surface relative
- to the eye (which it does for both hidden line and shaded plots),
- it will not plot any surfaces that are at an angle of greater than
- 90 degrees from the eye vector (to save plotting time). If you set
- NSIDES=2, then SURFMODL will use BOTH sides of the surface, so
- every surface is guaranteed to be plotted, whether it faces the eye
- or not. (The counter-clockwise rule then doesn't matter.)
-
-
- Material Data (NMATL lines)
-
- Variable Description Type
- R1 First constant of material reflectivity [0..1] Real
- R2 Second constant of material reflectivity Real
- R3 Third constant of material reflectivity [0..1] Real
- COLOR Color # to use for wireframe plotting [1..3] Integer
- AMBIENT Ambient light intensity [0..1] Real
-
-
- Nodal Coordinate Data (NNODES lines)
-
- Variable Description Type
- XWORLD World X coordinate of node Real
- YWORLD World Y coordinate of node Real
- ZWORLD World Z coordinate of node Real
-
-
- Surface Connectivity Data (NSURF lines)
- (NOTE: Connectivity data may be continued onto multiple lines.)
-
- Variable Description Type
- NVERT Number of vertices in this surface [3..MAXVERT) Integer
- MATL Material number of this surface [1..NMATL] Integer
- NODE1 Node number of the first vertex [1..NNODES] Integer
- NODE2 Node number of the second vertex [1..NNODES] Integer
- . . .
- . . .
- . . .
- NODE nvert Node number of the Nverth vertex [1..NNODES] Integer
- USING PREPROC
-
-
- PREPROC is a special-purpose preprocessor for SURFMODL. It
- allows the user to quickly generate SURFMODL data files consisting
- of objects of revolution, extrusion and simple planes. It also
- allows multiple SURFMODL data files to be easily combined. PREPROC
- is not interactive; nor is it graphical. However, the user will
- find it makes certain classes of objects very easy to create. An
- example PREPROC input file, FAN.IN, is on the distribution diskette
- with SURFMODL. The resulting SURFMODL data file, FAN.SRF, can be
- easily created by running PREPROC. For a more elaborate PREPROC
- example, see the file MOLECULE.DOC for instructions on how to
- recreate the APPLE.SRF file that was provided with the release.
- Before describing the details of the preprocessor data file,
- it is important to make a few notes. A PREPROC data file consists
- of three major sections: (1) the initial information, consisting
- of the title of the plot, control variables, and material data;
- (2) codes for the input of one or more solids; and (3) an ending
- code (0) marking the end of the input file. If PREPROC is
- only being used to combine two or more old SURFMODL data files,
- then it is not necessary to specify material data in the initial
- section. Material constants will be used from the individual data
- files, and PREPROC will automatically give them unique numbers to
- avoid conflicts.
- Actually, there is one exception to this rule. If PREPROC
- is started with the /R command-line option then this forces
- material numbers to be "re-used" when SURFMODL data files are read
- in. This is used in the molecule example; in this case the
- material numbers are the same in each file and apply globally to
- all the data files.
- When generating planes or objects of revolution or
- extrusion, material constants must be specified in the initial
- section. Any plane or object of revolution or extrusion can be
- scaled, shifted or rotated in any of the three principle
- directions. It is important to note the order in which these
- operations occur (in case more than one is used in a single
- object). First, the object is rotated. Then it is shifted, and
- finally scaled. Orientation codes are also provided to allow the
- user to easily orient an object of revolution or extrusion about
- one of the major axes. This is actually redundant to the use of
- the rotation angles, but is provided to make complex objects a
- little easier to generate. An orientation code can be 1, 2 or 3,
- corresponding to the X, Y or Z axis, respectively. The designated
- axis will then be the major axis of the object (the axis of
- revolution or extrusion). It is important to note that we will
- refer to R-Z coordinates when speaking of objects of revolution,
- and X-Y-Z coordinates when speaking of objects of extrusion. These
- are not to be taken as true X-Y-Z coordinates unless an orientation
- code of 3 is used. If a different code is specified, then the
- major axis (referred to as 'Z' below), becomes whichever one is
- requested. The other two axes are rotated to maintain a right-
- handed system. Objects of revolution are specified by giving
- the R and Z coordinates of any number of outline points. Once an
- outline is defined, it is rotated about the major axis, generating
- as many intermediate "slices" as specified by NSLICE.
- Objects of extrusion are formed by specifying a top and
- bottom Z coordinate for the two endplanes. Then the coordinates of
- the endplanes are given, in any amount of detail. NOUTLN specifies
- the number of points to be used to describe the outline of the
- endplanes. NEXTRUDE tells how many "slices" to break the object
- into in the Z direction. IQUAD is an option which, when selected
- (1), tells PREPROC to break down the two endplanes into
- quadrilaterals (to save storage space so you may keep MAXVERT=4).
- When deselected (0), IQUAD tells PREPROC to keep your two endplanes
- exactly as you specified them.
- The Planes option is merely to allow placement of large
- quadrilateral surfaces, broken down into many smaller quads. This
- is useful to add a "floor" to an existing data set -- for instance
- if you want to experiment with shadowing. The user specifies four
- sets of coordinates for the corners of a quad, and the number of
- smaller quads to break it into. The numbers NX and NY have nothing
- to do with actual X and Y coordinates, but are merely to give a
- count of the number of smaller quads to use in the two directions
- along the larger quad. The four corners must be specified in order
- so they form a counter-clockwise circular path when viewed from the
- visible side of the surface. NX refers to the number of breaks in
- the direction traveled from node 1 to node 2; NY refers to the
- other direction.
- When using PREPROC to combine two or more old SURFMODL data
- files, material data sets will be added for each surface unless the
- /R option is used. This is to avoid any conflicts between
- different material data sets.
- Invoking PREPROC from DOS is accomplished by a command of
- the form:
- PREPROC [/R] infile outfile
- where infile is the name of the PREPROC data file, and outfile is
- the name to be assigned to the output data file. For instance, to
- preprocess the FAN.IN file, type:
- PREPROC FAN.IN FAN.SRF
- (Note that the extension .IN is arbitrary and can be replaced by
- anything desired. The .SRF extension on the output file is
- recommended, since that is what SURFMODL looks for when bringing up
- the file selector.)
- PREPROC DATA FILE FORMAT
-
-
- All input in the preprocessor data file is line oriented, in
- free format. Following is the format for the preprocessor data
- file. Numbers in brackets show the range of legal inputs.
-
-
- Title Line
- (The first line of the data file is the title of the plot.)
-
-
- Version Line
-
- Variable Description Type
- VERSION Version Number of PREPROC data file format [2] Integer
- (This set of instructions is for data file format number 2.)
-
-
- Control Line
-
- Variable Description Type
- NMATL Total number of materials in solid [0..20] Integer
- MAXVERT Maximum number of vertices in any one surface Integer
- NSIDES Number of sides of the surface to use [1..2] Integer
-
-
- Material Data (NMATL lines)
-
- Variable Description Type
- R1 First constant of material reflectivity [0..1] Real
- R2 Second constant of material reflectivity Real
- R3 Third constant of material reflectivity [0..1] Real
- COLOR Color # to use for wireframe plotting [1..3] Integer
- AMBIENT Ambient light intensity [0..1] Real
-
- [The remaining set of data lines may be repeated as needed until all data has
- been inputted.]
-
-
- Shape Code
-
- Variable Description Type
- CODE Shape Code: 0 - End of data Integer
- 1 - Read old SURFMODL data file
- 2 - Surface of revolution
- 3 - Surface of extrusion
- 4 - Planar quadrilateral surface
-
-
- READFILE Control Line
- (Include this section if CODE = 1.)
- (This line should contain the name of a SURFMODL data file to be read in.)
-
- Scale & Shift Line
-
- Variable Description Type
- XSCALE Scaling factor in X direction Real
- YSCALE Scaling factor in Y direction Real
- ZSCALE Scaling factor in Z direction Real
- XSHIFT Displacement in X direction Real
- YSHIFT Displacement in Y direction Real
- ZSHIFT Displacement in Z direction Real
-
-
- Rotate Line
-
- Variable Description Type
- XROTATE Rotation about X axis (degrees) [-360..360] Real
- YROTATE Rotation about Y axis (degrees) [-360..360] Real
- ZROTATE Rotation about Z axis (degrees) [-360..360] Real
-
-
- REVOLVE Control Line
- (Include this section if CODE = 2.)
-
- Variable Description Type
- NOUTLN Number of points describing outline of surface Integer
- NSLICE Number of angular slices to create [1..] Integer
- MATERIAL Material number of this surface [1..20] Integer
- ORIENT Orientation code [1..3] Integer
-
-
-
- Scale & Shift Line
-
- Variable Description Type
- XSCALE Scaling factor in X direction Real
- YSCALE Scaling factor in Y direction Real
- ZSCALE Scaling factor in Z direction Real
- XSHIFT Displacement in X direction Real
- YSHIFT Displacement in Y direction Real
- ZSHIFT Displacement in Z direction Real
-
-
- Rotate Line
-
- Variable Description Type
- XROTATE Rotation about X axis (degrees) [-360..360] Real
- YROTATE Rotation about Y axis (degrees) [-360..360] Real
- ZROTATE Rotation about Z axis (degrees) [-360..360] Real
-
-
- Outline Coordinates (NOUTLN lines)
-
- Variable Description Type
- R R coordinate Real
- Z Z coordinate Real
-
- EXTRUDE Control Line
- (Include this section if CODE = 3.)
-
- Variable Description Type
- NOUTLN Number of points describing outline of surface Integer
- NEXTRUDE Number of Z slices to create [1..] Integer
- IQUAD Quadrilaterals option [1..2] Integer
- MATERIAL Material number of this surface [1..20] Integer
- ORIENT Orientation code [1..3] Integer
-
-
- Scale & Shift Line
-
- Variable Description Type
- XSCALE Scaling factor in X direction Real
- YSCALE Scaling factor in Y direction Real
- ZSCALE Scaling factor in Z direction Real
- XSHIFT Displacement in X direction Real
- YSHIFT Displacement in Y direction Real
- ZSHIFT Displacement in Z direction Real
-
-
- Rotate Line
-
- Variable Description Type
- XROTATE Rotation about X axis (degrees) [-360..360] Real
- YROTATE Rotation about Y axis (degrees) [-360..360] Real
- ZROTATE Rotation about Z axis (degrees) [-360..360] Real
-
-
-
-
- Top & Bottom Z Coordinates
-
- Variable Description Type
- ZTOP Z coordinate of top surface Real
- ZBOT Z coordinate of bottom surface Real
-
-
- Outline Coordinates (NOUTLN lines)
-
- Variable Description Type
- X X coordinate Real
- Y Y coordinate Real
-
-
- PLANE Control Line
- (Include this section if CODE = 4.)
-
- Variable Description Type
- NX Number of quads to break down - X [1..] Integer
- NY Number of quads to break down - Y [1..] Integer
- MATERIAL Material number of this surface [1..20] Integer
-
- Scale & Shift Line
-
- Variable Description Type
- XSCALE Scaling factor in X direction Real
- YSCALE Scaling factor in Y direction Real
- ZSCALE Scaling factor in Z direction Real
- XSHIFT Displacement in X direction Real
- YSHIFT Displacement in Y direction Real
- ZSHIFT Displacement in Z direction Real
-
-
- Corner Coordinates (include 4 lines)
-
- Variable Description Type
- X X coordinate of corner Real
- Y Y coordinate of corner Real
- Z Z coordinate of corner Real
- USING PLAYBACK
-
-
- PLAYBACK is a screen reviewing utility for SURFMODL, written
- by Kevin Lowey. It allows you to create animated images by playing
- back SURFMODL PICture files, which were created by hitting the 'F'
- key in SURFMODL after a picture is generated on the screen. Then
- you can replay any screen, or any sequence of screens, using
- PLAYBACK.
- If you just type 'PLAYBACK' and hit Enter, the program will
- provide some brief instructions. What it will tell you is that you
- should have specified a control file on the command line, as in:
- PLAYBACK ctrlfile
- where 'ctrlfile' should be replaced by the name of a control file
- you create. In this control file, you will specify the names of
- SURFMODL PICture files that you have previously generated, along
- with a couple of options for displaying the files.
- There is an important limitation to the PLAYBACK command:
- files that were saved on a system with one type of graphics adapter
- can only be replayed on systems with the same type of graphics
- adapter. This is because the PICture files are specific to the
- hardware being used. You cannot, for instance, play back a PICture
- file on a Hercules graphics adapter that was created on an EGA
- system.
- The control file format is extremely simple. One line is
- used to specify each file name; the format is "DELAY DISPLAYMODE
- FILENAME" for each line. The three entries must be separated by at
- least one space. The delay is a time, in milliseconds (1/1000 of a
- second), to show the file before proceeding to the next one.
- Specifying a delay of -1 will cause PLAYBACK to wait for a keypress
- before proceeding; a delay of -2 causes PLAYBACK to go back to the
- beginning screen and replay all the images again. This causes an
- infinite loop, which is exited when any key is pressed. Similarly,
- a delay of -3 causes an infinite loop, but in which the the images
- are displayed in reverse order until they reach the first image.
- Then it displays them in forward order, etc., so that an
- oscillating animation can be created. The display mode is an
- integer code between 0 and 4, as follows:
- 0 : Normal mode, image replaces image on screen.
- 1 : XOR mode, Shows image EXCEPT where it matches screen.
- 2 : OR mode, Shows both image and screen.
- 3 : AND mode, Shows only where image and screen intersect.
- 4 : NOT mode, Shows the inverse of the image.
- For instance, suppose you had saved three PICture files
- consisting of images of the fan in different angles of rotation.
- And suppose you had named these files FAN.1, FAN.2, and FAN.3. You
- could replay all three of them, with one-second pauses between, by
- creating a playback control file as follows:
- 1000 0 FAN.1
- 1000 0 FAN.2
- 1000 0 FAN.3
- To create a continuous animation, add one more line:
- -2 0 FAN.3
- (For an example of a looping animation, see APPLE.PLY.)
- If you named this file FAN.PLY, then you could replay the
- images with the single command:
- PLAYBACK FAN.PLY
- The extension of '.PLY' is not mandatory, but future versions of
- PLAYBACK will probably use this extension as a default.
- Regarding memory usage: PLAYBACK requires enough free RAM to
- read ALL the disk images into memory before it starts to display
- any of them. If there is not enough free RAM, it exits with an
- error message and you see none of your animation. Following are
- some suggestions of what to do if you get this message:
-
- 1. Remove any large memory-resident (TSR) programs that you may
- have loaded.
- 2. If you have extended memory in your system, you may want to
- install the HIMEM.SYS extended memory manager (provided with the
- SURFMODL distribution disks), or a compatible memory manager like
- QEMM, Netroom, or 386-Max. New to version 3.0 is PLAYBACK's
- ability to store images in extended memory. Unfortunately,
- PLAYBACK animations are somewhat slower when using extended memory,
- due to the extra memory moving involved. Therefore, you will not
- see the smooth animations that are possible when only using
- standard RAM.
- 3. Edit the control file so there are not so many images in the
- animation. This will cut down on RAM usage, since RAM usage is
- proportional to the number of images.
- 4. You can re-run SURFINST and select a lower-resolution graphics
- mode, or one with fewer colors. If you have a VGA, you may even
- want to use one of the EGA modes or (gasp!) even a CGA mode. Of
- course, the pictures will not look as sharp but at least you can
- see the animation.
- USING REVOLUTION
-
-
- REVOLUTION provides a graphical interface to PREPROC, the
- SURFMODL preprocessor, for the generation of objects of revolution.
- It was written by Ian Murphy. This documentation should really be
- expanded on, but unfortunately I don't have time to do it more
- completely right now. If you find this documentation incomplete or
- inaccurate, I recommend you use the trial-and-error method.
- REVOLUTION is really quite easy to use, if you just play around
- with it a little.
- You start up the program by just typing REVOLUTE (if you
- have a CGA, EGA, Hercules, or Sanyo MBC-55x) or REVOLHZC (if you
- have a Heath/Zenith Z-100 or CGA that can't run the standard
- REVOLUTE file), or REVOLATT (if you have an AT&T 6300). There are
- no parameters on the command line. For all versions except
- REVOLATT, you will then select your system type from a menu.
- Next, you should immediately be placed on the graphics
- screen, with axes covering the screen and a small line segment and
- crosshair near the middle. If you have a system that supports text
- output on the graphics screen, then you will also see a line that
- looks like:
- Add Del Ins Move Redraw Params Write
- at the top of your screen. If your system doesn't support text on
- the graphics screen, then you had better write these commands down
- or you'll be lost when you start up REVOLUTION.
- The basic idea is to draw a picture on your screen of HALF
- of the object that you wish to create (remember, you can only
- create objects of revolution). The axis of rotation of the object
- is the vertical axis, and if you don't want a hole in your object
- you had better make sure that the first and last points of your
- picture lie on that axis. You move the crosshairs from one point to
- another on your lines using the left and right arrow keys. Note
- that this only moves you between the "major" points that you have
- created. Left arrow moves you in one direction and right arrow in
- the other. These directions are not really necessarily left and
- right; they are just backward and forward through the array of
- points you have drawn. To move one of these major points, hit the
- M key. If you receive the message to "select a point", then put
- the crosshair on the point you want to move and hit Enter.
- Otherwise, just hit your arrow keys and the current point will
- move. (If you don't have text capability on your graphics screen,
- you'll just have to tell by feeling your way around. If left and
- right arrow keys just move the crosshairs between points, then
- REVOLUTION is still waiting for you to select a point; if it moves
- your selected point left or right, then you are ready to go.) When
- you have moved the point where you want it, hit Enter and the point
- is kept at that place on the screen.
- The first letter of all the commands mentioned above is all
- you press to select a command in REVOLUTION. 'A' adds a new point,
- always after the "leftmost" point -- that's easier to see by trying
- it than by reading this documentation. 'I' inserts a new point
- between two old points, again to the "left" of the chosen point.
- 'D' deletes a point, and 'P' brings up a parameters menu to change
- several of the PREPROC inputs. See the PREPROC documentation for
- details. 'W' writes the data to a file. If you specify an
- extension to your filename, it is ignored; REVOLUTION files always
- end in an extension '.IN'. If (+%% '*ct a name like 'TEST' for
- your filename, then REVOLUTION will create two files: TEST.IN and
- TEST.BAT. The TEST.IN file is NOT a SURFMODL input file; it is a
- PREPROC input file. The easiest way to create a SURFMODL input
- file from this is to exit REVOLUTION (which you do by hitting the
- Escape key), and then type TEST. This runs the TEST.BAT file,
- which just contains the two lines:
- PREPROC test.IN test
- SURFMODL test
- [KVC 09/30/91 This should be modified to generate test.SRF, but
- this has not been done yet.]
- This just runs the TEST.IN file that REVOLUTION just created
- through PREPROC to create a SURFMODL data file called TEST, then
- starts up SURFMODL on that file.
- One other important note regarding REVOLUTION: the ordering
- of the major points. Since SURFMODL (and PREPROC) care about the
- ordering of nodes, some standard has to be set as to which node is
- the "first" one and which is the "last". In SURFMODL, this was
- done by the restriction that nodal connectivity is specified in a
- counter-clockwise direction when viewed from the outside of the
- surface. In REVOLUTION, in order to guarantee that nodes are
- generated properly for this rule, you have to follow some simple
- rules of ordering as well. This is easiest to explain with an
- example.
- If you imagine trying to create a sphere with REVOLUTION (by
- drawing a half-circle on the left side of the axis), the counter-
- clockwise rule is easy to apply if you just think of the "leftmost"
- point as the first one, and the "rightmost" point as the last.
- That means the leftmost point should be at the top of the screen,
- and the rightmost point at the bottom.
- In general, the rules are thus: (1) always draw your object
- on the left side of the axis; (2) always order the points counter-
- clockwise when proceeding from "left" to "right". You can violate
- these rules, and still get valid SURFMODL data files, but you may
- find your surfaces "inverted": SURFMODL shades the inside of the
- surface instead of the outside.
- Experiment with REVOLUTION, and I think you'll agree it's a
- valuable addition to the SURFMODL package. If you have problems
- with it, we apologize, but for now you'll just have to pour through
- the source code and figure it out yourself. This brings new
- meaning to the term "user- supported software"! Good luck!
- USING SURFEDIT
-
-
- SURFEDIT is designed to allow you to edit any SURFMODL data
- file, to make small changes to it graphically or merge multiple
- data files interactively. SURFEDIT was written by Ian Murphy, and
- really represents a valuable addition to the SURFMODL collection.
- However, like REVOLUTION, it needs some work. The file merging
- command, for instance, is buggy. You may often find your data
- points in the wrong position after merging two files. I ordinarily
- would not release such bug-ridden code, but SURFEDIT's primary
- purpose (graphically editing SURFMODL data files) works well and
- therefore (I think) makes it worthwhile nonetheless. If you need
- to merge multiple SURFMODL data files, your best bet for now is to
- use PREPROC.
- One more piece of bad news: SURFEDIT currently only works
- on EGA-compatible systems. Any other system will be hung by
- running SURFEDIT. You start the program by just typing
- SURFEDIT; any command line parameters are ignored. You will be
- asked for a file name, and you must specify the name of an existing
- SURFMODL data file (NOT a PREPROC data file). You must specify
- some file name here, since SURFEDIT cannot create a new one from
- scratch; it must have an old file to start from.
- Once SURFEDIT is started, you will be presented with three
- windows. These three windows always show the three principle
- orthogonal views of your object. In drafting terminology, the
- upper left view is called the "elevation"; the lower left is the
- "plan"; and the upper right is the "endview". These correspond to
- the X-Y, X-Z and Y-Z planes, respectively.
- You have eight commands available to you in SURFEDIT, which
- you specify by typing the first letter of the command: Z (Zoom),
- E (Edit), O (Options), R (Rotate), I (Import), T (Translate), M
- (Magnify), and W (Write). In addition, hitting the Escape key will
- exit the program, and hitting one of the arrow keys will allow you
- to "select" a different window. You always know the selected
- window because it is highlighted. At all times, one of the three
- windows is selected, and that is the one on which your commands
- will operate.
- An explanation of the term "object" is in order. In
- SURFEDIT, an "object" is defined by a file. The first data file
- you specify to be read in is thereafter referred to as object
- number 1. If you later "Import" a file, it is referred to as
- object number 2, the second file you Import is object number 3, and
- so on. (There is a limit of 10 objects in SURFEDIT.) In several of
- the commands, SURFEDIT will ask you what object you wish to refer
- to, so keep track of your object numbers.
- The Zoom command presents a rectangular box in the currently
- selected window. You may move this box anywhere inside the window,
- to specify an area to zoom in on. WARNING: This command uses the
- numbers on the numeric keypad, not real arrow keys! Therefore, you
- must have Num Lock ON when you issue this command. (For anyone who
- does not have the arrows printed on their numeric keypad, here is
- the translation: 8 is the up arrow, 2 is the down arrow, 4 is the
- left arrow, and 6 is the right arrow.) This is inconsistent with
- the way the rest of the program works, by the way. In any of the
- other commands in SURFEDIT, when the directions say to hit an arrow
- key it means a real arrow key (with Num Lock off). When you have
- positioned the box where you want to zoom, hit the Enter key to
- actually make it zoom in.
- The Edit command allows you to move selected nodes in one
- plane (the currently selected window). You are limited to the
- resolution of the graphics screen for the accuracy of your editing,
- but since this command also works on zoomed windows you actually
- have a great deal of control available. After hitting the 'E' key,
- you are presented with a crosshair. You move the crosshair near
- your desired node with the arrow keys, then hit Enter. The closest
- node to the crosshairs is selected, and the crosshairs reappear in
- their original position. Now move the crosshairs to the new place
- where you want to move the node, and hit Enter. You will not see
- the change reflected in the other two windows immediately, but it
- has been made internally. To see your editing changes in
- other windows, use the Options command, then hit 'R' for Reset.
- This redraws all three windows with the current data. It also
- resets any zooms to the initial drawing scales (the program
- automatically scales your object to fit within all three windows,
- with the same scale used in all windows).
- The Rotate command allows you to specify an angle (in
- degrees) to rotate an object about each of the three principle
- axes.
- The Import command allows you to read another SURFMODL data
- file, to merge it with the current data file.
- The Translate command allows you to specify a distance to be
- added to every coordinate in an object, along each of the three
- principle axes. Units used are real numbers (the same as the units
- you used originally to create the data file).
- The Magnify command allows you to scale an object in each of
- the three principle directions. A scale of 1 leaves the object
- unchanged in that direction. Note that Magnify is different than
- Zoom, because Zoom just allows you to enlarge the drawing of a
- view. Magnify actually changes the internal nodal coordinates of
- the object.
- Finally, the Write command allows you to specify a file name
- to save the current data into a SURFMODL data file. It does not
- exit the program; use the Escape key for that.
- PRINTING THE SCREEN
-
-
- SURFMODL does not provide an internal facility for printing
- a copy of the graphics screen; however it is fairly easy to do.
- If you have a CGA or EGA compatible graphics adapter and a printer
- that is compatible with the IBM dot matrix graphics printers (as
- many are, including the popular Epson printers), you can do screen
- dumps using the GRAPHICS.COM program that comes with MSDOS.
- Install it by typing GRAPHICS sometime before entering SURFMODL (or
- better yet, put it in your AUTOEXEC.BAT); then the <Shift>-<PrtSc>
- combination will copy the current screen to the printer, even in
- graphics mode.
- A better solution to the problem is to use Colour Snap, a
- shareware utility (which I did not write) that I am now including
- on the SURFMODL distribution disks in the SURFPRNT module. This
- supports a wide range of color printers (as well as black-and-
- white) and several graphics modes. Unfortunately, it does not
- presently support the 256-color VGA modes, although the author has
- told me he is working on this. See the documentation that came in
- the SURFPRNT module for details on its use, and write to the author
- if you want to find out as soon as the full VGA support is added.
- There are also several commercial TSR screen dump programs
- available, which you may want to consider. Several of them support
- many combinations of screen and printer, including laser printers
- and color support. The one I have used is called INSET, and is
- produced by Inset Systems Inc. (formerly the American Programmers
- Guild), 12 Mill Plain Road, Danbury CT 06811. Their telephone
- number is (203)794-0396. I believe I paid $129 for my copy, but
- that was in 1986 so prices have changed. INSET supports a large
- number of printers and adapters, and also has many other features
- for merging graphics with your text files, shrinking or enlarging
- images, changing aspect ratios, dithering and color support. I
- highly recommend it. I have no affiliation or financial interest
- in Inset Systems Inc.
- INSTRUCTIONS FOR RECOMPILING SURFMODL 3.00C
-
-
- Included on the SURFMODL distribution disks is a batch file,
- called COMPILE.BAT, which uses the TP line mode to compile the
- program. For many users, recompiling SURFMODL is as simple as
- executing COMPILE.BAT. There are, however, some options to
- consider. You can turn off support for the 80x87 floating point
- processor, control linking of .BGI files in the .EXE file,
- generation of debugging code, generation of shadow processing code,
- and generation of code for "external" graphics devices (the VAXmate
- and Commodore Amiga).
- Invoking any of these options is quite easy; you just edit
- the file DEFINES.INC, included on the distribution disks. Since
- DEFINES.INC is included at the beginning of all the programs and
- units of SURFMODL, a change in this file changes all the files at
- compilation time. In this file, you will also find comments
- explaining the meaning of each of the optional define statements.
- Read it for details.
- I should also mention that trying to compile SURFMODL
- exactly as it is supplied on the distribution diskettes will result
- in an error message. That is because the top line of DEFINES.INC
- is a comment that has not been commented out. It was done to
- purposely make you read that file before compiling. The minimum
- change you must make is to comment out the first few lines of the
- file.
- INTERPRETATION OF ERROR MESSAGES
-
- Following is a list of common error conditions found when running
- SURFMODL, and what to do about them:
-
- SYMPTOM: "ERROR: SURFMODL.CFG does not exist."
- ACTION: You are missing the SURFMODL.CFG file, which must be
- present either in the current directory or the one you keep all
- your data files in. If you keep data files somewhere other than
- the current directory, you should set an environment variable to
- point to it, as in:
- SET SURFDIR=C:\SURFMODL\DATA
-
- SYMPTOM: "Device driver file not found..."
- ACTION: You have tried to run SURFMODL without having the Borland
- Graphic Interface (BGI) file for your graphics adapter in the
- current directory. All the BGI files used by SURFMODL are provided
- on the SURFMODL release disks. Copy the one that corresponds to
- your adapter into your current directory before running SURFMODL.
- If you're not sure, just copy them all into the current directory.
- Another alternative is to set the environment variable BGIDIR,
- which SURFMODL checks upon startup. You can set this to hold the
- name of the directory in which you keep your BGI files, as in:
- SET BGIDIR=C:\TURBO\DRIVERS
-
- SYMPTOM: You hear a beep after hitting the 'F' key in SURFMODL (to
- try to save a copy of the current screen to a file), and there is
- no disk activity.
- ACTION: SURFMODL could not allocate enough memory to save the
- screen, or else you ran out of disk space. If you are sure you
- have plenty of disk space, you may be getting the beep simply
- because you do not have enough memory free during the run.
-
- SYMPTOM: "Could not allocate memory for bitmaps" (in PLAYBACK)
- ACTION: PLAYBACK loads all of the images into memory before
- starting to display them. Therefore, the more images you request
- to be played back, the more memory required. You will see this
- message for each file requested in your playback control file that
- cannot fit into memory. It is a non-fatal error; all images
- before the ones that exceeded your memory limits will be properly
- displayed. NOTE: PLAYBACK is capable of using extended memory to
- store the images for animation. To use this feature, you must have
- an extended memory manager (XMS) loaded, such as HIMEM.SYS,
- Quarterdeck's QEMM, or Qualita's 386MAX. HIMEM.SYS is provided on
- the SURFMODL distribution disks; just add this line to your
- CONFIG.SYS:
- DEVICE=HIMEM.SYS
-
- SYMPTOM: "Warning: Focal point outside data limits. Press any
- key..."
- ACTION: This is not really an error message; it is just a friendly
- warning by SURFMODL that the focal point is outside the limits of
- the object. If the resulting plot is nothing but a blank screen,
- it does not necessarily mean there is something wrong with your
- data; just that you picked a bad focal point.
-
- SYMPTOM: "Error: You have attempted to plot a concave surface"
- (etc.)
- ACTION: This message occurs because the arrays in the filled
- surface routine in SURFMODL had their dimension exceeded. Usually,
- this is only possible if you tried to plot a surface with
- concavities. If you are sure your surfaces are convex, the easiest
- way to make this message go away is to reduce the magnification
- factor of the plot. If you see this message often, then the
- constant MAXPTS in SURFMODL.PAS should be raised, and SURFMODL
- recompiled.
-
- SYMPTOM: In the wireframe plot, surfaces look more like
- "hourglasses" than quadrilaterals.
- ACTION: Your node numbers were not specified in an order to
- complete a circular path around the surface. For example, if your
- old node numbering was: 1,2,3,4 then try: 1,3,4,2 and your
- problem should be fixed.
-
- SYMPTOM: You notice that some surfaces are covering (or partially
- covering) surfaces that they should be behind.
- ACTION: This is usually caused by using surfaces with too high an
- aspect ratio - that is, they are much longer in one direction than
- in the other. (You may see this in my ROBOT2.SRF data file.)
-
- SYMPTOM: You notice surfaces are not being plotted when they
- should be. ACTION: You probably reversed the direction of the node
- numbering, and ordered them clockwise instead of counter-clockwise
- (when viewed from the visible side of the surface). (This is the
- case with the base of the robot in my ROBOT2.SRF data file.) One
- fix is to correct the numbering; another is to change NSIDES from
- 1 to 2.
- SURFMODL USER REGISTRATION
-
-
- As a low-cost way to communicate with SURFMODL users, I am
- making the following offer: If you mail me a self-addressed,
- stamped envelope (SASE), I will keep you informed of the latest
- developments in SURFMODL. If you are not from North America, you
- can instead send one International Postal Coupon and a self-
- addressed envelope. Please don't expect an immediate reply; I am
- only going to mail out notices when I have compiled enough material
- to make it worthwhile. You would be amazed at the number of people
- who have written to me, asking to be included on the mailing list,
- without including any postage. I don't ask for contributions or
- any other payment, so I really think this is a reasonable request
- in return for a promise to keep you up to date.
- I welcome you to send me copies of your data files for new
- and interesting objects that you display with SURFMODL, and I
- certainly welcome enhancements to SURFMODL or any of its support
- programs. If you don't stipulate otherwise, I will assume that any
- data files or programs you send me are intended for general
- distribution. I really look forward to seeing what other people
- can do.
- I have purposely avoided printing a "registration form" in
- the documentation, as is so popular, because I want to get a letter
- from you -- not just a form. Let me know what you think about
- SURFMODL, how you think it could be enhanced, and, most
- importantly, what you're using it for. I really enjoy hearing
- about other people's appplications. If you write to report bugs,
- please stipulate which version you are running, and on what type of
- computer/graphics board.
- UPGRADING SURFMODL
-
-
- If you want to keep up with the latest version of SURFMODL,
- first of all you have to register; that much is obvious. In
- addition, you will want to know how you can obtain a copy of the
- latest version of SURFMODL. In the past, I have sent my newest
- releases to a public domain sales company called MicroCom Systems,
- and encouraged people to go there for their diskettes. Now,
- unfortunately, MicroCom is no longer responding to my letters. I
- have sent them two SURFMODL updates without getting so much as a
- note verifying receipt. Therefore, I am dropping my recommendation
- to use them and will now start distributing SURFMODL myself on
- diskette. Although I will mail SURFMODL anywhere in the world,
- there are also a few other distribution sites for SURFMODL which
- may be more convenient for you. Check the file DISTRIB.DOC on the
- distribution disks, for an up-to-date listing of prices and other
- distribution sites. These are not commercial companies; they are
- just other SURFMODL users like yourself.
- Below is my present address. I prefer not to get too many
- phone calls, but if you feel you have something important that is
- too difficult to put down on paper (or you want to make a business
- proposition!), by all means give me a call. You can get my number
- from information.
-
- Kenneth Van Camp
- RD #1 Box 1255
- East Stroudsburg, PA 18301
- U.S.A.