OpenGl构建基本的房子word版_第1页
OpenGl构建基本的房子word版_第2页
OpenGl构建基本的房子word版_第3页
OpenGl构建基本的房子word版_第4页
OpenGl构建基本的房子word版_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、传播优秀Word版文档 ,希望对您有帮助,可双击去除!CategoryItemsMark allocatedGradeDemo(10 marks)(H) house - A house should be created and displayed.2(T) tree- At least one tree should be created and displayed2(S) Sun the sun is a must object.2(E) extra environment object(s) - you can create any other extra object on the p

2、iece of land you have. 2(V) viewpoints - your program should enable viewer to view your home with different angles. 2Sub-total: 10Final Report(20 marks)(C) clarity - Does your report explain everything that you did?2(D) design - Did you design your implementation well? Did you use any CG technique(s

3、) where appropriate? 2(E) English - Are there any spelling or grammatical errors? Is your writing clear and succinct?2(N) neatness - Are the text, code and figures laid out well? Is your writing/printing legible?2(T) thoroughness - Is the report complete? Did you leave important things out? Did you

4、forget to describe important cases, rules, or program behaviour? Did you make errors in your project that arent listed in the shortcomings?2Sub-total: 10Total: out of 20 General Comments:传播优秀Word版文档 ,希望对您有帮助,可双击去除! Introduction and Motivation: 我们的实验包括房子、栅栏、小狗住的房子、树木、机器人、太阳、草地等几个简单的事物,保证了能够从各个角度观看到,完

5、成了对项目的基本要求。 在实验创建中,我们首先按照要求构思出整体的框架,需要做哪些事物,以及每个事物的大体位置,接着计算各个点的坐标,之后分工进行,每个人做一到两个事物,最后将所有事物整合在一起。 还遇到的一个问题是,保证所有物体能够合理的展现出来,不出现掩盖或不能显示效果的现象,这首先是对物体的创建和坐标的把握,然后是对基本变换功能的掌握,对于这方面的设计,不仅需要严谨计算还要学习功能的设计。Design and Implementations: 一开始大体的想法是设计一个带有烟囱的尖顶房子,后来在做房顶的时候遇到了困难,房顶的两侧无法显示,后来找到的改进方法是将房顶做成一个长方体,并将长方

6、体上的两个点合并,并缩短X轴上的距离,加上深度测试,最终出现了想要的效果;之后用类似的方法做出了树和小狗住的房子;太阳一开始想用实验三的方法通过圆去做,后来效果不理想,我们组在网上找到了glutSolidSphere();画球的方法。由此也学会了glutSolidCube();画立方体的方法,利用这种方法做出了栅栏,然后两者综合做出了机器人Shortcomings: 设计完实验作业,我们存在着很多的不足,首先,构图坐标有些繁杂冗长,导致代码的篇幅有些长。第二,因为功底是在太差,没有做出贴图和光源,导致整体不是很漂亮。第三,实验思路有些混乱,经常是想起来什么就做什么,导致效率变低。传播优秀Wor

7、d版文档 ,希望对您有帮助,可双击去除! Conclusions: 总体来说,能够把项目做到这样的效果,我们还是很满意的,但是还是对没有将四面的背景分别设定表达感到遗憾。 如果要重新做一遍,我会选择学习并使用纹理的表现,这个功能的优点是能够使事物表现更为逼真。 这门课程让我对CG这门学科有了最基本的认识和学习,希望以后有机会可以多加接触。Appendix: #include#include#include#include using std:cout;#define _USE_MATH_DEFINES #include double rotate_y = -15; /定义键盘控制旋转X轴,默认

8、-5度double rotate_x = -15; /定义键盘控制旋转Y轴,默认0度GLfloat w = 800;GLfloat h = 600;GLfloat anglePyramid = 0.0f;GLfloat angleCube = 0.0f;void display(void)glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glMatrixMode(GL_MODELVIEW);glLoadIdentity();glTranslatef(0.0f, -100.0f, 0.0f);/ (左,上,前)glScalef(100, 100

9、, 100); / 放大图像(也可以更改点的数据来达到此效果)/Rotate语句:(旋转度数,X,Y,Z)/ 延X,Y,Z轴旋转/太阳(不能动)glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-5.0, 5.0, 5.0);glutSolidSphere(1.5, 20, 20);glPopMatrix();传播优秀Word版文档 ,希望对您有帮助,可双击去除!glRotatef(rotate_x, 1.0, 0.0, 0.0);glRotatef(rotate_y, 0.0, 1.0, 0.0);/*/太阳(可以动)glColor3f

10、(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-5.0, 5.0, 5.0);glutSolidSphere(1.5, 20, 20);glPopMatrix();*/房子的两部分公用一个坐标系,屏幕远向近为Z轴,由下向上是Y轴,由左向右是X轴/*房顶*/顶glBegin(GL_QUADS);glColor3f(0.0f, 0.0f, 0.502f);glVertex3f(2.05f, 3.5f, 0.0f);glVertex3f(-2.05f, 3.5f, 0.0f);glVertex3f(-2.05f, 3.5f, 0.0f);glVertex3f

