BRL-CAD
nurb_diff.c File Reference
#include "common.h"
#include "bio.h"
#include "vmath.h"
#include "nmg.h"
#include "raytrace.h"
#include "nurb.h"
Include dependency graph for nurb_diff.c:

Go to the source code of this file.

Functions

struct face_g_snurb * rt_nurb_s_diff (const struct face_g_snurb *srf, int dir)
 
struct edge_g_cnurb * rt_nurb_c_diff (const struct edge_g_cnurb *crv)
 
void rt_nurb_mesh_diff (int order, const fastf_t *o_pts, fastf_t *n_pts, const fastf_t *knots, int o_stride, int n_stride, int o_size, int pt_type)
 

Detailed Description

Differentiate a Non Uniform Rational B-Spline (NURB) Surface.

Definition in file nurb_diff.c.

Function Documentation

struct face_g_snurb* rt_nurb_s_diff ( const struct face_g_snurb *  srf,
int  dir 
)

Given a NURB surface and a direction, differentiate the surface and return a new surface which is the derivative of the original surface.

The algorithm is found in the following reference:

Carl De Boor, "A Practical Guide To Splines", page 139

The algorithm deals mainly with the new control mesh, but the new knot vector is a subset of the original. (subtract a knot from each of the ends).

Arguments to rt_nurb_s_diff() – srf - NURB surface dir - parametric direction of the split.

Definition at line 58 of file nurb_diff.c.

References rt_nurb_mesh_diff(), and rt_nurb_new_snurb().

Referenced by rt_nurb_curvature(), rt_nurb_par_edge(), and rt_nurb_s_norm().

Here is the call graph for this function:

struct edge_g_cnurb* rt_nurb_c_diff ( const struct edge_g_cnurb *  crv)

Definition at line 133 of file nurb_diff.c.

References rt_nurb_mesh_diff(), and rt_nurb_new_cnurb().

Referenced by rt_cnurb_par_edge().

Here is the call graph for this function:

void rt_nurb_mesh_diff ( int  order,
const fastf_t o_pts,
fastf_t n_pts,
const fastf_t knots,
int  o_stride,
int  n_stride,
int  o_size,
int  pt_type 
)

Definition at line 163 of file nurb_diff.c.

References ZERO.

Referenced by rt_nurb_c_diff(), and rt_nurb_s_diff().