[General Information]
Function Name=Chebyshev2D
Brief Description=Chebyshev Series Polynomials
Function Source=fgroup.Chebyshev2D
Function Type=Built-in
Function Form=Expression
Number Of Parameters=6
Number Of Independent Variables=2
Number Of Dependent Variables=1
Analytical Derivatives for User-Defined=Off


[Fitting Parameters]
Naming Method=User-Defined
Names=z0,A1,A2,B1,B2,C1
Meanings=?
Initial Values=--(V)
Lower Bounds=--(X, OFF)
Upper Bounds=--(X, OFF)
Number Of Significant Digits=


[Formula]
/*
z = z0 + A1*T1(x) + B1*T1(y) + A2*T2(x) + C1*T1(x)*T1(y) + B2*T2(y)
Where: x scaled -1 to +1
       y scaled -1 to +1
       Tn(x) = cos(n*acos(x))
*/
z = z0 + A1*cos(acos(x)) + B1*cos(acos(y)) + A2*cos(2*acos(x)) + C1*cos(acos(x))*cos(acos(y)) + B2*cos(2*acos(y));


[Constraints]



[Constants]


[Parameters Initialization]

Curve x_curve, y_curve;
bool bRes = get_interpolated_xz_yz_curves_from_3D_data(x_curve, y_curve, x_data, y_data, z_data);
if(!bRes) return;

z0 = min(x_curve);
A1 = max(x_curve) - z0;
A2 = max(x_curve) - z0;
B1 = max(x_curve) - z0;
B2 = max(x_curve) - z0;
C1 = max(x_curve) - z0;


[Initializations]



[After Fitting]



[On Param Change]



[Independent Variables]
x=
y=


[Dependent Variables]
z=


[Controls]
General Linear Constraints=Off
Initialization Scripts=Off
Scripts After Fitting=Off
Number Of Duplicates=N/A
Duplicate Offset=N/A
Duplicate Unit=N/A
Generate Curves After Fitting=Yes
Curve Point Spacing=Uniform on X-Axis Scale
Generate Peaks After Fitting=Yes
Generate Peaks During Fitting=Yes
Generate Peaks with Baseline=Yes
Paste Parameters to Plot After Fitting=Yes
Paste Parameters to Notes Window After Fitting=Yes
Generate Residuals After Fitting=No
Keep Parameters=No
Enable Parameters Initialization=0
Compile On Param Change Script=1


[Compile Function]
Compile=0
Compile Parameters Initialization=1
On Param Change Scripts Enabled=N/A


[Origin C Function Header]



[Origin C Parameter Initialization Header]
#include <origin.h>
#include <Nag_utils.h>



