title: Effecient way to draw Ellipse with OpenGL or D3D
body: <p>There is a fast way to draw circle like this</p>
  
  <pre><code>void DrawCircle(float cx, float cy, float r, int num_segments) 
  { 
      float theta = 2 * 3.1415926 / float(num_segments); 
      float c = cosf(theta);//precalculate the sine and cosine
      float s = sinf(theta);
      float t;
  
      float x = r;//we start at angle = 0 
      float y = 0; 
  
      glBegin(GL_LINE_LOOP); 
      for(int ii = 0; ii &lt; num_segments; ii++) 
      { 
          glVertex2f(x + cx, y + cy);//output vertex 
  
          //apply the rotation matrix
          t = x;
          x = c * x - s * y;
          y = s * t + c * y;
      } 
      glEnd(); 
  }
  </code></pre>
  
  <p>I am wondering if there is a similar way to draw ellipse where its major/minor axes vector and size are both known.</p>