NAME

fit_frame -- fit orientation/position of 3D frame

PROTOTYPE

unitptr fit_frame( int iNum, char *pcOptions, unitptr uHost)

ARGUMENTS

int iNum
nr of points to transform
char *pcOptions
option string (may be NULL)
unitptr uHost
host unit

RETURN VALUE:

A pointer to the created unit or NULL in the case of an error.

INTERFACE OF CREATED UNIT:

inp_0[3]:
(input field 0) current position
inp_1[3]:
(input field 1) current primary direction
inp_2[3]:
(input field 2) current secondary direction
inp_3[3]:
(input field 3) desired position
inp_4[3]:
(input field 4) desired primary direction
inp_5[3]:
(input field 5) favored secondary direction
inp_6[3*iNum]:
(input field 6) input points to transform (absent if iNum=0 )
CTL_in[1]:
(control field)
X_out[16]:
(packed output field 0) fitted new transform into world coordinates (see below)
Y_out[3*iNum]:
(output field 1) transformed points (absent for iNum=0 )

DESCRIPTION:

This unit computes a homogeneous coordinate transform that maps the given position inp_0[] and orientation inp_1[] into a desired position inp_3[] and orientation inp_4[]. The remaining rotational degree of freedom is fixed by requiring that a `secondary direction'' inp_2[] be rotated as closely as possible into a `favored secondary direction'' inp_5[]. The computed homogeneous transform T is available at out_0[]. If iNum!=0, T is applied to iNum vectors that are given (as a single long vector of 3iNum elements) at inp_7 (for iNum=0, this field is absent). The transformed result vectors are available at out_1[].

EXAMPLES:

STATUS:

Preliminary.

SEE ALSO:

FILE

/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../foldersrc/nst_geo.c