rt_dspline.c File Reference

#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "machine.h"
#include "vmath.h"
#include "bu.h"
#include "raytrace.h"

Include dependency graph for rt_dspline.c:

Go to the source code of this file.

Functions

void rt_dspline_matrix (fastf_t *m, const char *type, const double tension, const double bias)
double rt_dspline4 (fastf_t *m, double a, double b, double c, double d, double alpha)
void rt_dspline4v (double *pt, const fastf_t *m, const double *a, const double *b, const double *c, const double *d, const int depth, const double alpha)
void rt_dspline_n (double *r, const fastf_t *m, const double *knots, const int nknots, const int depth, const double alpha)


Detailed Description

Simple data (double) spline package.

rt_dspline_matrix(m, type, tension, bias) create basis matrix rt_dspline4(m, a, b, c, d, alpha) interpolate 1 value rt_dspline4v(m, a, b, c, d, depth alpha) interpolate vectors rt_dspline(r, m, knots, n, depth, alpha) interpolate n knots over 0..1

Example: mat_t m; double d; vect_t v; vect_t kn = { {0., 0., 0.}, {0., 1., 0.}, {.5, 1., 0.}, {1., 1., 0.}, {1., 0., 0.} };

rt_dspline_matrix(m, "Beta", 0.5, 1.0);

d = rt_dspline4(m, .0, .0, 1.0, 1.0, 0.25);

for (p = 0.0 ; p <= 1.0 ; p += 0.0625 ) { rt_dspline(v, m, kn, 5, 3, p); bu_log("%g (%g %g %g)\n", p, V3ARGS(v)); }

Author - Lee A. Butler

Source - The U. S. Army Research Laboratory Aberdeen Proving Ground, Maryland 21005-5068 USA

Definition in file rt_dspline.c.


Function Documentation

void rt_dspline_matrix fastf_t m,
const char *  type,
const double  tension,
const double  bias
 

Definition at line 137 of file rt_dspline.c.

References bu_log().

Here is the call graph for this function:

double rt_dspline4 fastf_t m,
double  a,
double  b,
double  c,
double  d,
double  alpha
 

Definition at line 163 of file rt_dspline.c.

void rt_dspline4v double *  pt,
const fastf_t m,
const double *  a,
const double *  b,
const double *  c,
const double *  d,
const int  depth,
const double  alpha
 

Definition at line 190 of file rt_dspline.c.

void rt_dspline_n double *  r,
const fastf_t m,
const double *  knots,
const int  nknots,
const int  depth,
const double  alpha
 

Definition at line 240 of file rt_dspline.c.

References bu_bomb(), int, and rt_dspline4v().

Here is the call graph for this function:


Generated on Mon Sep 18 01:25:09 2006 for BRL-CAD by  doxygen 1.4.6