11、(2.05f, 3.5f, 0.0f);/ 底glColor3f(0.0f, 0.0f, 0.502f);glVertex3f(3.5f, 1.5f, 2.5f);glVertex3f(-3.5f, 1.5f, 2.5f);glVertex3f(-3.5f, 1.5f, -2.5f);glVertex3f(3.5f, 1.5f, -2.5f);/ 前glColor3f(0.0f, 0.0f, 0.502f);glVertex3f(2.05f, 3.5f, 0.0f);glVertex3f(-2.05f, 3.5f, 0.0f);glVertex3f(-3.5f, 1.5f, 2.5f);glV

12、ertex3f(3.5f, 1.5f, 2.5f);/ 后glColor3f(0.0f, 0.0f, 0.502f);glVertex3f(3.5f, 1.5f, -2.5f);glVertex3f(-3.5f, 1.5f, -2.5f);glVertex3f(-2.05f, 3.5f, 0.0f);glVertex3f(2.05f, 3.5f, 0.0f);/ 左glColor3f(0.0f, 0.0f, 0.502f);glVertex3f(-2.05f, 3.5f, 0.0f);glVertex3f(-2.05f, 3.5f, 0.0f);glVertex3f(-3.5f, 1.5f,

13、-2.5f);glVertex3f(-3.5f, 1.5f, 2.5f);/ 右glColor3f(0.0f, 0.0f, 0.502f);glVertex3f(2.05f, 3.5f, 0.0f);glVertex3f(2.05f, 3.5f, 0.0f);glVertex3f(3.5f, 1.5f, 2.5f);glVertex3f(3.5f, 1.5f, -2.5f);glEnd();/*烟囱*/传播优秀Word版文档 ,希望对您有帮助,可双击去除!/顶glBegin(GL_QUADS);glColor3f(0.502f, 0.0f, 0.0f);glVertex3f(3.0f, 4.0

14、f, -1.0f);glVertex3f(2.0f, 4.0f, -1.0f);glVertex3f(2.0f, 4.0f, 1.0f);glVertex3f(3.0f, 4.0f, 1.0f);/ 底glColor3f(0.502f, 0.0f, 0.0f);glVertex3f(3.0f, 2.0f, 1.0f);glVertex3f(2.0f, 2.0f, 1.0f);glVertex3f(2.0f, 2.0f, -1.0f);glVertex3f(3.0f, 2.0f, -1.0f);/ 前glColor3f(0.502f, 0.0f, 0.0f);glVertex3f(3.0f, 4

15、.0f, 1.0f);glVertex3f(2.0f, 4.0f, 1.0f);glVertex3f(2.0f, 2.0f, 1.0f);glVertex3f(3.0f, 2.0f, 1.0f);/ 后glColor3f(0.502f, 0.0f, 0.0f);glVertex3f(3.0f, 2.0f, -1.0f);glVertex3f(2.0f, 2.0f, -1.0f);glVertex3f(2.0f, 4.0f, -1.0f);glVertex3f(3.0f, 4.0f, -1.0f);/ 左glColor3f(0.502f, 0.0f, 0.0f);glVertex3f(2.0f,

16、 4.0f, 1.0f);glVertex3f(2.0f, 4.0f, -1.0f);glVertex3f(2.0f, 2.0f, -1.0f);glVertex3f(2.0f, 2.0f, 1.0f);/ 右glColor3f(0.502f, 0.0f, 0.0f);glVertex3f(3.0f, 4.0f, -1.0f);glVertex3f(3.0f, 4.0f, 1.0f);glVertex3f(3.0f, 2.0f, 1.0f);glVertex3f(3.0f, 2.0f, -1.0f);glEnd();/*屋子*/顶glBegin(GL_QUADS);glColor3f(1.0f

17、, 0.0f, 0.0f);glVertex3f(2.0f, 1.5f, -1.5f);glVertex3f(-2.0f, 1.5f, -1.5f);glVertex3f(-2.0f, 1.5f, 1.5f);glVertex3f(2.0f, 1.5f, 1.5f);/ 底glColor3f(1.0f, 0.0f, 0.0f);glVertex3f(2.0f, -0.5f, 1.5f);glVertex3f(-2.0f, -0.5f, 1.5f);glVertex3f(-2.0f, -0.5f, -1.5f);glVertex3f(2.0f, -0.5f, -1.5f);传播优秀Word版文档

