# Surface Texure

I have written a program in c++ which gives me the value of x,y,z co-ordinates.Using these particular values(x,y,z)I want to display a 3D picture.
How can i display the surface texture using these(x,y,z) values.

Can anybody explain/show me the steps required to display the surface.

Thanks
aus

Originally posted by aus79er:
[b]I have written a program in c++ which gives me the value of x,y,z co-ordinates.Using these particular values(x,y,z)I want to display a 3D picture.
How can i display the surface texture using these(x,y,z) values.

Can anybody explain/show me the steps required to display the surface.

Thanks
aus[/b]

Groups these points together in triangles, then render them by using

glBegin(GL_TRIANGLES);
glVertex3f(/the point coordinates go here/);

glEnd();

I have written the following code
glClear(GL_COLOR_BUFFER_BIT);
for (int si = 1; si < 39; si++)
{
glColor3f (0.0f, 1.0f, 0.f);
glVertex3f(xw[si], yw[si], zw[si][si]);
glVertex3f(xw[si+1], yw[si+1], zw[si+1][si+1]);
glVertex3f(xw[si+2], yw[si+2], zw[si+2][si+2]);
glVertex3f(xw[si+3], yw[si+3], zw[si+3][si+3]);

}
glEnd();

where xw having values 1,2,3,4,5…etc
yw has 1,2,3,4 etc
while zwhas 100,99,99.67,99.75 etc…
But i get a blank screen .
Can any body explain me the problem
thanks,
aus

I got something after scaling down the x,y,z values but the display is not what i wanted.
I doesn’t look 3D

Can i enhance it ,

How can i use mouse to zoom the image…

aus

Originally posted by aus79er:

I doesn’t look 3D

I think you forgot to set the lights. Lights are needed by OpenGL to calculate how darker or brighter will the polygon be because of its position. Also you must calculate the normals to each polygon to get real light shading.