##### Ninja Library - Mathematical Function

# njKochanekSpline

Interpolates Koshanek spline

### FORMAT

`

  void njKochanekSpline( *idata, *odata, *attr, frame )
  float *idata
  float *odata
  NJS_SPLINE *attr
  float frame

`

### PARAMETER

  `*idata` | Input data (but idata[3*4])
  `*odata` | Output data (but odata[3])
  `*attr` | Spline attribute
  `frame` | Frame

### RETURN

  None

### DESCRIPTION

  Stores spline curve correction value in the specified parameter. Please set the frame number to a value between 0 and 1. For the attributes, please specify tension, bias, and continuity at the fparam members (attr->fparam[0], attr->fparam[1],attr->fparam[2]) of the spline attribute structure (each ranging from -1.f to 1.f).

### EXAMPLE

      #include <Shinobi.h>
      #define X1  1.f
      #define Y1  0.f
      #define Z1  0.f
      #define X2  5.f
      #define TENSION 0.2f
      #define BIAS 0.1f
      #define CONT -0.1f
      	:
      float idata[3][4] =
      {
       {X1, Y1, Z1},
       {X2, Y2, Z2},
       {X3, Y3, Z3},
       {X4, Y4, Z4},
      };
      float odata[3];
      NJS_SPLINE attr;
      	:
      attr.fparam[0] = TENSION;
      attr.fparam[1] = BIAS;
      attr.fparam[2] = CONT;
      njKochanekSpline((float*)idata, odata, &attr, 0.5f);
      	:

### REFERENCE

  `njOverhauserSpline()
  njCardinalSpline()
  `

njKochanekSpline

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999