You can use randomly oriented xyz data. To do that you use a QCStatic constructor that creates a group dataset. The x-values of the group data set are the x-values of the data points. The y-values of the group dataset are organized as two groups, the first group are the y-values of the data points, the second group are the z-values of the datapoints. Here is a slight re-working of the data generating routine of the ContourD example program.
CContourDDoc::CContourDDoc()
{
int i,j, k = 0;
static BOOL fInit = TRUE;
// create simulation data for plots
/*--------------------------------------------------------------*/
if (fInit) // do not initialize data twice
{
WGStart(); // Initialize the DLL if WGCreatePage is no the first call
realtype x=0, y=0, z=0;
int nNump1 = 30 * 30; // 900 points
int nNumGroups = 2;
int kk = 0;
// lpX1 and lpY1 are defined in ContourDDoc.h as
// LPREAL lpX1;
// LPREAL lpY1;
// don't forget to delete lpX1 and lpY1 when you are done with them in the class's destructor
lpX1 = new realtype [nNump1];
lpY1 = new realtype [nNumGroups * nNump1];
for (i=0; i < 30; i++)
{
for (j=0; j < 30; j++)
{
x = (realtype) j / 2.0 -7.5;
y = (realtype)i / 2.0 - 7.5;
z = functionproc1(x, y);
lpX1[kk] = x;
lpY1[kk * 2] = y;
lpY1[kk * 2 + 1] = z;
kk++;
}
}
pContourData = new QCStaticData ("Contour Data",lpX1,lpY1, nNump1, nNumGroups);
fInit = FALSE;
}
}
CContourDDoc::~CContourDDoc()
{
delete pContourData;
delete lpX1;
delete lpY1;
}