18、 ,希望对您有帮助,可双击去除!/门glColor3f(0.0f, 0.0f, 1.0f);glVertex3f(0.5, 1.0, -1.51);glVertex3f(-0.5, 1.0, -1.51);glVertex3f(-0.5, -0.5, -1.51);glVertex3f(0.5, -0.5, -1.51);/窗户glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(1.25, 1.25, -1.51);glVertex3f(0.75, 1.25, -1.51);glVertex3f(0.75, 0.75, -1.51);glVertex3f(1.

19、25, 0.75, -1.51);/ 前glColor3f(1.0f, 0.0f, 0.0f);glVertex3f(2.0f, 1.5f, 1.5f);glVertex3f(-2.0f, 1.5f, 1.5f);glVertex3f(-2.0f, -0.5f, 1.5f);glVertex3f(2.0f, -0.5f, 1.5f);/ 后glColor3f(1.0f, 0.0f, 0.0f);glVertex3f(2.0f, -0.5f, -1.5f);glVertex3f(-2.0f, -0.5f, -1.5f);glVertex3f(-2.0f, 1.5f, -1.5f);glVerte

20、x3f(2.0f, 1.5f, -1.5f);/窗户glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(-2.01, 1.05, 0.4);glVertex3f(-2.01, 1.05, -0.4);glVertex3f(-2.01, 0.25, -0.4);glVertex3f(-2.01, 0.25, 0.4);/ 左glColor3f(1.0f, 0.0f, 0.0f);glVertex3f(-2.0f, 1.5f, 1.5f);glVertex3f(-2.0f, 1.5f, -1.5f);glVertex3f(-2.0f, -0.5f, -1.5f);

21、glVertex3f(-2.0f, -0.5f, 1.5f);/窗户glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(2.01, 1.05, 0.4);glVertex3f(2.01, 1.05, -0.4);glVertex3f(2.01, 0.25, -0.4);glVertex3f(2.01, 0.25, 0.4);/ 右glColor3f(1.0f, 0.0f, 0.0f);glVertex3f(2.0f, 1.5f, -1.5f);glVertex3f(2.0f, 1.5f, 1.5f);glVertex3f(2.0f, -0.5f, 1.5f);

22、glVertex3f(2.0f, -0.5f, -1.5f);glEnd();/*基座*/顶glBegin(GL_QUADS);传播优秀Word版文档 ,希望对您有帮助,可双击去除!glColor3f(0.502f, 0.502f, 0.502f);glVertex3f(5.0, -0.5, -3.5);glVertex3f(-5.0, -0.5, -3.5);glVertex3f(-5.0, -0.5, 3.5);glVertex3f(5.0, -0.5, 3.5);/ 底glColor3f(0.502f, 0.502f, 0.502f);glVertex3f(5.0, -1.0, 3.5)

23、;glVertex3f(-5.0, -1.0, 3.5);glVertex3f(-5.0, -1.0, -3.5);glVertex3f(5.0, -1.0, -3.5);/ 前glColor3f(0.502f, 0.502f, 0.502f);glVertex3f(5.0, -0.5, 3.5);glVertex3f(-5.0, -0.5, 3.5);glVertex3f(-5.0, -1.0, 3.5);glVertex3f(5.0, -1.0, 3.5);/ 后glColor3f(0.502f, 0.502f, 0.502f);glVertex3f(5.0, -1.0, -3.5);gl

