:748B : :1 :2022-10-11 17:23:37
void myDisplay(void)
{
glBegin(GL_TRIANGLES);
glColor3f(1.0f, 0.5f, 1.0f);
glBegin(GL_POLYGON);
for (i = 0; i < n; i)
glVertex2f(R * cos(2 * Pi / n * i), R * sin(2 * Pi / n * i));
glEnd();
//
glColor3f(0.0f, 1.0f, 1.0f);
GLfloat a = 1 / (2 - 2 * cos(72 * Pi / 180));
GLfloat bx = a * cos(18 * Pi / 180);
GLfloat by = a * sin(18 * Pi / 180);
GLfloat cy = -a * cos(18 * Pi / 180);
GLfloat
PointA[2] = { 0, a }, PointB[2] = { bx, by },
PointC[2] = { 0.5, cy }, PointD[2] = { -0.5, cy },
PointE[2] = { -bx, by };
glBegin(GL_LINE_LOOP);
glVertex2fv(PointA); glVertex2fv(PointC);
glVertex2fv(PointE); glVertex2fv(PointB);
glVertex2fv(PointD);
glEnd();
glFlush();//函数启动OpenGL绘图命令的执行,并将图形光栅化后输出在设备上。
}
10-19VS2013 OpenGL 三视图界面
10-15vc2008 opengl显示3坐标轴
10-15opengl播放视频.cpp
10-12OpenGL图形程序设计指南
10-12OpenGL开发库
10-11OpenGL示例
10-10OpenGL茶壶绘制
11-01PPT图片裁剪成立体五角星样式