Hi,
I'm trying to plot a simple surface plot in 3D. I don't understand the interpolation, because:
For these data, being (x, y, z) the colums of the tabla matrix.
tabla[0][0]= 10;
tabla[0][1]= -50;
tabla[0][2]= 500;
tabla[1][0]= 10;
tabla[1][1]= -60;
tabla[1][2]= 500;
tabla[2][0]= 30;
tabla[2][1]= -50;
tabla[2][2]= 500;
tabla[3][0]= 30;
tabla[3][1]= -60;
tabla[3][2]= 500;
tabla[0][0]= 10;
tabla[0][1]= -50;
tabla[0][2]= 500;
tabla[1][0]= 10;
tabla[1][1]= -60;
tabla[1][2]= 500;
tabla[2][0]= 30;
tabla[2][1]= -50;
tabla[2][2]= 500;
tabla[3][0]= 30;
tabla[3][1]= -60;
tabla[3][2]= 500;
To copy to clipboard, switch view to plain text mode
then I call the function to plot
m_3dPlot->loadFromData(tabla, 3, 4, 10, 30 , -60,-50 ); //being 3 = colums, 4= rows, 10 = minX, 30 = maxX, -60 = minY, -50= maxY
m_3dPlot->loadFromData(tabla, 3, 4, 10, 30 , -60,-50 ); //being 3 = colums, 4= rows, 10 = minX, 30 = maxX, -60 = minY, -50= maxY
To copy to clipboard, switch view to plain text mode
The graph is attached.
It is shown that, for the values in Y axis, thera are oscillation. For example, for any vaule of X and Y = -60, Z should be 500, but it is 0.
And then the Z value decreases for an Y value arround -58, and then increases to get 500 for a Y value arround -54. And then it decreases again to 0 in Y = -50.
Z value should be always 500, because of every Z data inserted is 500 (at any Y and X value). So the interpolation must result also Z=500, but instead, the Z value increases and decreases in a strange way.
Has someone any idea? The values must be sorted? If yes, wich is the criteria (sorted by X values or Y, or Z).
Thanks a lot!!!
Bookmarks