next up previous contents index
Next: Project Surface Up: Project Curve Previous: Using Variables in Functions

A Time-Curve Example

 

As all description files for the subprojects of Time-Object the Curve files start with the Time_Object part containing the task, frame and parameter data (compare the Time_Object example in section 8.2.1.3):

#
# torus_knot.cv: test object for time_curve - (m, n) torus knot
#

# task
GEOMETRY;

# frame data
0; 3;           # frame / number of frames

# parameter data
2; 2;           # number of int / double parameter

# int parameter
8;              # m -> i
3;              # n -> j

# double parameter
2.5;            # radius -> a
1.0;            # torus radius -> b

# curve parameter
331;            # number of points
0.0; 2.0 * pi;  # definition interval

# coordinate functions
(a + b * cos(i * x)) * cos(j * x);
(a + b * cos(i * x)) * sin(j * x);
b * sin(i * x);

The new parts are the curve parameter -- an int value for the number of points of the curve and two functions (of t) describing the definition interval -- and the coordinate functions (of x). As described in the previous section the time t and the int (i, ...) and double (a, ...) variables can be used for the coordinate functions.

In contrast to the torus knot Time-Object example this version requires no programming, but there are two thing we can't control: the number of points on the curve is fixed and not depending on the actual length of the curve as in the Time-Object version, and we cannot divide out the greatest common divisor of (m, n).



SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.