title: how to draw a spiral using opengl
body: <p>I want to know how to draw a spiral.</p>
  
  <p>I wrote this code: </p>
  
  <pre><code>void RenderScene(void)
  {
      glClear(GL_COLOR_BUFFER_BIT);
      GLfloat x,y,z = -50,angle;
      glBegin(GL_POINTS);
  
      for(angle = 0; angle &lt; 360; angle += 1)
      {   
          x = 50 * cos(angle);
          y = 50 * sin(angle);
          glVertex3f(x,y,z);
          z+=1;
      }
      glEnd();
      glutSwapBuffers();
  }
  </code></pre>
  
  <p>If I don't include the z terms I get a perfect circle but when I include z, then I get 3 dots that's it. What might have happened?</p>
  
  <p>I set the viewport using glviewport(0,0,w,h)</p>
  
  <p>To include z should i do anything to set viewport in z direction?</p>