I'm realy beginner in C# and i have a little bite difficulty with 3D plot in C#. I have alot of X and Y data points. X and Y for each profil make a 2d plot. I want to get all of profils together in 3d plot with constant steps (z).
I tried to do this with a chart in winform based on this question: How to plot a 3D Graph to represent an object in space
I have to admit, that does not work, like i am expecting. I've seen some programmers, who are using WPF for 3D plot. I did it in wpf through Point3D, but i don't think so, that my strategie on this was proper.
I can show some of my code:
double y = 1;
const double s = 0.1;
for (int i = 0; i <= Profil; i++)
//for (int i = 0; i < 5; i++)
{
try
{
for (int j = 0; j <= X[i].Count; j++)
//for (int j = 0; j < 10; j++)
{
try
{
Point3D p00 = new Point3D(X[i][j], Y[i][j], z);
Point3D p01 = new Point3D(X[i][j + 1], Y[i][j + 1], z);
Point3D p02 = new Point3D(X[i + 1][j], Y[i + 1][j], z + s);
Point3D p03 = new Point3D(X[i + 1][j + 1], Y[i + 1][j + 1], z + s);
// Add the triangles.
AddTriangle(mesh, p00, p01, p02);
AddTriangle(mesh, p01, p02, p03);
}
catch { continue; }
}
z += s;
}
catch { continue; }
}
X and Y are two dimensional lists. Could somebody help me?