- 18
- 0
- 约1.75千字
- 约 5页
- 2021-10-26 发布于福建
- 举报
《计算机图形学实验》报告
任课教师:钱文华
2016 年春季学期
实验一 :DDA 直线段生成
实验时间: 2016 年 11 月 3 日
实验地点:信息学院 2204
实验目的:掌握 DDA 直线段生成
程序代码: #include stdlib.h
#includestdio.h
#include math.h
#includeglut.h
void init(void)
{
glClearColor(1.0,1.0,1.0,0.0);
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0,200.0,0.0,150.0);}
void setPixel(GLint x,GLint y)
{glBegin (GL_POINTS);
glVertex2i(x,y);
glEnd();
}//xianshiyigedian
inline int round (const float a)
原创力文档

文档评论(0)