<<<<<<<<<<<<<<<<<

data(oscar) Animation data(oscar)

NAME

data - spline data

SUPERCLASS

object

DESCRIPTION

Data is used to specify and manipulate arrays of floating point values used for generation of various splines. It can be used as indexed arrays for other then spline purposes. Indexing is based on the floating point t (time) parameter. For special type k_splines (see description in Computer Graphics, vol. 18, number 3, pp. 33-41, July 1984) extra variables (bias, tension and continuity) are used for each t value of data object.

INSTANCE VARIABLES

default_bias is the value of the bias assigned to all t's (default is 0, range is (-1, 1)).

default_continuity is the value of the continuity assigned to all t's (default is 0, range is (-1, 1)).

default_tension is the value of the tension assigned to all t's (default is 0, range is (-1, 1)).

default_value is the the value assigned to all t's.

dimension is the dimension of the data sets.

max_t is the maximum of the t values.

min_t is the minimum of the t values.

normalize_t indicates if t should be returned (with t? and ts? messages) normalized or not.

MESSAGES

= argument Set the value at the current t.

@ argument Set the current value of t.

all_biases= argument Set all biases to the list of arguments.

all_continuities= argument Set all continuities to the list of arguments.

all_tensions= argument Set all tensions to the list of arguments

all_values= argument Set all values to the list of arguments.

bias= argument Set the the bias at the current t to the argument value(s).

bias? Return the bias value(s).

biases? Return all biases corresponding to all t's.

continuities? Return all continuities corresponding to all t's.

continuity= argument Set the the continuity at the current t to the argument value(s).

continuity? Return the continuity value(s).

count? Return the number of values of t.

default_bias= argument Set the the default_bias to the argument value(s).

default_bias? Return the default_bias value(s).

default_continuity= argument Set the the default_continuity to the argument value(s).

default_continuity? Return the default_continuity value(s).

default_tension= argument Set the the default_tension to the argument value(s).

default_tension? Return the default_tension value(s).

default_value= argument Set the the default_value to the argument value(s).

default_value? Return the default_value value.

dimension? Return the dimension of the data.

dimension= argument Set the dimension of the data.

free! Free storage associated with data object.

max_t? Return the maximum of t values.

max_value? Return the maximum value (a vector of maximums in each coordinate of multidimensional data).

min_t? Return the minimum of t values.

min_value? Return the minimum value(s) (a vector of maximums in each coordinate of multidimensional data).

normalize! Normalize t's and values (in each coordinate independently) to be between 0 and 1.

normalize_t! Normalize t's between 0 and 1.

normalize_value! Normalize values (in each coordinate independently) to be between 0 and 1.

print! Print data object.

t- argument Delete the values of t and associated data values for t values in argument.

t= (arg1,arg2,...) Adds all arguments as time steps for the data object. Normally only given one argument, but the multiple argument form is useful when copying the entire state from one data object to another using the messages all_biases=, all_values=, etc. After executing this message, the object's current t value is the last one in the argument list.

t? Return the current value of t.

tension= argument Set the tension at the current t to the argument.

tension? Return the tension at current t.

tensions? Return all tensions corresponding to all t's.

ts? Return all t values.

value= argument Set the value at the current t to the argument value(s).

value? Return value(s) at current t.

values? Return value(s) at at all t's.

xs? Return x values (the first coordinates) at all t's.

ys? Return y values (the second coordinates, if any) at all t's.

zs? Return z values (the third coordinates, if any) at all t's.

EXAMPLE

Usually data values in data objects are generated automatically by other objects. The following example is the golf ball trajectory data generated by golf simulation script.

data new: a /* @ 43a980 */ dimension= 3 default_tension = 0.000000 default_bias = 0.000000 default_continuity= 0.000000 ; a t= 0.000000 value=(59.488998,37.787998,10.814064) t= 0.031974 value=(59.248737,37.482471,10.821059) t= 0.354164 value=(57.275223,35.117577,10.867580) t= 0.398707 value=(57.028694,34.844330,10.870672) t= 0.980022 value=(53.966473,31.886972,10.852688) t= 1.254697 value=(52.624306,30.857674,10.825972) t= 1.589105 value=(51.083633,29.889307,10.776805) t= 1.810077 value=(50.125591,29.401787,10.743957) t= 2.188060 value=(48.623528,28.819101,10.691098) t= 2.432250 value=(47.760090,28.591930,10.660764) t= 2.740013 value=(46.807487,28.445652,10.625285) t= 2.965074 value=(46.210720,28.420330,10.601172) t= 3.283496 value=(45.513020,28.472631,10.570757) t= 3.464680 value=(45.193218,28.534472,10.555984) t= 3.775931 value=(44.772594,28.667595,10.535186) t= 3.990630 value=(44.572964,28.761383,10.524386) t= 4.370722 value=(44.381153,28.886732,10.512815)

;

a print!;

SEE ALSO

spline, c_spline, k_spline, o_spline, q_spline


Please send comments and suggestions to
consult@rpi.edu