Results 1 to 6 of 6

Thread: How to show a 3d model?

  1. #1
    Guest

    How to show a 3d model?

    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?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    426

    Re: How to show a 3d model?

    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...
    :: Sleep is a poor substitute for caffeine ::

  3. #3
    Guest

    Re: How to show a 3d model?

    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.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: How to show a 3d model?

    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.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    State College, PA
    Posts
    186

    Re: How to show a 3d model?

    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:

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

  6. #6
    Guest

    Re: How to show a 3d model?

    thank you all,

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

Similar Threads

  1. How to Show model views with the keyboard or menu
    By Scorpio in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-31-2011, 06:29 PM
  2. Replies: 0
    Last Post: 08-02-2006, 09:24 PM
  3. Replies: 5
    Last Post: 08-02-2006, 01:59 AM
  4. Replies: 1
    Last Post: 06-02-2006, 11:52 AM
  5. How to export a model from 3D Studio MAX and show it in C++ using OpenGL
    By muhammadatharniaz in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-18-2003, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean