文件名称:proj1
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:5.63kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在Windows系统中,安装GLUT库:打开glut-3.7.6-bin.zip,取出glut.h,glut32.lib,glut32.dll,分别放置。
使用Visual Studio C++编译已有项目工程,并修改代码生成以下图形:
在此基础上,修改各顶点颜色,使得每个顶点颜色不一样,多边形内部颜色渐变。
操作方法和实验步骤:
1.使用GL_POLYGON模式绘制白色的多边形,由于所绘多边形为凹多边形,故从最左上角的点开始绘制,以防得到不可预测的图形。注意求得各凹角(reflex convex)处的顶点坐标。
2.下面考虑修改各顶点颜色。首先多边形绘制改为从位于图形中心的(0,0)处开始,并设为白色。
3.此后对于六个凹角处的顶点分别设定其颜色为黄色,绿色,青色,蓝色,洋红色及红色。默认状态下多边形将出现渐变的效果。
4.此时运行程序将得到如右图所示效果:为此,我们再次绘制前面所绘制的第一个多边形顶点,即可得到所要求图形。
-In the Windows system, install the GLUT libraries: Open glut-3.7.6-bin.zip, remove glut.h, glut32.lib, glut32.dll, were placed.
The use of Visual Studio C++ compiler has been the project works, and modify the code generates the following graph:
On this basis, modify the vertex colors to make different colors for each vertex, polygon internal color gradient.
Operational methods and experimental steps:
1. Use GL_POLYGON draw white polygon models, as painted concave polygon as a polygon, so starting from the most upper left point rendering, in case the graphics to be unpredictable. Note to seek the concave angle (reflex convex) at the vertex coordinates.
2. The following consider amending the vertex colors. First, change from the rendering polygon graphics center located at (0,0) at the beginning, and set to white.
3. Then for the six respective concave corner vertex set its color to yellow, green, cyan, blue, magenta and red colors. Polygon will appear by default gradient e
使用Visual Studio C++编译已有项目工程,并修改代码生成以下图形:
在此基础上,修改各顶点颜色,使得每个顶点颜色不一样,多边形内部颜色渐变。
操作方法和实验步骤:
1.使用GL_POLYGON模式绘制白色的多边形,由于所绘多边形为凹多边形,故从最左上角的点开始绘制,以防得到不可预测的图形。注意求得各凹角(reflex convex)处的顶点坐标。
2.下面考虑修改各顶点颜色。首先多边形绘制改为从位于图形中心的(0,0)处开始,并设为白色。
3.此后对于六个凹角处的顶点分别设定其颜色为黄色,绿色,青色,蓝色,洋红色及红色。默认状态下多边形将出现渐变的效果。
4.此时运行程序将得到如右图所示效果:为此,我们再次绘制前面所绘制的第一个多边形顶点,即可得到所要求图形。
-In the Windows system, install the GLUT libraries: Open glut-3.7.6-bin.zip, remove glut.h, glut32.lib, glut32.dll, were placed.
The use of Visual Studio C++ compiler has been the project works, and modify the code generates the following graph:
On this basis, modify the vertex colors to make different colors for each vertex, polygon internal color gradient.
Operational methods and experimental steps:
1. Use GL_POLYGON draw white polygon models, as painted concave polygon as a polygon, so starting from the most upper left point rendering, in case the graphics to be unpredictable. Note to seek the concave angle (reflex convex) at the vertex coordinates.
2. The following consider amending the vertex colors. First, change from the rendering polygon graphics center located at (0,0) at the beginning, and set to white.
3. Then for the six respective concave corner vertex set its color to yellow, green, cyan, blue, magenta and red colors. Polygon will appear by default gradient e
(系统自动生成,下载前可以参看下载内容)
下载文件列表
proj1.plg
proj1.c
proj1.dsp
proj1.dsw
proj1.ncb
proj1.opt
proj1.c
proj1.dsp
proj1.dsw
proj1.ncb
proj1.opt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.