59 #define RFILE "/cfs/johns/anim/frame" 76 dist = sqrt(xx*xx + yy*yy + zz*zz);
98 dist = sqrt(xx*xx + yy*yy + zz*zz) + (
framenumber / 200);
100 value = (1.0 + cos(dist * 48.0) / (2*dist + 1.0)) / 2.0;
102 value = value*value*value;
107 int main(
int argc,
char **argv) {
110 int raydepth, antialiasing, verbosemode;
127 aspectratio=1.0; raydepth=8;
128 antialiasing=0; verbosemode=0; zoom=1.0;
130 Ccenter.
x=0.0; Ccenter.
y=0.0; Ccenter.
z=0.0;
131 Cview.
x=1.0; Cview.
y=0.0; Cview.
z=0.0;
132 Cup.
x=0.0; Cup.
y=0.0; Cup.
z=1.0;
133 ctr1.
x=2.0; ctr1.
y=2.0; ctr1.
z=2.0;
143 min3.
x=-1.0; min3.
y=-1.0; min3.
z=-1.0;
144 max3.
x=1.0; max3.
y=1.0; max3.
z=1.0;
156 strcpy((
char *) &p1.
imap,
"/cfs/johns/imaps/leafy261.ppm");
159 strcpy((
char *) &p1.
imap,
"/disk7/cube/imaps/leafy261.ppm");
167 sprintf(fname,
".%4.4d.tga",i);
168 strcpy(fname2,
RFILE);
169 strcat(fname2, fname);
173 if (
rt_mynode()==0) printf(
"Rendering: %s \n",fname2);
175 xc=cos(6.28 * (i + 200) / (1.0 *
MAXFRAMES));
176 yc=sin(6.28 * (i + 200) / (1.0 *
MAXFRAMES));
187 raydepth, Ccenter, Cview, Cup);
193 ct1.
x=0.0; ct1.
y=0.0; ct1.
z=-1.01;
194 n1.
x=0.0; n1.
y=0.0; n1.
z=1.0;
197 ct1.
x=0.0; ct1.
y=1.8; ct1.
z=1.8;
float g
Green color component.
void rt_camera_setup(SceneHandle voidscene, flt zoom, flt aspectratio, int antialiasing, int raydepth, apivector camcent, apivector viewvec, apivector upvec)
Define a camera for a perspective projection, given the specified zoom factor, aspect ratio...
float r
Red color component.
void * rt_texture(SceneHandle sc, apitexture *apitex)
Translate a texture definition into the internal format used by Tachyon, and returns an opaque pointe...
apicolor col
base object color
apivector rot
rotation of texture around origin
void rt_resolution(SceneHandle voidscene, int hres, int vres)
Set the horizontal and vertical resolution (in pixels) for the specified scene.
flt diffuse
diffuse reflection
flt opacity
how opaque the object is
int rt_mynode(void)
distributed memory parallel node rank
flt specular
specular reflection
void rt_extvol(SceneHandle scene, void *tex, apivector min, apivector max, int samples, flt(*evaluator)(flt, flt, flt))
Define an axis-aligned volumetric data set, with a user-defined sample evaluation callback function...
apivector ctr
origin of texture
char imap[96]
name of image map
void rt_renderscene(SceneHandle voidscene)
Render the current scene.
int rt_initialize(int *argc, char ***argv)
Initialize Tachyon library, must be first Tachyon API called.
flt x
X coordinate or direction component.
flt apiflt
for backward compatibility
flt y
Y coordinate or direction component.
apivector scale
scale of texture in x,y,z
SceneHandle rt_newscene(void)
Allocate, initialize, and return a handle for a new scene.
void rt_outputfile(SceneHandle voidscene, const char *outname)
Set the filename for the output image for the specified scene.
apivector uaxs
planar map u axis
int texturefunc
which texture function to use
flt ambient
ambient lighting
apivector vaxs
planar map v axis
int main(int argc, char **argv)
void rt_finalize(void)
Shut down Tachyon library for good, at final use before program termination.
float b
Blue color component.
void rt_plane(SceneHandle scene, void *tex, apivector ctr, apivector norm)
Define a plane.
apiflt hypertex1(double x, double y, double z)
Tachyon public API function prototypes and declarations used to drive the ray tracing engine...
apiflt hypertex2(double x, double y, double z)
void * rt_light(SceneHandle voidscene, void *tex, apivector ctr, flt rad)
Define a point light with associated texture, position, and radius.
flt z
Z coordinate or direction component.
void rt_verbose(SceneHandle voidscene, int v)
Enables or Disables verbose messages from the Tachyon library during rendering.