sky,angel
篇一:空中天使 A Sky Angel
A Sky Angel
In 1978, I became a flight attendant for a major airline. Earning my wings was the culmination of a childhood dream that I had set for myself after my first plane ride at the age of five. Like so many others before me, I fell in love with the romance of airplanes, adventure and helping others.
I have flown hundreds of flights since graduation, but one stands out among the many.
We were flying from Los Angeles to Washington, D.C, when I answered a lavatory call light in the coach cabin. There I found a young mother struggling with her infant. Everything was a mess, to say the least, and the mother, who was near hysterics, told me she had no more diapers or other clothing onboard the aircraft.
Through her tears, she informed me that they had missed their flight the previous night in Los Angeles and because she had very little money, she and her son had spent the night on the airport floor. Since she hadn't expected to miss the flight, she was forced to use up most of her supplies and whatever money she had to feed them.
With the saddest eyes I have ever seen she continued. She told me she was on her way to New Hampshire to deliver her son to the family that was adopting him. She could no longer support the two of them.
As she stood in front of me, crying, holding her beautiful son, I could see the despair and hopelessness on her face. And, as a mother of three beautiful daughters, I could feel her pain.
I immediately rang the flight attendant call button and asked for assistance from the other flight attendants. They brought cloth towels from first class to assist in cleaning up both mom and the infant. I ran and got my suitcase; because this woman and I were about the same size, I gave her a sweater and a pair of pants I had brought for my layover. Then I asked several families if they could spare extra diapers, formula and clothes for the child. After the young mother and her son had changed their clothes and the baby had gone to sleep, I sat with her, holding her hand, trying to provide some support and comfort for the remainder of the flight.
Once we landed, I walked them to their next flight, which would take them to their final destination; separation. I briefed the gate agent and the new flight attendant crew on the situation and asked them to give her special attention.
With tears in my eyes I gave her a hug and told her, You have shown me the true meaning of courage and a mother's love. I will never forget you.
As she thanked me for all I had done she said softly, You're not the flight attendant, you're a sky angel. Touching my flight attendant wings, she continued, And those are your angel wings.
With those words she turned and walked down the jetway, her child in her arms, and boarded the plane for New Hampshire.
Though I am no longer a flight attendant, my angel wings are still on prominent display in my office. And each time I see them, I am reminded of that young woman, her infant son and the gift that she gave me on that special day - that we truly are all spiritual beings traveling in human form.
from:sjbztqu.com/df888/ woaisjb.com/amcp/ sjbzxgd.com/wdyz/ sjbzbba.com/zrbjl/
bxsjbbcw.com/wdyz/
篇二:2013高考英语阅读素材及翻译(98篇)-2013高三英语阅读素材 A Sky Angel 空中的天使
A Sky Angel 空中的天使
In 1978, I became a flight attendant for a major airline. Earning my wings was the culmination of a childhood dream that I had set for myself after my first plane ride at the age of five. Like so many others before me, I fell in love with the romance of airplanes, adventure and helping others.
I have flown hundreds of flights since graduation, but one stands out among the many.
We were flying from Los Angeles to Washington, D.C, when I answered a lavatory call light in the coach cabin. There I found a young mother struggling with her infant. Everything was a mess, to say the least, and the mother, who was near hysterics, told me she had no more diapers or other clothing onboard the aircraft.
Through her tears, she informed me that they had missed their flight the previous night in Los Angeles and because she had very little money, she and her son had spent the night on the airport floor. Since she hadn't expected to miss the flight, she was forced to use up most of her supplies and whatever money she had to feed them. With the saddest eyes I have ever seen she continued. She told me she was on her way to New Hampshire to deliver her son to the family that was adopting him. She could no longer support the two of them. As she stood in front of me, crying, holding her beautiful son, I could see the despair and hopelessness on her face. And, as a mother of three beautiful daughters, I could feel her pain. I immediately rang the flight attendant call button and asked for assistance from the other flight attendants. They brought cloth towels from first class to assist in cleaning up both mom and the infant. I ran and got my suitcase; because this woman and I were about the same size, I gave her a sweater and a pair of pants I had brought for my layover. Then I asked several families if they could spare extra diapers, formula and clothes for the child. After the young mother and her son had changed their clothes and the baby had gone to sleep, I sat with her, holding her hand, trying to provide some support and comfort for the remainder of the flight.
Once we landed, I walked them to their next flight, which would take them to their final destination; separation. I briefed the gate agent and the new flight attendant crew on the situation and asked them to give her special attention.
With tears in my eyes I gave her a hug and told her, "You have shown me the true meaning of courage and a mother's love. I will never forget you."
As she thanked me for all I had done she said softly, "You're not the flight attendant, you're a sky angel." Touching my flight attendant wings, she continued, "And those are your angel wings." With those words she turned and walked down the jetway, her child in her arms, and boarded the plane for New Hampshire.
Though I am no longer a flight attendant, my "angel wings" are still on prominent display in my office. And each time I see them, I am reminded of that young woman, her infant son and the gift that she gave me on that special day - that we truly are all spiritual beings traveling in human form.
.
新课标第一网系列资料 www.xkb1.com
篇三:OpenGL实验一
学院 班 学号 姓名:曲绍霖 教师评定: 实验一 基本三维图形的建模及基本交互
一、实验目的
1 掌握OpenGL的三维图形绘制方法
2 掌握Visual C++环境下的OpenGL图形开发
二、实验要求
在Windows平台上用VC++结合GLUT做实验,要求掌握结合VC++和OpenGL的基本图形(四面体、六面体、圆柱、圆锥等)建模及编程技能,以及图形学的基本原理,实验完成后要求根据自己的成果撰写一份实验报告。
1 基本三维几何图形(四面体、六面体、圆柱、球等)的建模及基本的交互 2 人机交互(图形的基本变换,如旋转、平移、尺度缩放及橡皮筋技术等)
三、实验环境
操作系统:Windows xp
开发环境:VC++6.0以及GLUT
图形交互设备:鼠标和键盘
四、实验内容
1 GLUT在VC++6.0环境下的正确配置
下载GLUT包,解压后,文件夹中有dll,lib,h文件,将glut32.dll,glut.dll复制到C:\WINDOWS\system32下,将glut32.lib, glut.lib放到C:\Program Files\Microsoft Visual Studio\VC98\Lib(即安装VC++6.0的目录),将glut.h复制到C:\ProgramFiles\Microsoft Visual Studio\VC98\Include\GL
2对基本图形(四面体,六面体,圆柱,球等)的建模及基本交互。 a 在上述四种图形的中选择两种及两种以上进行建模或者组合他们产生新的对象。
b 基本的交互包括:利用鼠标、键盘实现图像的交互(主要实现物体的浏览)
五、存在的问题和感想
虽然开始对OpenGL的编程不是很了解,但是因为对VC++的编程还是有比较深的了解,所以对OpenGL的函数的运用会查阅MSDN来学习如何使用,然后再参考了一下网上的代码和实验给出的例子,基本了解是如何进行OpenGL的编程,一开始觉得OpenGL的编程跟一般的VC++编程有很大的区别,可能很难入门,但是后来,认真研究了一下实验给出的例子,还是很顺利地读懂了。也对OpenGl的建模,光照等有
了一定的理解,后来,再运用一下网上相关的代码,加上自己理解的修改,就顺利完成了实验,开始觉得OpenGL的编程很难,就对实验抱着一个厌恶的感觉,但是后来自己做出实验的时候,就开始觉得OpenGL是十分有趣的。
实现代码:
#include
#include
#include
#include
#include
static GLfloat xRot = 0.0f; //x方向旋转参数
static GLfloat yRot = 0.0f; //y方向旋转参数
//初始化OpenGL绘制环境
void init(void){
}
void myDisplay(void){
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();// 重置当前的模型观察矩阵
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
// 设置旋转的角度,这里glRotatef 第1个参数是角度,2~4 参数是指定旋转轴 // 这里我们设置于x,y轴作旋转轴
// 绘制正方形
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
glTranslatef(-1.5f, 0.0f, 0.0f);
glBegin(GL_QUADS);
glColor3f(0.0f,1.0f,0.0f); // 颜色改为绿色
glVertex3f( 1.0f, 1.0f,-1.0f); // 四边形的右上顶点 (顶面)
glColor3f(1.0f,0.0f,0.0f); //颜色改为红色 glVertex3f(-1.0f, 1.0f,-1.0f); // 四边形的左上顶点 (顶面) glTranslatef(0.0f, 0.0f, -6.0f); // 清除屏幕和深度缓存 glClearColor(1.0,1.0,1.0,0.0);//背景颜色为白色 glEnable(GL_DEPTH_TEST);//这句是启用深度测试,这样,在后面的物体会被挡着 glShadeModel(GL_SMOOTH);
glColor3f(0.0f,0.0f,1.0f); // 颜色改成蓝色 glVertex3f(-1.0f, 1.0f, 1.0f); // 四边形的左下顶点 (顶面) glColor3f(1.0f,0.5f,0.0f); // 颜色改成橙色 glVertex3f( 1.0f, 1.0f, 1.0f); // 四边形的右下顶点 (顶面)
glColor3f(0.0f,1.0f,0.0f); // 颜色改为绿色
glVertex3f( 1.0f,-1.0f, 1.0f); // 四边形的右上顶点(底面)
glColor3f(1.0f,0.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f,-1.0f,-1.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f(-1.0f, 1.0f,-1.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);
glColor3f(0.0f,0.0f,1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f); //颜色改为红色 // 四边形的左上顶点(底面) // 颜色改成蓝色 // 四边形的左下顶点(底面) // 颜色改成橙色 // 四边形的右下顶点(底面) // 颜色改成橙色 // 四边形的右上顶点(前面) // 颜色改成蓝色 // 四边形的左上顶点(前面) //颜色改为红色 // 四边形的左下顶点(前面) // 颜色改为绿色 // 四边形的右下顶点(前面) // 颜色改成橙色 // 四边形的右上顶点(后面) // 颜色改成蓝色 // 四边形的左上顶点(后面) //颜色改为红色 // 四边形的左下顶点(后面) // 颜色改为绿色 // 四边形的右下顶点(后面) // 颜色改成蓝色 // 四边形的右上顶点(左面)
glColor3f(1.0f,0.0f,0.0f); //颜色改为红色 glVertex3f(-1.0f, 1.0f,-1.0f); // 四边形的左上顶点(左面) glColor3f(0.0f,0.0f,1.0f); // 颜色改成蓝色 glVertex3f(-1.0f,-1.0f,-1.0f); // 四边形的左下顶点(左面) glColor3f(1.0f,0.0f,0.0f); //颜色改为红色 glVertex3f(-1.0f,-1.0f, 1.0f); // 四边形的右下顶点(左面)
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f, 1.0f,-1.0f);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 1.0f,-1.0f,-1.0f);
glEnd();//正方体绘制结束
glTranslatef(3.0f, 0.0f, 0.0f);
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
glBegin(GL_TRIANGLES);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 1.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, 1.0f);
glColor3f(1.0f,0.5f,0.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f( 1.0f,-1.0f, 1.0f); // 颜色改为绿色 // 四边形的右上顶点(右面) // 颜色改成橙色 // 四边形的左上顶点(右面) // 颜色改为绿色 // 四边形的左下顶点(右面) // 颜色改成橙色 // 四边形的右下顶点(右面) // 橙色 // 三角形的上顶点 (前侧面) // 红色 // 三角形的左下顶点 (前侧面) // 绿色 // 三角形的右下顶点 (前侧面) //橙色 // 三角形的上顶点 (右侧面) // 绿色 // 三角形的左下顶点 (右侧面)
glColor3f(1.0f,0.0f,0.0f); glColor3f(1.0f,0.5f,0.0f); glVertex3f( 0.0f, 1.0f, 0.0f); glColor3f(1.0f,0.0f,0.0f); glColor3f(0.0f,1.0f,0.0f); // 红色 // 三角形的右下顶点 (后侧面) glVertex3f(-1.0f,-1.0f, -1.0f); glColor3f(1.0f,0.5f,0.0f); glVertex3f( 0.0f, 1.0f, 0.0f); glColor3f(0.0f,1.0f,0.0f); glColor3f(1.0f,0.0f,0.0f); // 红色 // 三角形的右下顶点 (左侧面) glVertex3f(-1.0f,-1.0f, 1.0f); // 绿色 // 三角形的左下顶点 (左侧面) glVertex3f(-1.0f,-1.0f,-1.0f); // 红色 // 三角形的左下顶点 (后侧面) glVertex3f( 1.0f,-1.0f, -1.0f); // 蓝色 // 三角形的上顶点 (后侧面) // 红色 // 三角形的右下顶点 (右侧面) glVertex3f( 1.0f,-1.0f, -1.0f); //橙色 // 三角形的上顶点 (左侧面)
glEnd();//三角锥绘制结束
glFlush();//强制刷新
glutSwapBuffers(); //双缓冲
}
//设窗口的坐标
void reshape(int w,int h){
glViewport(0,0,(GLsizei)w,(GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(40.0f,(GLfloat)w/(GLfloat)h,0.5f,-1000.0f); glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
//键盘控制
void SpecialKeys(int key,int x,int y){
//上下左右键控制正方体旋转 xRot -= 5.0f; if(key == GLUT_KEY_DOWN) xRot += 5.0f; if(key == GLUT_KEY_LEFT) yRot -= 5.0f; if(key == GLUT_KEY_RIGHT) yRot += 5.0f; if(key == GLUT_KEY_UP)
篇四:AV6级考试题
AV6级考试题
一.单项选择题(20题,每题2分,共40分)
1. 听力,请听一个片段(iku-iku-iku)问,片中女丄丨优所要表达的意思是( )
A.受不了了,不要 B.我还要,快点
C.到了,我快到了 D.好舒服,好厉害
2. 下面女丄丨优中,由写丨真界转入AV界的是( )
A.Mihiro B.松金阳子 C.白石小百合 D.花野真衣
3. 下面女丄丨优中,不属于熟丨女的是( )
A.堀口奈津美 B.白鸟美玲 C.桐岛千沙 D.2宫沙树
4. 下面女丄丨优中,罩杯最大的是( )
A.伊东怜 B.大浦安娜 C.樱木凛 D.美竹凉子
5. 天宫真奈丨美曾在香港拍摄过一部电影,讲诉了一帮年轻人和一位日丄本丨优的故事,请问这部电影的导演是( )
A.彭浩翔 B.王晶 C.张艾嘉 D.王家卫
6. 在日本AV界,有一位60多岁还在打拼的男优,他就是( )
A.加藤鹰 B.南佳也 C.德田重男 D.户川夏也
7. 山形健是一位主演乱丄丨伦系列为主的男优,他因与央视主持人()长相极为相似而闻名
A.李咏 B.张斌 C.白岩松 D.毕福剑
8. 在日本话中,女丨优的优是()的意思,监督就是( )
A.演员,导演 B.演员,制片 C.艺伎,导演 D.艺伎,制片
9. 20/30/40女这一系列的监督为( )
A.小室哲哉 B.冢本 C.甲斐正明 D.川崎军2
10. 3P是指( )
A.三个人打架 B.三个人打电动 C.三个人打麻将 D.三个人ML
11. 女丨优换名字是常事,绫乃梓复出后,她的新艺名为( )
A. 一戸のぞみ B. 一色あずさ C. 一ノ瀬あきら D.绫女.
12. 饭岛爱曾经在港台红极一时,这在李宗盛写的( )中可见一斑
A.凡人歌 B.鬼迷心窍 C.最近比较烦 D.爱的代价
13. 小泽圆曾在香港参演三级电影( ),里面不乏激丄丨情镜头
A.偷情男女 B.男女 C.偷情家族 D.饮食男女
14. 其实日本的***女丨优不尽是日本人,例如观月雏乃就是( )人
A.中国台湾 B.中国大陆 C.中国香港 D.高丄丨丽棒子
15. Rio(原名柚木提娜)是一名娇小可爱的混血女丨优,她是( )和日本混血
A.巴西 B.葡萄牙 C.西班牙 D.中国
16. 下面哪一位女丨优没有拍过无丄丨码( )
A.前岛美步 B.金泽文子 C.川岛和津实 D.伊泽千夏
17. 按日本法律,***是不能露出***,所以马赛克就出现了,但也有片商,采取了海外发行的方法发行无丄丨码片,这一般叫做( )
A.海外发售版 B.海外流出版 C.海外销售版 D.海外无丄丨码版
18. 管野阿里沙是素人出道,她第一部片丄子就是流仪系列,是此系列的( )号作品
A.1 B.7 C.16 D.35
19. Max-A公司着名的角色扮演系列,女丨优穿着水手服、女佣装、赛车服等演出,这一系列的名字叫做( )
A.Max cafe B.Max cosplay C.Max girls D.Max dream?
20. 每个厂商出品的***作品都有一定编号,编号为Midd-373的DVD,出品厂商是( )
A. ideapocket B.H.M.P. C.Moodyz D.Prestig
二.多项选择题(10题,每题3分,共30分)
1.下列女丄丨优中,哪些出演了深夜日剧《下北 Glory Days》
A.穗花 B.苍井空 C.大泽佑香 D.麻美
2.下列女丄丨优中,身高在1.70米以上的是
A.金城美丽 B.松岛侑里 C.沙雪 D. 伊东绘理
3.下列女丄丨优中,Loli系的女丄丨优是()
A.西条丽 B.如月露娜 C.星野美优 D.飞鸟伊央
4.一度退役,2008年又重新复出的女丄丨优有()
A.松丄丨岛枫 B.光月夜也 C.高树玛利亚 D.小川纱美
5.下面女丄丨优中,哪些出演过Tora Tora Gold系列的作品
A.原千寻 B.酒井紫葵 C.麻生早苗 D.香山圣
6.以下哪些是丄优的名字:
A.@YOU B.草莓牛奶 C.MO☆MO D.蕾
7.下列系列中,无丄码的是()
A.Pink Puncher B.ziling.comra Tora Platinum
C.Sky Angel D.Kokeshi Cowgirl
8.下面监督中,那些因拍熟女和乱丄伦而闻名()
A.乃亚 B.川崎军二 C.溜池 D.长江隆美
9.下面女丄优中为S1拍摄过作品的女丄优有()
A.爱田由 B.松丄岛枫 C.初音实 D.草风纯 E.凉果
10.下面女丄优曾为Max-A出演过的是()
A.美上芹 B.北丄原多香子 C.吉泽明步 D.小泉梨菜 E.恋小夜
三.判断题(判断对错,正确的写R 错误的写W.共10题,每题2分,共20分)
1.渡濑晶是2000年出道,小泉彩是2003年出道,爱田由是2004年出道.
2.小泽玛利亚曾为S1等厂商拍片,但都为有码,但2008年,她在XVN突破尺度,正式加入步兵.
3. 冢本有希是著名的熟女女丄优,在90年代,她曾经用过艺名浅仓舞,但比起当时清纯的美少女形象,已经很难把两张面孔联系在一起。
4. 黑木将稔又名巧克力球,是著名的AV男优,横跨AV、摔较两界,其最擅长直升机式ML。
5. 黄沾曾主演过一部展现日本产业的三级香港电影,其中的日丄本丄优由樱井风花扮演。
6. 中出和**都是指体内丄射精,出自《礼记》:“乐由中出,礼自外作。乐由中出故静,礼自外作故文。”
7.水元优奈的日文名是水元ゆうな,立花瞳的日文罗马发音是Hitomi Nakamura。
8. 有码片又分**和厚码,**比厚码遮挡更好,看的更清晰,H.M.P就是著名的**厂商。
9.1 Pondo就是著名的一丄本道系列,此系列多为有码片,著名的有铃丄木麻奈美等.
10.在日本AV界,也有类似于电影奥斯卡的颁奖盛事,每年举办一次,这就是AV Grand Prix,简写为AVGP。
四.填空题(10题,每空一分,共20分)
1.平生不识____,阅尽AV也枉然.
2.今年香港最新版本的《》中,特别邀请了三位日丄本丄优激丄情演出,她们是_____,______和_________.
3.饭岛爱的半自传体小说______________道出了了丄优的心酸,她曾经在张卫健的《齐天大圣》中饰演_______
4.高树玛利亚于____年退役,她一共留下作品___部.
5.女丄优也不是只会ML,她们也可能多才多艺,比如小泽圆就会________这种乐器,而西野翔则曾就读于著名的_______大学丄
6.潮丄吹的第一次出现在AV中是著名男优______,他将自己的经验和技术拍成讲座,名字为__________
7.__________在日文里指非专业人士,业余爱好者.__________则是好色的女流氓之意.
8.流仪系列是_____公司专门发掘新女丄优的作品,它的拍摄城市主要选择在_____.
9.ziling.comra Tora Tora就是著名的______系列,而重口味的T0ky0 H0t我们一般称为________.
10.AV是__________的缩写,第一家正式成立的AV公司是_______,饭岛爱、松丄岛枫等都是其发掘的.
五.连线题(2题,10分)
1.把女丄优名字与对应的罗马发音相连(6分)
立花里子 Ann Nanba
南波杏 Yuri Kousaka
小泽菜穗 Chika Nakamura
翔田千里 Chisato Shoda
香坂百合 Riko Tachibana
仲村知夏 Naho Ozawa
2.把女丄优名字与相关信息相连(4分)
三上翔子 (转 载于:wWw.SmHaIDA.cOM 海达 范文 网:sky,angel) 艺能人女丄优
红音 痴女监督
长濑茜 潮丄吹女王
时东爱 华航空姐
六.写作(10分)
以“假如记忆可以移植”为题,YY一篇你心目的AV,限字数800,不包括标点,特别是省略号
篇五:OpenGL实验二
学院 专业 学号 姓名:曲绍霖 教师评定: 实验二 光照模型的实现
一、实验目的
掌握OpenGL的光照及材质效果设置方法
二、实验要求
在Windows平台上用VC++结合GLUT做实验,要求掌握结合VC++和OpenGL的光照模型的理解及实现,实验完成后要求根据自己的成果撰写一份实验报告。
三、实验环境
操作系统:Windows xp
开发环境:VC++6.0以及GLUT
图形交互设备:鼠标和键盘
四、实验内容
在实验一的基础上理解并实现添加各种光(环境光,发散光,镜面光,聚光),使效果更逼真以接近实际环境。
1、打开灯光,设置灯光的位置、方向、类别、颜色和衰减,并改变其值,观察效果的变化。
2、实现旋转和移动灯光。
3、设置材质,了解材质和光照如何相互影响。
五、存在的问题和感想
在教科书的基础上增加光照的效果,难度不算太大,,在光照的效果中,用户可以编辑两种材质,经过光源的添加后,使得材质的形象更突出,用户可以自由移动光源位置达到想要的效果,这次实验也是对OpenGL学习加深了认识
六、实现代码
#include
#include
#include
#include
static int xRot=0;
static int yRot=0;
int iModel=1;
void init(void){
// 定义光源,它是一种白色的光源
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,lmodel_ambient);
}
void myDisplay(void){
//定义球体材质为翡翠
GLfloat no_mat[]={0.0,0.0,0.0,1.0}; GLfloat mat_ambient[]={0.0215,0.1745,0.0215,0.55}; GLfloat mat_ambient_color[]={0.1215,0.2745,-0.5215,0.55}; GLfloat mat_diffuse[]={0.07568,0.61424,0.07568,0.55}; GLfloat mat_specular[]={0.633,0.727811,0.633,0.55}; GLfloat no_shininess[]={0.0}; GLfloat low_shininess[]={76.8}; GLfloat high_shininess[]={12.8}; GLfloat mat_emission[]={0.3,0.2,0.2,0.0}; glEnable(GL_LIGHTING);//在后面的渲染中使用光照 glEnable(GL_LIGHT0);//使用第0号光照 glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER,local_view); glLightfv(GL_LIGHT0,GL_AMBIENT,ambient);//过很多次反射后最终遗留在环境中的光线强度(颜色) glLightfv(GL_LIGHT0,GL_DIFFUSE,diffuse);//漫反射后最终遗留在环境中的光线强度(颜色) glClearColor(1.0,1.0,1.0,0.0); glEnable(GL_DEPTH_TEST);//这句是启用深度测试,这样,在后面的物体会被挡着 glShadeModel(GL_SMOOTH); GLfloat lmodel_ambient[]={0.4,0.4,0.4,1.0}; GLfloat local_view[]={0.0}; GLfloat ambient[]={0.0,0.0,0.0,1.0}; GLfloat diffuse[]={1.0,1.0,1.0,1.0}; GLfloat specular[]={1.0,1.0,1.0,1.0}; glLightfv(GL_LIGHT0,GL_SPECULAR, specular);//镜面反射后最终遗留在环境中的光线强度(颜色)
// 定义所在光源位置
GLfloat position[]={0.0,0.0,1.5,1.0};
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
gluLookAt(0.0,0.0,5.0,0.0,0.0,0.0,0.0,1.0,0.0);
//设置可动光源位置
glPushMatrix();
glRotated((GLdouble)xRot,1.0,0.0,0.0);
glTranslated(0.0,0.0,1.5);
glDisable(GL_LIGHTING);
//绘制一个桔色球体表示光源位置
glColor3f(1.0,0.8,0);
glutWireSphere(0.07,8,8);
glEnable(GL_LIGHTING);
//球有环境光反射,漫反射,无镜面反射,发射光,低光泽度 glPushMatrix();
glMaterialfv(GL_FRONT,GL_AMBIENT,mat_ambient);
}
//设窗口的坐标
void reshape(int w,int h){ glMaterialfv(GL_FRONT,GL_DIFFUSE,mat_diffuse); glMaterialfv(GL_FRONT,GL_SPECULAR,no_mat); glMaterialfv(GL_FRONT,GL_SHININESS,low_shininess); glMaterialfv(GL_FRONT,GL_EMISSION,mat_emission); glutSolidSphere(1.0,64,64); glPopMatrix(); } if(iModel==1){ glPopMatrix(); glRotated((GLdouble)yRot,0.0,1.0,0.0); glLightfv(GL_LIGHT0,GL_POSITION,position); if(iModel==2){ //球有环境光反射,漫反射,镜面反射,高光泽度 glMaterialfv(GL_FRONT,GL_AMBIENT,mat_ambient_color); glMaterialfv(GL_FRONT,GL_DIFFUSE,mat_diffuse); glMaterialfv(GL_FRONT,GL_SPECULAR,mat_specular); glMaterialfv(GL_FRONT,GL_SHININESS,high_shininess); glMaterialfv(GL_FRONT,GL_EMISSION,no_mat); glutSolidSphere(1.0,64,64); glPopMatrix(); } glPushMatrix(); glPopMatrix(); glFlush();
glViewport(0,0,(GLsizei)w,(GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(40.0,(GLfloat)w/(GLfloat)h,1.0,20.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
//键盘控制
void SpecialKeys(int key,int x,int y){ //上下左右键控制光照上下左右移动 if(key==GLUT_KEY_UP) xRot=(xRot-10)%360;
if(key==GLUT_KEY_DOWN) xRot=(xRot+10)%360;
if(key==GLUT_KEY_RIGHT) yRot=(yRot+10)%360;
if(key==GLUT_KEY_LEFT) yRot=(yRot-10)%360;
glutPostRedisplay();
}
//设置刷新时间
void TimerFunction(int value)
{
glutPostRedisplay();
glutTimerFunc(100,TimerFunction,1);
}
//菜单选项设置
void Menu(int value)
{
}
int main(int argc, char *argv[])
{
int nMenu;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowPosition(100, 100);
glutInitWindowSize(720,640);// 设置窗口大小720*640
glutCreateWindow("GLshape翡翠光照"); switch(value) { case 1: } glutPostRedisplay(); iModel=1;break; iModel=2;break; case 2:
//创建右键选择菜单
nMenu=glutCreateMenu(Menu);
} glutAddMenuEntry("有环境光反射,漫反射,无镜面反射,发射光,低光泽度",1); glutAddMenuEntry("有环境光反射,漫反射,镜面反射,高光泽度",2); glutAttachMenu(GLUT_RIGHT_BUTTON); glutTimerFunc(100,TimerFunction,1); init(); glutSpecialFunc(SpecialKeys); glutDisplayFunc(myDisplay); glutReshapeFunc(reshape); glutMainLoop(); return 0;
七、运行结果:
用键盘的上下左右来控制光源移动以看到有光反射出来的效果。
光照效果1:有环境光反射,漫反射,无镜面反射,发射光,低光泽度
小学作文