A beginner for help

*.TXT FORMAT LIKE THIS:
16 100 0
615762.240 95499.120 628.000
615762.140 95505.290 628.000
615762.030 95508.960 628.000
615761.470 95513.700 628.000
615760.860 95517.320 628.000
615759.740 95521.440 628.000
615758.820 95524.250 628.000
615755.810 95531.030 628.000
615753.730 95536.020 628.000
615750.720 95543.670 628.000
615746.690 95552.280 628.000
615741.690 95562.730 628.000
615740.570 95565.840 628.000
615737.460 95575.480 628.000
615736.190 95580.320 628.000
615733.640 95590.660 628.000

points’ struct:

struct POINT{
double x,y,z;
int NextPoint;
}

use vc++6.0 and mfc, I want see the points on the screen with 3D mode, can someone priovde any code? thanks.

So you just want to see the points…

I assume you understand how to get the points from the file into the struct object, correct ?

When that is done you can just have a peek at any OpenGL tutorial, steel the code from it and modify it to fir your data.

To display your points you would do something like this…

  
 NextPoint list[ ...];
 int i;
 glBegin( GL_POINTS);

 for( i = 0; i < listlength; i++)
 {
   NextPoint* p = &list[ i];
   glVertex3d( p->x, p->y, p->z);
 }

 glEnd();

You will of course have to setup projection and modelview matrix, lighting/colors and so on, but all that can be found in any tutorial on OpenGL.

Mikael

thanks.I will do this in my Project.