一、实验要求 绘制一个简单的三维场景,可以是室内:卧室,办公室,教室,也可以是室外:运动场,公园等,加上光照效果,简单的纹理映射,透视投影;不能过于简单;可以加动画、鼠标和键盘交互。 上交材料: project和word文档(具体内容展示,思路和心得) 二、实验思路 首先初始化窗口,定义摄像机坐标与视口坐标,利用实验二的知识内容绘制三维立体模型,定义每一个模型的坐标值以及利用变换函数实现相对位置的放置;利用实验三中的知识给整个场景进行灯光的设置;然后使用实验四中的代码实现模型材质的纹理贴图;最后进行鼠标与键盘的交互,实现鼠标可以控制摄像机的高度以及键盘的上下左右实现摄像机的移动。 三、实验代码 #include<windows.h> #include<gl/glut.h> #include<stdio.h> #include<math.h> #include<GL/glaux.h> GLuint drawcube,drawsphere,drawteapot; static float a=0.0; static GLdouble eye=1.0; static GLfloat...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with glutSolid
Contact glutSolid, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack