home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_GEN
/
LIB3D30A.ZIP
/
3DC.DOC
< prev
next >
Wrap
Text File
|
1994-03-10
|
7KB
|
178 lines
╔══════════════════════════════════════════════════════════════════════════╗
║ ║
║ HyperAct, Inc. ║
║ P.O.Box. 5517 ║
║ Coralville IA 52241 U.S.A ║
║ Compuserve - 76350,333 ║
║ Phone/Fax - (319) 351-8413 ║
║ ║
╚══════════════════════════════════════════════════════════════════════════╝
*******************************************************************************
* 3dC DOCUMENTATION *
* Last Update : Feb. 15, 1994. *
*******************************************************************************
*******************************************************************************
* INTRODUCTION *
*******************************************************************************
3dC is a translator that converts 3D animation macros (M3D files) into
Borland Pascal 7.0 source programs that can be used with the 3dLIB package
to create 3D animation executables, or 3D animation procedures that can
be implemented in your programs.
The generator can create code for DOS and Windows, from the same source!.
M3D macro programs can be animated for test purposes using the HyperAct, Inc.
distributed 3D120 package, Or the supplied 3dA program.
You can use 3DC to create animated programs without this package.
Please note : older versions of the 3D program that were distributed as
3D100 and 3D110 packages are supported, but a small change in the macro
language exist in the GOTO command, that uses ',' to separate arguments,
while the older versions used only spaces, that could cause improper
translation when negative arguments were passed.
*******************************************************************************
* USAGE *
*******************************************************************************
At the command line type
3DC input.m3d [output.pas]
Where input.m3d is the name of the input macro language.
If no output name is specified 3DC creates a Pascal source file called
3DPAS.PAS .
To compile the generated source file use Turbo Pascal 6.0 with the following
command :
TPC /M source.pas
or BP7 with
BPC /m source
Be sure that the compiler can find the GRAPH.TPU file supplied with
Turbo/Borland Pascal.
To run the executable created type it's name in the command line,
and be sure that the required graphic .BGI file is in the current
directory. (please refer to your Turbo Pascal manual about your .BGI file).
If you want 3dC to produce code for the Windows 3.0 or 3.1 environment use
the /W+ switch on the command line, and compile using Turbo Pascal for Windows.
(You can compile to windows targets with BP7 using BPC /cw .. as well).
If you run Windows you can use the supplied 3dCW.EXE program - a Windows
hosted generator available from version 1.4 .
IMPORTANT - if you want the 3dCW program to find the HELP file, we recommend
that you set the working directory of the 3dCW file in the program manager
to the directory you installed the 3dCW.Hlp file!
*******************************************************************************
* MACRO LANGUAGE *
*******************************************************************************
The following commands are supported by the 3DC translator in the 3D Macro
language :
c - Clear Screen .
w - set Color to White.
b - set Color to Black.
p - Paint Active object in last color.
o0 - set Perspective off.
o1 - set Perspective on.
>x - Start a loop to be performed x times.
lfl - Load simple object from file fl into the active object.
Lfl - Load complex object from file fl into the active object.
rad - Rotate Active Element In axis a, d degrees.
ex - Choose Active Element x.
mas - Move in a axis, s steps.
gx,y,z - Goto 3d pos x,y,z.
saf - Scale a axis in f factor.
v0..v9 - variable names.
< - End Loop.
\ - End line.
z - set object to center.
Rsad - rotate a sub object of a complex object around axis a,
d degrees.
Msas - move a sub object of a complex object in axis a, s steps.
Ssaf - scale a sub object of a complex object around axis a,
by a factor of f.
#c - Change color to c.
? c [ t | f ] - If c execute t, otherwise execute f, where c is a
conditional expression, t and f are macro language statements.
!function(parm) - Calls a pre-defined function, with a list of parameters.
Special Notes :
A number must end with a space character.
Loops can be nested 10 levels deep in the 3D120 package, but 3DC can translate
even more levels than that.
any numeric expressions requested can be given with a normal infix notation,
for example :
rx30 * v1 + 2
will rotate the current active object around the x axis, by 2 plus 30 * v1
degrees, where v1 is a variable.
The expression can contain numeric functions in them. The supported functions
are :
@sin, @cos, @sqr, @cotan, @ln, @log10, @log2, @abs, @arctan, @arccos, @exp,
@e, @tan, @pi, @random.
The color table is :
Black = 0
Blue = 1
Green = 2
Cyan = 3
Red = 4
Magenta = 5
Brown = 6
LightGray = 7
DarkGray = 8
LightBlue = 9
LightGreen = 10
LightCyan = 11
LightRed = 12
LightMagenta = 13
Yellow = 14
White = 15
The following functions are supported :
(Notice that 3d objects are NOT effected by these functions)
gotoxy(x, y) - Move the graphic cursor to x, y.
textout("string") - Display string at graphic cursor.
ellipse(cx, cy, rx, ry) - Draws an ellipse center at cx, yx,
Radiuses are rx, ry.
line(x1, y1, x2, y2) - Draws a line from x1,y1 to x2,y2.
rectangle(x1, y1, x2, y2) - Draws a rectangle with upper-left
corner x1,y1, and bottom-right x2,y2.
*******************************************************************************
* Credits *
*******************************************************************************
These Programs were written by Ron Loewy.
3dLIB and 3dC were written using Turbo Pascal V6.0, Turbo Pascal for Windows
V1.5 and Borland Pascal with objects V7.0, trademarks of Borland International.
Windows 3.0 and Windows 3.1 are trademarks of Microsoft Corp.