# Surface of Revolution advanced

Hey i want to draw a half egg in opengl (it a basket)
the egg should be hollow not solid.

this is my code when i draw this i get half hollow and half filled.
any help??

``````double x,y,z,r;
for(int longCount=0; longCount&lt;NUM_LONGITUDINAL_VERTICES; longCount++){ // along z axis
for(int latCount=0; latCount&lt;NUM_CIRCUMFERENTIALL_VERTICES; latCount++){ // x and y

z = sin(Pi*latCount/((double) (NUM_CIRCUMFERENTIALL_VERTICES-1))-Pi/2.0f);
r = cos(Pi*latCount/((double) (NUM_CIRCUMFERENTIALL_VERTICES-1))-Pi/2.0f);
x = (cos(Pi*longCount/(double) (NUM_LONGITUDINAL_VERTICES-1))*r);
y = (sin(Pi*longCount/(double) (NUM_LONGITUDINAL_VERTICES-1))*r);

vertices[longCount][latCount] = x; //x
vertices[longCount][latCount] = y; //y
vertices[longCount][latCount] = z; //z
}
}``````

The easy way to get the image you want is this:

``````
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
for(int latCount=0; latCount<Latitudes-1; latCount++)
{ // along z axis
what a legend 