bs3_surface_interp_knots
List of: Functions
Subjects: Construction Geometry, Spline Interface
Contents: Kernel

Action: Creates a bicubic surface that interpolates or fits a set of points, with specified boundary derivatives and twist vectors.

Prototype: bs3_surface bs3_surface_interp_knots (


int nu, // number points in u


int nv, // number points in v


SPAposition* points, // position array


double knotsu[], // u knot array


double knotsv[], // v knot array


SPAvector* deru, // u derivative array of




// end conditions


SPAvector* derv, // v derivative array of




// end conditions


SPAvector deruv[] // uv derivative array of




// corner twist vectors


);

Includes: #include "kernel/acis.hxx"

#include "baseutil/vector/position.hxx"

#include "baseutil/vector/vector.hxx"

#include "kernel/spline/bs3_srf/bs3surf.hxx"

#include "kernel/spline/d3_bs3/spd3rtn.hxx"

Description: This function interpolates or fits an array of positions, using knot vectors in the u and v directions, boundary derivatives (i.e., tangent vectors) and twist vectors.


nu is the number of positions in the u direction, nv the number of positions in the v direction. points is a two dimensional array of positions [nu*nv]. knotsu is the u knot vector, knotsv the v knot vector. Initially there is a one-to-one correspondence between knots and positions; however, it is required that the -1, -2, n and n+1 element of the knot vectors be addressable, though they need not be set. Therefore the knotsu and knotsv should both be of size [nu+4]. The point for u knot i and v knot j is points [j*nu + i]. The increasing u values are stored contiguously.


deru contains the start and end derivatives for the u direction, elements 0 to nv-1 for the bottom u knot end, and elements nv to 2*nv-1 for the top end. Specifying a zero length vector means that natural end conditions will be used for that place on the surface. derv and deru work the same way, replacing nv by nu.


Finally, deruv is an array of four vectors giving the twist vectors, i.e., the uv cross derivative at the corners of the domain. They are stored in the following order:


(lo_u,lo_v), (hi_u,lo_v), (lo_u,hi_v), (hi_u,hi_v)


As with first derivatives along the boundaries, a zero length vector is an indicator to use natural end conditions.


The interpolation algorithm assumes that all the knot values are distinct, the surface is open in both directions, and that there is generally nothing unusual going on.


As a side effect of the interpolation algorithm, this routine will set any vectors in derv which you have passed in as zero vectors. deru is left alone.

Library: kernel

Filename: kern/kernel/spline/d3_bs3/spd3rtn.hxx

Effect: Changes model
PDF/KERN/21FN3S1.PDF
HTM/DATA/KERN/KERN/21FN3S1/0036.HTM