home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Graphics
/
WOGRAPH.BIN
/
575.WORM05.DOC
< prev
next >
Wrap
Text File
|
1992-10-13
|
18KB
|
372 lines
&a10L
WORM
(Beta Version 0.05a)
10/13/92
Copyright 1992 Robert Flores
The Computer Graphics Group
PROGRAM DESCRIPTION:
Worm is basically a visual Connect-the-Dots utility. You use your
mouse for coordinate placement and press keys for commands. It
will display spheres and connecting lines. VIVID output has been
added (primarily because I use that program a lot and it was easy
to do).
This program REQUIRES a mouse and a VGA card (It does not check
for either).
It has been tested with VIVID 2.0 and POV 1.0 and seems to produce
some nice results.
MAIN COMMANDS:
<cr,sp> SPHERE. Add a new sphere at mouse coordinates with the
current radius by pressing the SPACE bar or ENTER.
<1> FRONT VIEW. Change display to Front View (X,Y plane).
<2> SIDE VIEW. Change display to Side View (Z,Y plane).
<3> TOP VIEW. Change display to Top View (X,Z plane).
<4> PREVIEW. Display a perspective view of spheres and connectors.
<A> ARC. Create an arc of spheres. The program can either
use last sphere as starting point or accept new
point. Move to center point and press a key or right
mouse button. A circle will appear showing radius
circle. Move to end point and press a key or left
mouse button. Input direction (clock-wise/counter-
clockwise). Enter ending sphere radius (ENTER only
if it is the same as the starting radius).
<^A> ARC. Create a free form arc of spheres. The program can
either use last sphere as starting point or accept
new point. Move to end point and press a key or right
mouse button. Input number of spheres (default=20).
Enter ending sphere radius (ENTER only if is the same
as the starting radius). Move to first control point
and press a key or left mouse button. Next move to
second control point and press a key or right mouse
button. The program displays a curve path and prompts
user to abort, redo, or accept path. Enter choice.
NOTE: The basic idea for this was a formula for a
cubic parametric curve I found. The control points
act like magnets, pulling the (originally straight)
line away from the opposite end point. By moving the
location of the two control points, you can adjust
the shape of the curve.
<C/P> CENTER. Pan view screen. Enter x,y,z coordinates to placed at
the center of screen. This is PAN now and is left in
for those accustomed to pressing C.
<D> DEFAULTS. Change program defaults, such as:
<D>ecimals Number of decimal
places (1-3)
<E>dit Snap Maximum x,y,or z
distance from mouse
cursor can be from
sphere in Edit select
<M>ouse Snap Increment of x,y and
z coordinates
<E> EDIT. Toggle Edit mode. See Edit Commands below.
<F> FILE. Load in or Save to disk a file. The following choices
are available:
<A>ppend Append in a WORM file
after the last sphere.
<C>lear Clear out any data.
<L>oad Load in previously saved
WORM file. NOTE: This clears
out any current data in
memory.
<S>ave Save a WORM and/or CTDS
file.
<Q>uit Exit File section
<V>ivid Formatter Create a VIVID
compatible file. The y and
z coordinates are swapped.
Studio can be merged from
an external file. A generic
surface is written for each
worm. With the exception of
the first worm, these are
set up as non-executed
remarks. These can then be
edited with any editor.
<L> LINE. Create a straight line of spheres. The program can
either use last sphere as starting point or accept
new point. Move to end point and press a key or left
mouse button. Enter ending radius (ENTER only if it
is the same as the starting radius).
<M> MOVE. Shift ALL spheres. Enter x,y,z offsets.
<N> NEW WORM. Start a new worm. Normally, each new sphere is coded
to be linked to the previous sphere. Pressing N will
code the sphere to be the first in a new worm.
<P> PAN. Pan view screen. Enter x,y,z coordinates to placed at
the center of screen. Same as CENTER.
<Q> QUIT. Quit. You will be prompted if you would like to save
your work. "Worm-compatible" means that the file
can be loaded into this program. "CTDS-compatible"
means that the file is ready for Connect the Dots
program.
<R> RADIUS. Change current default radius.
<S> SPIRAL. Create a spiral. The radius is defined in the current
view (xy,zy,or xz) and the length is in the third
axis.
The program can either use last sphere as starting
point or accept new point. Move to center point and
press a key or right mouse button. A circle will
appear showing radius circle. Move to ending spiral
radius point and press a key or left mouse button.
Input direction (clock-wise/counter-clockwise).
Enter ending sphere radius (ENTER only if it is the
same as the starting radius). Enter length (negative
lengths spiral in the negative direction).
<U> UNDO Undo last action.
<V> VIEW SIZE. Change View extents. Sizes currently are: -50 to 50
-25 to 25
-15 to 15
-10 to 10
-75 to 75
-100 to 100
-150 to 150
-200 to 200
Extents are in all three directions. These are off-
sets from center points.
EDIT COMMANDS:
<1 2 3> Change display to View 1, 2, or 3. This works the
same as in Main Menu.
<B> BOX. Box in a group of spheres for movement, copying or
deletion. Move to lower-left corner and press a key
or left mouse button. Then move to upper-right corner
and press a key or right mouse button.
The following choices are available:
<1/2/3> Change viewpoint
<C>opy Copy selected spheres
<D>elete Delete selected spheres
<M>ove Move selected spheres
<H>orz Flip Flip selected spheres horizontally
<P>an Pan display
<Q>uit Exit Box Edit mode
<R>adius Change radius of selected spheres
<S>cale Scale selected area and radius
<T>urn Rotate selected spheres
<U>ndo Undo last action
<V>ert Flip Flip selected spheres vertically
<D> DELETE. Move cursor to desired sphere and press D. Sphere is
deleted.
<^D>DEL LAST. Delete last sphere. If the last addition was an arc
the group of spheres are removed.
Note: A group is deleted with this command only if
there was no other editing since the ARC command.
<I> INSERT. Insert a new sphere after sphere at cursor. Move to
sphere and press I. Move to new position and press
a key or left mouse button. The new sphere will
inserted in line in the worm.
<M> MOVE. Move sphere at cursor to new x,y coordinate. Move to
sphere and press M. Move to new position and press
a key or left mouse button. The select sphere will be
move to new place. This does not alter position in
worm sequence.
<N> NEW. Make sphere the start of a worm. Move to sphere and
press N.
<R> RADIUS. Change sphere radius. Move to selected radius and
press R. Enter new radius.
<W> WORM Edit a whole worm. Move to a sphere in desired worm
and press W. The following choices are available:
<1/2/3> Change viewpoint
<C>opy Copy selected spheres
<D>elete Delete selected spheres
<M>ove Move selected spheres
<H>orz Flip Flip selected spheres horizontally
<P>an Pan display
<Q>uit Exit Box Edit mode
<R>adius Change radius of selected spheres
<S>cale Scale selected area and radius
<T>urn Rotate selected spheres
<U>ndo Undo last action
<V>ert Flip Flip selected spheres vertically
<esc> EXIT Leave EDIT mode and return to MAIN menu. Cursor
coordinates will be those of the last sphere.
HISTORY:
0.1e 02/20/92
First release after playing with it for a while.
Only xy plane available
0.2a 03/04/92
Added additional planes. 3-D editing now possible.
Added rotation and flip
Added spirals.
Added perspective view. You can actually get an idea what
the thing will look like.
Added VIVID file output
Changed user interface.
0.3a 03/15/92
Added scaling.
Modified VIVID file output to merge with a STUDIO file and
have a generic surface definition for each worm. Also,
added option to not connect spheres.
Expanded view display options.
Renamed SHIFT to MOVE
Added UNDO LAST EDIT.
0.4a 08/31/92
Fixed coordinate display in Edit mode
Added Append in File mode to read in worm files without
clearing data in memory.
Added ability to select whole worm in Edit mode.
Added ability to change views in Edit mode.
Added ability to create a straight line of spheres in
addition to default use as endpoints.
0.4b 09/01/92
Fixed bugs in deletion and Edit-worm functions.
0.5a 10/13/92
Added cubic parametric curves (free form).
Expanded maximum number of spheres to 5000.
Changed Undo to a more true undo.
Made mouse interface somewhat (repeat: somewhat) better.
Added some file error checking.
WISH LIST:
A better mouse interface - less key action. A high priority with many
people.
Incremental spacing of spheres in arcs, lines and spirals with
increasing or decreasing radii.
Better arc editing. And while I at it, why not bezier patches,
TIN (Trianglar Irregular Network) creation and 3-d modelling?***
More error checking - file, quantities, etc.
WORM FILE FORMAT:
The first line contains number of spheres
Each of the remaining file lines contains the following:
X-coord, Y-coord, Z-coord, Radius, Status
Status indicates whether the sphere is the start of a new worm or
connected to sphere preceeding it. (0=new worm;1=connect to last
sphere).
LIMITATIONS AND SUCH:
Maximum number of spheres is currently 5000. Coordinate ranges are
from -32,767 to 32,767. The display is generated sequentially (first
to last) and thus does NOT hide lines. The top layers of spheres are
those last in line. Please remember this. Otherwise, it could be
confusing (such as side views of spirals).
Center of rotation (TURN within Edit mode) is midpoint between high
and low coordinates in each direction of selected spheres.
The program does not currently have much error checking. So, please
don't get mad if the program bombs. Hey, this is a beta version and
you probably have no intention of financially supporting its
development, anyway.
The program was written in BASIC and is bound by the limits imposed
by the language and my own minimal programming ability. This became
even more apparent with the addition of the free form curve. I would
have like to have had a rubber banding effect on the path as each
control point was position. Unfortunately, the overhead involved
bogged down the program with unacceptable display results.
CLOSING THOUGHTS:
Thanks to Adam Shiffman, Robert Wiber and Truman Brown for their
suggestions, pointers and encouragement. Thanks to Steven Coy for
creating Vivid, which originally prompted the idea for Worm. Special
thanks to Mike Miller, whose use of Worm in the creation of some of
his masterpieces has completely blown me away. And special thanks
to my wife, Kaylene, who has not pulled the plug on my machine
JUST YET.
Bugs and mistakes are expected. Relax, enjoy, and save often.
Suggestions are greatly appreciated. They might even be used.
Donations are also greatly appreciated. They definitely WILL be used.
Robert Flores
The Computer Graphics Group
PO Box 4022
San Marcos, CA 92069
P.S. I occasionally come up for air at these BBS's:
Diamond Bar BBS (714) 861-1549
The Graphics Alternative (510) 524-2780
Leo Graphics (310) 212-7179
The Twilight Zone (619) 480-2435
You Can Call Me Ray (708) 358-5611
Compuserve COMART 71051,3543