24、Vertex3f(-5.0, -1.0, -3.5);glVertex3f(-5.0, -0.5, -3.5);glVertex3f(5.0, -0.5, -3.5);/ 左glColor3f(0.502f, 0.502f, 0.502f);glVertex3f(-5.0, -0.5, 3.5);glVertex3f(-5.0, -0.5, -3.5);glVertex3f(-5.0, -1.0, -3.5);glVertex3f(-5.0, -1.0, 3.5);/ 右glColor3f(0.502f, 0.502f, 0.502f);glVertex3f(5.0, -0.5, -3.5);

25、glVertex3f(5.0, -0.5, 3.5);glVertex3f(5.0, -1.0, 3.5);glVertex3f(5.0, -1.0, -3.5);glEnd();/*地板*/glBegin(GL_QUADS);glColor3f(0.0f, 0.502f, 0.0f);glVertex3f(100.0, -1.0, -100.0);glVertex3f(-100.0, -1.0, -100.0);glVertex3f(-100.0, -1.0, 100.0);glVertex3f(100.0, -1.0, 100.0);glEnd();/*狗窝*/glBegin(GL_TRI

26、ANGLE_FAN);glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(9.0f, 1.5f, -5.0f);glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(10.0f, 0.5f, -5.5f);glColor3f(0.502f, 0.0f, 0.502f);传播优秀Word版文档 ,希望对您有帮助,可双击去除!glVertex3f(8.0f, 0.5f, -5.5f);glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(8.0f, 0.5f, -4.5f);glColor3f(0.5

27、02f, 0.0f, 0.502f);glVertex3f(10.0f, 0.5f, -4.5f);glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(10.0f, 0.5f, -5.5f);glEnd();glBegin(GL_QUADS);glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(9.5f, 0.5f, -4.5f);glVertex3f(8.5f, 0.5f, -4.5f);glVertex3f(8.5f, 0.5f, -5.5f);glVertex3f(9.5f, 0.5f, -5.5f);/ 底glColo

28、r3f(0.0f, 0.502f, 0.502f);glVertex3f(9.5f, -1.0f, -5.5f);glVertex3f(8.5f, -1.0f, -5.5f);glVertex3f(8.5f, -1.0f, -4.5f);glVertex3f(9.5f, -1.0f, -4.5f);/ 前glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(9.5f, 0.5f, -5.5f);glVertex3f(8.5f, 0.5f, -5.5f);glVertex3f(8.5f, -1.0f, -5.5f);glVertex3f(9.5f, -1.0f,

29、-5.5f);/ 后glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(9.5f, -1.0f, -4.5f);glVertex3f(8.5f, -1.0f, -4.5f);glVertex3f(8.5f, 0.5f, -4.5f);glVertex3f(9.5f, 0.5f, -4.5f);/小门glColor3f(0.502f, 0.0f, 0.502f);glVertex3f(8.49, 0.0, -5.0);glVertex3f(8.49, 0.0, -5.5);glVertex3f(8.49, -1.0, -5.5);glVertex3f(8.49,

30、 -1.0, -5.0);/ 左glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(8.5f, 0.5f, -5.5f);glVertex3f(8.5f, 0.5f, -5.0f);glVertex3f(8.5f, -1.0f, -5.0f);glVertex3f(8.5f, -1.0f, -5.5f);/ 右glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(9.50f, 0.5f, -5.0f);glVertex3f(9.50f, 0.5f, -5.5f);glVertex3f(9.50f, -1.0f, -5.5f);g

31、lVertex3f(9.50f, -1.0f, -5.0f);glEnd();传播优秀Word版文档 ,希望对您有帮助,可双击去除!/*树*/glBegin(GL_TRIANGLE_FAN);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-9.0f, 4.0f, 5.0f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 2.5f, 6.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-7.5f, 2.5f, 6.5f);glColor3f(0.0f, 1.0f, 0.0f);g

32、lVertex3f(-7.5f, 2.5f, 3.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 2.5f, 3.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 2.5f, 6.5f);glEnd();glBegin(GL_TRIANGLE_FAN);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-9.0f, 5.5f, 5.0f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 4.0f, 6.5f);glC

33、olor3f(0.0f, 1.0f, 0.0f);glVertex3f(-7.5f, 4.0f, 6.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-7.5f, 4.0f, 3.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 4.0f, 3.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 4.0f, 6.5f);glEnd();glBegin(GL_TRIANGLE_FAN);glColor3f(0.0f, 1.0f, 0.0f);glVertex

