06-20-2001, 12:27 AM

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?

View Full Version : How to show a 3d model?

06-20-2001, 12:27 AM

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?

MrShoe

06-20-2001, 02:55 AM

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...

06-20-2001, 04:13 AM

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.

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.

ffish

06-20-2001, 04:24 AM

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.

Hope that helps.

chennes

06-20-2001, 08:04 AM

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).]

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).]

06-27-2001, 06:04 PM

thank you all,

i use chenne's method and i've now solved the problem. http://www.opengl.org/discussion_boards/ubb/smile.gif

i use chenne's method and i've now solved the problem. http://www.opengl.org/discussion_boards/ubb/smile.gif

Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.