1. 算法
2. 源代码
#include "stdafx.h"
#include "GL/glut.h"
#include "stdlib.h"
void init()
{
glClearColor(1.0,1.0,1.0,0.0);
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0,600.0,0.0,400.0);
}
inline int round(int x)
{
return int(x+0.5);
}
void setPixel(int x, int y)
{
glBegin(GL_POINTS);
glVertex2i(x,y);
glEnd();
这篇博客详细介绍了如何使用算法生成椭圆,包括具体的源代码实现和实验结果显示,展示了计算机图形学在图形绘制方面的应用。
订阅专栏 解锁全文
7699

被折叠的 条评论
为什么被折叠?