34、3f(-9.0f, 2.5f, 5.0f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 1.0f, 6.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-7.5f, 1.0f, 6.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-7.5f, 1.0f, 3.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5f, 1.0f, 3.5f);glColor3f(0.0f, 1.0f, 0.0f);glVertex3f(-10.5

35、f, 1.0f, 6.5f);glEnd();传播优秀Word版文档 ,希望对您有帮助,可双击去除!/顶glBegin(GL_QUADS);glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(-9.25f, 1.5f, 4.75f);glVertex3f(-8.75f, 1.5f, 4.75f);glVertex3f(-8.0f, 1.5f, 5.25f);glVertex3f(-9.25f, 1.5f, 5.25f);/ 底glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(-9.25f, -1.0f, 5.25f);glV

36、ertex3f(-8.75f, -1.0f, 5.25f);glVertex3f(-8.75f, -1.0f, 4.75f);glVertex3f(-9.25f, -1.0f, 4.75f);/ 前glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(-9.25f, 1.5f, 5.25f);glVertex3f(-8.75f, 1.5f, 5.25f);glVertex3f(-8.75f, -1.0f, 5.25f);glVertex3f(-9.25f, -1.0f, 5.25f);/ 后glColor3f(0.0f, 0.502f, 0.502f);glVe

37、rtex3f(-9.25f, -1.0f, 4.75f);glVertex3f(-8.75f, -1.0f, 4.75f);glVertex3f(-8.75f, 1.5f, 4.75f);glVertex3f(-9.25f, 1.5f, 4.75f);/ 左glColor3f(0.0f, 0.502f, 0.502f);glVertex3f(-8.75f, 1.5f, 5.25f);glVertex3f(-8.75f, 1.5f, 4.75f);glVertex3f(-8.75f, -1.0f, 4.75f);glVertex3f(-8.75f, -1.0f, 5.25f);/ 右glColo

38、r3f(0.0f, 0.502f, 0.502f);glVertex3f(-9.25f, 1.5f, 4.75f);glVertex3f(-9.25f, 1.5f, 5.25f);glVertex3f(-9.25f, -1.0f, 5.25f);glVertex3f(-9.25f, -1.0f, 4.75f);glEnd();/后方栅栏glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(0, 0.1, 3.0);glScalef(100, 1, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.

39、0, 0.0, 0.0);glPushMatrix();glTranslatef(0, -0.3, 3.0);glScalef(100, 1, 1);传播优秀Word版文档 ,希望对您有帮助,可双击去除!glutSolidCube(0.1);glPopMatrix();/右面栅栏glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, 0.1, 0);glScalef(1, 1, 60);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();gl

40、Translatef(4.5, -0.3, 0);glScalef(1, 1, 60);glutSolidCube(0.1);glPopMatrix();/左边栅栏glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-4.5, 0.1, 0);glScalef(1, 1, 60);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-4.5, -0.3, 0);glScalef(1, 1, 60);glutSolidCub

41、e(0.1);glPopMatrix();/后方竖栅栏glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(0, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-0.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushM

42、atrix();传播优秀Word版文档 ,希望对您有帮助,可双击去除!glTranslatef(-1.0, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-1.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-2.0, -0

43、.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-2.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-3.0, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatr

44、ix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-3.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(-4.0, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslate

45、f(-4.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);传播优秀Word版文档 ,希望对您有帮助,可双击去除!glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(0.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(1.0, -0.5, 3.0);glScalef(1,

46、15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(1.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(2.0, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0

47、, 0.0);glPushMatrix();glTranslatef(2.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(3.0, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(3.5, -0.5, 3.0);glScale

48、f(1, 15, 1);glutSolidCube(0.1);glPopMatrix();传播优秀Word版文档 ,希望对您有帮助,可双击去除!glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.0, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);

49、glPopMatrix();/右侧竖栅栏glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, 0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, 0.5);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();

50、glTranslatef(4.5, -0.5, 1.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, 1.5);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, 2.0);glScalef(1, 15, 1);glutSolidC

51、ube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, 2.5);传播优秀Word版文档 ,希望对您有帮助,可双击去除!glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, 3.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3

52、f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, -0.5);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, -1.0);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, -1.5);glScalef(1, 15, 1);glutSolidCube(0.1);glPopMatrix();glColor3f(1.0, 0.0, 0.0);glPushMatrix();glTranslatef(4.5, -0.5, -2.0);glSca

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论