Synopsis

PDX_MSGT gdx_EvalSurfaceDerivs(long option, MDA_PTR db_ptr, double uval, double vval, int max_derivs, double derivs[][GDX_MAX_DEG + 1][3])

Purpose

Evaluate derivatives on a GDX surface entity

Description

At a given U and V parameter value between 0.0 and 1.0 inclusive, evaluate derivatives on an GDX surface entity. The derivs array, derivs[j][i][3], returned is for all i, j such that:

             0 <= i + j <= max_derivs.

derivs[j][i][3] corresponds to the x, y, and z components of the derivative of the surface at uval, vval taken with respect to u i times and with respect to v j times (i.e., derivs[0][0][3] corresponds to the point on the surface and derivs[0][1][3] corresponds to the partial derivative with respect to u, etc.). Therefore, a max_derivs of 0 is equivalent to simply evaluating a point on the GDX surface entity.

The GDX surface entity must be a valid GDX definition. The derivatives can be evaluated from the left or right. The @a derivs array MUST be dimensioned to [max_derivs + 1][GDX_MAX_DEG + 1][3].

The default is to evaluate the derivitives from high U and V parameter values. By using the GDX_FROM_LOW_U or GDX_FROM_LOW_V options, the GDX surface can be evaluated from low U and/or low V values.

Input

option

GDX_UNNORM

Unnormalize the parameter values

GDX_FROM_LOW_U

Evaluate derivatives from the low U parameter insead of high U.

GDX_FROM_LOW_V

Evaluate derivatives from the low V parameter insead of high V.

db_ptr

The GDX surface entity database pointer

uval

The surface U parameter value to evaluate

vval

The surface V parameter value to evaluate

max_derivs

The maximium derivative required

Output

derivs

The 3D mixed partial derivatives

Return

      GDX_NOERR
      GDX_ENTITYNOTSURFACE
      Low level error return
      .fi