绘制半长轴和半短轴分别为a,b的椭圆

//绘制半长轴和半短轴分别为a,b的椭圆
void ellipse(double a,double b)
{
int n = 1000;
double t = 0.0;
glBegin( GL_LINE_LOOP);
for (int i = 0; i < n; ++i)
{
t
= i * 2 * 3.14159 / n;
glVertex2f(a
*cos(t), b*sin(t));
}
glEnd();
}

相关文章:

  • 2021-07-15
  • 2021-10-30
  • 2021-03-26
  • 2021-12-01
  • 2021-08-11
  • 2021-09-29
  • 2021-11-10
  • 2021-09-21
猜你喜欢
  • 2022-12-23
  • 2021-05-29
  • 2021-12-04
  • 2021-06-29
  • 2021-05-03
  • 2022-12-23
相关资源
相似解决方案