I want to build a 3d model.I’ve got the space coordinates of 3d points on the surface of the model. There are about 10,000 points. How can I show the model in 3d?

If the points are in the right order, you can do a simple mesh with GL_LINE_STRIP and cycle through all the coords, if they are not in order you will need more info…

Originally posted by mikejoe:

I want to build a 3d model.I’ve got the space coordinates of 3d points on the surface of the model. There are about 10,000 points. How can I show the model in 3d?

Thank you, MrShoe,

My points are put in this order: one level after another ,and each level has the same number of points.

There are about 70 levels ,and in each level there are 200 points .

Somebody once told me that i should use triangles. But i don’t know how to use it.

You could do it with a marching cubes algorithm, or Delaunay triangulation. 2D Delaunay triangulation is trivial, 3D is much more difficult. There may be implementations of it on the web if you search. There will be examples of marching cubes all over the place if you search.

Hope that helps.

I’m not exactly sure how your data is set up in the cutting planes, but if it is anything like mine, then it’s a piece of cake:

for (int i = 0; i < numPlanes-1; i++)

{

glBegin(GL_TRIANGLE_STRIP);

for (int j = 0; j < numPointsOnPlane; j++)

{

glVertex(plane[i].point[j]);

glVertex(plane[i+1].point[j]);

}

glVertex(plane[i].point[0]); //close the surface

glVertex(plane[i+1].point[0]);

glEnd();

}

Chris

[This message has been edited by chennes (edited 06-20-2001).]

thank you all,

i use chenne’s method and i’ve now solved the problem.