home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TopWare 18: Liquid
/
Image.iso
/
liquid
/
top1053
/
tour.rta
< prev
next >
Wrap
Text File
|
1993-03-04
|
2KB
|
57 lines
/*
* RTAG source file.
* Animated tour around some buildings
* Written by Phillip H. Sherrod.
*/
// File declarations
bfile "tour"; // Batch file will be tour.bat
// Variable declarations.
var lastframe = 260; // Generate 260 frame animation
var x; // X position
var y; // Y position
var z; // Z position
var xlook; // X to look at
var ylook; // Y to look at
var zlook; // Z to look at
// Main animation loop
while (curframe < lastframe) {
nextframe; // Begin a new frame
// Determine position
x = spline(curframe, 1,22, 15,14, 30,6, 45,2, 60,-6,
75,1, 90,2, 105,4, 120,6, 135,6, 150,4,
170,-4, 185,-8, 200,-4, 215,-1, 230,2,
240,4, 260,12);
y = spline(curframe, 1,15, 15,12, 30,6, 45,2, 60,1,
75,2, 90,2, 170,2, 200,2, 230,4, 240,8, 260,18);
z = spline(curframe, 1,-18, 15,-2, 30,-1, 45,-3, 60,0,
75,2, 90,-4, 105,-6, 120,-3, 135,3,
150,6, 170,8, 185,6, 200,2, 215,-4,
230,-2, 240,0, 260,0);
// Determine where to look
xlook = spline(curframe, 1,0, 30,-8, 45,-8, 60,-7, 75,9, 90,4,
105,4, 120,0, 200,0, 260,0);
ylook = spline(curframe, 1,2, 260,2);
zlook = spline(curframe, 1,0, 30,0, 45,0, 60,6, 75,-4, 90,-4,
120,0, 150,0, 200,0, 260,0);
// Print our position
printf("Frame %3.0lf, pos=(%4.1lf,%4.1lf,%4.1lf), look=(%4.1lf,%4.1lf,%4.1lf)\n",
curframe,x,y,z,xlook,ylook,zlook);
// Write position commands to the include file
bwrite(":do`###`\n");
bwrite("if exist tour`###`.tga goto do`+++`\n");
bwrite("echo #declare xpos = `x` > tour.inc\n");
bwrite("echo #declare ypos = `y` >> tour.inc\n");
bwrite("echo #declare zpos = `z` >> tour.inc\n");
bwrite("echo #declare xlook = `xlook` >> tour.inc\n");
bwrite("echo #declare ylook = `ylook` >> tour.inc\n");
bwrite("echo #declare zlook = `zlook` >> tour.inc\n");
// Write command to render the frame image
bwrite("call render tour tour`###`\n");
}
// Write final batch command to run DTA
epilog;
bwrite(":do`+++`\n");
bwrite("call dodta TOUR /S8\n");