next up previous contents index
Next: Spline_Editor Up: Classes and Methods Previous: Slider

Spline1d

  (subclass of Root)

A spline of arbitrary degree. If the degree is 3 it can be edited using Spline_Editors.

   GRAPE(spline1d, "assign")(source)
SPLINE1D *spline1d
SPLINE1D *source
An instance method, which will assign the values of an existing spline to another. It will also adapt the length of the of the allocated lists, using "list-free" and "list-alloc".
   GRAPE(spline1d, "delete-point")(upos, fpos, eps)
SPLINE1D *spline1d
double upos, fpos
Delete a point from spline1d, with the maximal distance eps.
   (double * ) GRAPE(spline1d, "eval")(arg)
SPLINE1D *spline1d
double arg
Calculates the return value of the spline at the point arg. If the argument is out of the definition interval the function will return the value of the next reachable point (value of last point or value of the first point).
   GRAPE(spline1d, "get-min-max")(min, max)
SPLINE1D *spline1d
double *min, *max
Calculates the minimal and maximal return values of the spline. Up to now this function simply calculates the values at 20*num_of_intervals points of the definition interval.
   (SPLINE1D * ) GRAPE(spline1d, "hardcopy")()
SPLINE1D *spline1d
Overloading inherited method of class Root.
   GRAPE(spline1d, "insert-point")(upos, fpos)
SPLINE1D *spline1d
double upos, fpos
Insert a new point into spline1d. The derivative is initialized with the previous value.
   (double * ) GRAPE(spline1d, "inv-eval")(arg)
SPLINE1D *spline1d
double arg
Returns inverse of arg.
   GRAPE(spline1d, "knots2bezier")()
SPLINE1D *spline1d
Generates the spline parameters from the knot positions and tangents.
   GRAPE(spline1d, "list-alloc")(length)
SPLINE1D *spline1d
int length
Allocates memory for length knots (in other words length-1 intervals).
   GRAPE(spline1d, "list-free")()
SPLINE1D *spline1d
   GRAPE(spline1d, "read")(file_name)
SPLINE1D *spline1d
char *file_name
Read a .sp file into an existing instance.
   GRAPE(spline1d, "set-linear")(const1, const2, min_arg, max_arg, max_deg, mno_intervals)
SPLINE1D *spline1d
double const1, const2, min_arg, max_arg
int max_deg, mno_intervals
This method will first call the methods "list-alloc" -- eventually calling "list-free" before -- and use max_deg as the new maximal degree of the spline and mno_intervals as the new maximal number of intervals. The maximal degree of the spline must be 3, other values are not supported up to now. After allocating memory for the new spline, it will create a linear spline with the start knot (const1, min_arg) and the end knot (const2, max_arg).

   GRAPE(spline1d, "set-value-for")(arg, val, eps, insert_new_knot_if_needed)
SPLINE1D *spline1d
double arg, val, eps
int insert_new_knot_if_needed
Does what it says.
   GRAPE(spline1d, "write")(file_name)
SPLINE1D *spline1d
char *file_name
Write itself as a .sp file.


next up previous contents index
Next: Spline_Editor Up: Classes and Methods Previous: Slider

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.