版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Computer Graphics计算机图形学What is this course about?nto learn essential computer graphics concepts. nto learn how to write computer graphics applications in OpenGL. PrerequisitesYou will get the most out of this course if you: nhave C or C+ programming experiencenhave taken an introductory Algorithm co
2、urse nhave some linear algebra background nNo prior knowledge of graphics is assumed Required TextbooksnComputerGraphicsUsingOpenGL, by Francis S. Hill, Jr., 3 edition ,Prentice Hall, ISBN: 0023548568nOpenGLProgrammingGuide, Fifthedition:The Official Guideto Learning OpenGL, version2, by Wooetal., A
3、ddisonWesley, ISBN:0201604582n计算机图形学,李伟波等,武汉大学计算机图形学,李伟波等,武汉大学Required SoftwarenMicrosoftVisualC+2005,visualstudio6nAll software that you write for your homeworks will have to compile underMicrosoftVisualC+2005andrununderWindows2000/XP n1.1 What Are Computer Graphics什么是计算机图形学?n1.2 Computer graphics
4、and Image processing 计算机图形与图像处理 n1.3 Graphics Display Devices图形显示设备n1.4 Graphics Input Types图形输入类型n1.5 Graphics Input Devices图形输入设备Chapter 1 Introduction引言引言1.1 What Are Computer Graphics什么是什么是计算机图形学计算机图形学?nMost simply,computergraphics are picturesthat are generated by a computer.qEverywhere you loo
5、k today there are examples to be found。Example:a ray-traced picture with shadows.n“Computergraphics” also refers to the toolsused to make such pictures.qThere are both hardware and software tools。qHardware tools:n include video monitors and printers that display graphics, as well as input devices li
6、ke a mouse。qSoftware tools:n include all graphics libraries(drawing a line or circle, manage windows with pull-down menus and dialog boxes.).1.1.1 History of Computer GraphicsnThe field is often acknowledged to have started in the early 1960s with Ivan Sutherlands pioneering(开创) doctoral thesis at M
7、IT(麻省理工) on Sketchpad (画板)nThe special interest group in graphics (图形专业兴趣小组简称SIGGRAPH), was formed in 1969. (The must-not-miss(不可错过) annual SIGGRAPH meeting now attracts 30,000 participants a year.)nToday there are hundreds of companies around the world having some aspect of computer graphics as the
8、ir main source of revenue(收入), nand the subject of computer graphics(图形学课程) is aught in most computer science or electrical engineering departments。1.1.2 Why Study Computer Graphics?nPeople study computer graphics for many reasons.qSome people want a better set of tools for plotting curves and prese
9、nting the data they encounter in their other studies or work. qSome want to write computer-animated games(计算机动画游戏), while others are looking for a new medium for artistic expression(艺术表达). qMost people want to be more productive(更有效), and to communicate ideas better(更好沟通思想), and computer graphics ca
10、n be a great help. 1.1.3 Where Are Computer Graphics Used?nComputer graphics are widely used in the production of movies, television programs, books, games, and magazines. nBrowsingontheWorldWideWeb(通过万维通过万维网浏览网浏览):qthe browser must rapidly interpret(解释) the data on a page and draw it on the screen
11、as high quality text and graphics.nSlide,Book,andMagazineDesign(幻灯片、幻灯片、书籍和杂志的设计书籍和杂志的设计):qComputer graphics are used in page layout(排版) programs to design the final look of each page of a book or magazine. The user can interactively move text and graphics around to find the most pleasing arrangemen
12、t. nA paintsystem(绘图系统绘图系统):qgenerates images. A common example of a paint(绘图) system and photo manipulation(图像处理) system is Adobe Photoshop. Process Monitoring(过程监视)(过程监视)nHighly complex systems such as air traffic control systems(交通控制系统) must be monitored by a human to watch for impending(随时发生) tr
13、ouble. nAn air traffic control system (空中交通控制系统) consists of monitors that display where nearby planes are situated(位置状况).qThe user sees a schematic(总体) representation for the process, giving the whole picture at a glance. qVarious icons(不同的图标) can flash(闪烁) or change color to alert the user to chan
14、ges that need attention(发出警示).Displaying Simulations(仿真显示)nFlightsimulator飞行模拟器飞行模拟器: the system is a plane with a shape(形状) and flying characteristics(飞行特征), along with a world consisting of a landing field(机场), mountains, other planes(植被), and air(天空), all modeled appropriately. Computer-aided Des
15、ignnThe computer version(计算机版) is easy to alter if necessary. 计算机辅助设计与制造计算机辅助设计与制造(CAD/CAM)Boeing777Volume Visualization(体可视化)nAreas of different colors immediately inform a physician(医生) about the health of each part of the brain. Displaying Mathematical FunctionsnE.g., Mathematican1.2.1 Computer g
16、raphicsqcreate pictures and images based on(基于) some description(描述), or model(模型), in a computer. 1.2 Computer graphics and Image processing计算机图形与图像处理 n1.2.2 Image processingqimproves or alters images that were created elsewhere.nProcessing can remove noise(消除噪声) from an image, enhance its contrast
17、(增强对比), sharpenits edges (锐化边缘), and fix its colors (修正色彩).nSoftware routines can search for certain features(特征) in an image, and highlight(高光) them to make them more noticeable(醒目) or understandable(易于理解).1.2.3. Representation of gray shades and color for Raster Images光栅图像的灰度光栅图像的灰度和彩色表示和彩色表示nAn i
18、mportant aspect of a raster image is the manner in which the various colors or shades of gray are represented in the bitmap. 光栅图像的一个重要方面就是彩色和灰度在位图中的表现方式。n1.2.3.1.Gray-scaleRasterImages灰度光栅灰度光栅图像图像qbi-levele二值图:二值图: only two pixel values(0 or1) in a raster imagenSince an n-bit quantity has 2n possibl
19、e values, there can be 2n gray levels in an image with pixel depth n.q 2 bits/pixel produce 4 gray levelsq4 bits/pixel produce 16 gray levelsq8 bits/pixel produce 256 gray levels1.2.3.2. Color Raster Images彩色光栅图像彩色光栅图像ncolordepth色彩深度:色彩深度: The number of bits used to represent the color of each pixel
20、。色彩深度就是用于表示每一像数色彩的比特数。nEach value in the (red, green, blue) 3-tuple (三原色)has a certain number of bits, and the color depth is the sum of these values。红绿蓝被称为三原色,这三元组的每一个值都有一定的比特输,色彩深度就是这些值的和。nBecause a byte(8bits) is such a natural quantity to manipulate on a computer, many images have a color depth
21、of eight. Each pixel then has one of 256 possible colors.由于1个字节是计算机常用的单位,所以许多图像8位色彩深度。每一个像数就有256种可能的色彩。nThe highest quality images, known as truecolorimages真色彩图像真色彩图像,have a color depth of 24。全色光栅显示器工作状况图全色光栅显示器工作状况图: : 28*28*28=224种颜色1.3 Graphics Display Devices(图形输出设备图形输出设备)n1.3.1 Graphics display
22、s are either line-drawing devices(线画设备) or raster displays(光栅显示器).n1.3.2 Line-drawing devices:qPen plotter(笔式绘图仪), which moves an ink pen across a (large) sheet of paper. (E.g., seismic wave plotters地震波绘图仪.)qVector video device(向量显示器), which moves a beam of electrons across the screen from any one p
23、oint to any other point, leaving a glowing trail(留下光痕/轨迹).n1.3.3 Raster displays(光栅显示器): qComputer monitor: moves a beam of electrons across the screen from left to right and top to bottom.qPrinter: does the same thing with ink or toner(碳粉).nDisplays have a built-in coordinate system(内置坐标系) that ass
24、ociates(关联) a given pixel in an image with a given physical position on the display surface.nThis “upside-down” (倒置)coordinate system is typical of raster devices.0 06 63 39 94 47 79 90 0s sx xs sy ynRaster displays are always connected to a framebuffer(帧缓冲区帧缓冲区), a region of memory sufficiently lar
25、ge to hold(足以容纳) all the pixel values for the display. qThe frame buffer may be physical memory on-board the display or in the host computer.qAlternatively, a graphics card installed in a personal computer might house the frame buffer. q另外,安装在个人电脑上的显卡也带有帧缓存。nFigure 1.36 suggests how an image is crea
26、ted and displayed .qEach instruction(指令) of the graphics program (stored in system memory) is executed by the central processing unit (CPU), storing an appropriate value for each pixel into the frame buffer. qA scancontroller (not under program control) causes the frame buffer to send each pixel thr
27、ough a converter to the appropriate physical location on the display surface. color valueqThe converter takes a pixel value such as 01001011 and converts it to the corresponding color value quantity that produces a spot of color on the display. Figure 1.36. Block diagram(框图) of a computer with raste
28、r displayInstruction指令指令Graphics图形程序图形程序Graphics Display Device Operationframe bufferpixel at address x,y06394790 xydisplay surfacescancontrollerxyxyspot at (x,y)geometricpositionlogicaladdressat (639, 0)at (639, 479)convert pixelvalue to colorFigure1.37providesmoredetailonthescanningprocess.1.3.4 V
29、ideo Monitor(视频显示器)n(1)Based on cathode ray tube (CRT阴极射线管).framebuffer(6 planes)DACsscan controllerxyyxdeflectioncoilselectronbeamgunsredgreenbluespotpixelvalue(2)LCD(Liquid Crystal Display)n液晶显示器LCD(Liquid Crystal Display)与其他显示器不同,它是由多层薄板组成的平板式显示器。n液晶是一种具有规则性分子排列的有机化合物,它即不是固体也不是液体,它是介于固态和液态之间的物质,把
30、它加热时它会呈现透明的液体状态,把它冷却时它则会出现结晶颗粒的混浊固体状态。n液晶显示器的工作原理:是利用液晶的物理特性,在通电时导通,使液晶排列变得有秩序,使光线容易通过;不通电时,排列则变得混乱,阻止光线通过。组成屏幕的液状晶体有三种:红、绿、蓝,叫做三基色,它们按照一定的顺序排列,通过电压来刺激这些液状晶体,就可以呈现出不同的颜色,不同比例的搭配可以呈现出千变万化的色彩。n液晶面板主要是由两块无钠玻璃夹着一个由偏光板、液晶层和彩色滤光片构成的夹层所组成。n偏光板、彩色滤光片决定了有多少光可以通过以及生成何种颜色的光线 。n液晶被灌在两个制作精良的平面之间构成液晶层,这两个平行的平面上的沟
31、槽是互相垂直的,位于两个平面间液晶分子的排列会形成一个Z轴向90度的逐渐扭曲状态。n背光光源发出的光线通过液晶显示屏背面的导光板和偏光板产生均匀的背光光线,这些光线通过后会被液晶进行Z轴向的扭曲,从而能够通过前层平面。如果给液晶层加电压将会产生一个电场,液晶分子就会重新排列,光线无法扭转从而不能通过前层平面。(3) Plasma Display Panel(等离子显示器等离子显示器PDP)n等离子显示器一般由三层玻璃板组成。在第一层的里面涂有导电材料的垂直,中间层是灯泡阵列,也就是离子管,里面充满惰性气体,第三层表面涂有导电材料的水平条。当加有电压时,等离子气体激发出紫外线去激发后面玻璃上的红
32、、绿、蓝3色荧光体发出肉眼能看到的可见光,以此成像。n等离子屏幕的彩色图像由各个独立的荧光粉像素发光综合而成,因此图像鲜艳、明亮、干净而清晰。等离子显示器的结构 几种显示技术的比较如表所示几种显示技术的比较如表所示: :性质CRTPDPLED性质PDPLED功耗大中小对比度中好差屏幕大中小灰度等级好差差厚度大小小视角大中一般平面度一般中好色彩丰富中中亮度好好适中价格低中低分辨率中好一般 CRT1.3.5 Hard Copy Raster Devices(硬拷贝光栅设备)nIn graphics, to reproduce a scene with colors we want a color
33、laser (彩色激光) or inkjet (喷墨)printer.nPrinters equipped to use PostScript (a page description language页面描述语言) can generate high quality text and graphics on a printed page. nA film recorder(胶片记录仪)(胶片记录仪) uses a strip of photographic film(带状胶片), exposed by the electron beam as it sweeps over it (once)
34、in a raster pattern(以光栅方式). Film recorders are frequently used to make high-quality 35-mm slides, or movies. 1.4 Graphics Input Types(图形输入类型)1.4.1String字符字符a stringofcharactersfollowed by a termination charactertypedin bythe user and stored in memory.1.4.2Valuator数值数值a real value between 0.0 and 1.0, which can be used to fix the length of a line, the speed of an action, or perhaps the size of a picture. 1.4.3Locator定位定位a coordinatepair (x, y) which
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年虚拟现实设备舒适度创新报告
- 维修人员工作总结(汇编15篇)
- 26年护理禁忌案例解析课件
- 26年银发护理应急处置不当禁忌课件
- 2026春浙美版(新教材)小学美术二年级下册第四单元多姿多彩编出来《11.编织“小花衣”》教学设计
- 东方红印刷厂印刷厂印刷加工合同合同三篇
- 肾盂癌术后膀胱癌再发防控策略:多维度临床探索与实践
- 肾康注射液治疗慢性肾功能衰竭的疗效与机制探究:多维度临床分析与展望
- 肺癌诊疗新视角:肿瘤标志物的精准应用与价值评估
- 肺癌微波消融术前后血清VEGF、PDGF和Ang - 2水平变化及其临床关联研究
- 2022年浙江衢州市大花园集团招聘31人上岸笔试历年难、易错点考题附带参考答案与详解
- 劳动纠纷应急预案
- 培训中心手绘技能培训马克笔单体表现
- DB23T 2638-2020农村生活垃圾处理标准
- YC/T 205-2017烟草及烟草制品仓库设计规范
- 人行横洞施工技术交底
- 管事部培训资料课件
- 河北省衡水市各县区乡镇行政村村庄村名居民村民委员会明细
- 春潮现代文阅读理解答案
- 部编人教版八年级上册初中语文全册课前预习单
- 管桩应力释放孔施工方案
评论
0/150
提交评论