欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > PPT文档下载  

    计算机图形学computergraphics课件12.ppt

    • 资源ID:4842064       资源大小:2.12MB        全文页数:59页
    • 资源格式: PPT        下载积分:10金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要10金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    计算机图形学computergraphics课件12.ppt

    1,View,Shandong University Software CollegeInstructor:Zhou YuanfengE-mail:,坞沤净泞屉暑垛猜桓倾黄坝幕惋匙鄙助莲鹰践哗罩付珠障筐姚聊稀惜沏宅计算机图形学computer graphics课件12计算机图形学computer graphics课件12,2,Objectives,Introduce the classical viewsCompare and contrast image formation by computer with how images have been formed by architects,artists,and engineersLearn the benefits and drawbacks of each type of viewIntroduce the mathematics of projectionIntroduce OpenGL viewing functionsLook at alternate viewing APIs,投殉蝴酶哲来率交禁载烦砌魔襟憾孔淀悬跨狞碍佣煞岳市拓辛赵戍瞬哨奏计算机图形学computer graphics课件12计算机图形学computer graphics课件12,View,3,We call the pictures for observing objects with different ways are views.View results are related with the shape and size of scene objects,the position and direction of viewpoint.,桂草嚷灾六铅祭缓二歌渺戊雍际怖狡恫祖泛叹缺凋悟箍嗜避蓝故彻温菜墨计算机图形学computer graphics课件12计算机图形学computer graphics课件12,4,Classical Viewing,Viewing requires three basic elementsOne or more objectsA viewer with a projection surfaceProjectors that go from the object(s)to the projection surfaceClassical views are based on the relationship among these elementsThe viewer picks up the object and orients it how she would like to see itEach object is assumed to constructed from flat principal facesBuildings,polyhedra,manufactured objects,遣袁鞠臭呼督术保褒宪笺左衷迢穆寒剩鹤汁庄疆狙缠喜瑰涧鼠恤俘鹅媳决计算机图形学computer graphics课件12计算机图形学computer graphics课件12,5,Planar Geometric Projections,Standard projections project onto a planeProjectors are lines that eitherconverge at a center of projectionare parallelSuch projections preserve linesbut not necessarily anglesNonplanar projections are needed for applications such as map construction,散绍伤掺佰及酵遥我岁辈藐改奎职慨嗡鹰划崎仕播妻其串惫秘铀篷栏博燥计算机图形学computer graphics课件12计算机图形学computer graphics课件12,6,3D space,2D image,Projection,拱眶穷蛙嘱醋瓷刚堰翌惮什粕娜探讨姆星哼导壳蛔戮将神狼躬态拇桨伎赃计算机图形学computer graphics课件12计算机图形学computer graphics课件12,7,Classical Projections,冈掺身话胖铃学谈雌像咏缴培驭禁拽蜜况菏妙乒亦庶簧猫谗纽硝港晋苑阎计算机图形学computer graphics课件12计算机图形学computer graphics课件12,8,Perspective vs Parallel,Computer graphics treats all projections the same and implements them with a single pipelineClassical viewing developed different techniques for drawing each type of projectionFundamental distinction is between parallel and perspective viewing even though mathematically parallel viewing is the limit of perspective viewing,锹勾遂综扎卉吝握客乒驭纳淹塑骋钥两辰桐歪称百委谜译剖手视央镜绰婆计算机图形学computer graphics课件12计算机图形学computer graphics课件12,9,Taxonomy of Planar Geometric Projections,parallel,perspective,Axonometric,multivieworthographic,oblique,Isometric,Dimetric,trimetric,2 point,1 point,3 point,planar geometric projections,秉脯撬谢汪缎摈殊篆尉滞蜀稍满鸵卿掩齐章着旨涕堪明崔更歉猎剂茫最懦计算机图形学computer graphics课件12计算机图形学computer graphics课件12,10,Perspective Projection,妓噬倔屋读竭误峦苍楔假地发觅愈联脱蛮磨聘宰懈蚤仙印质碧鱼溅豪刊纬计算机图形学computer graphics课件12计算机图形学computer graphics课件12,11,Parallel Projection,远愿姥症自跺象似攻腆褒不如人隙溢汹结矣澳兵绿化运筐戳卖辐遁舌友哥计算机图形学computer graphics课件12计算机图形学computer graphics课件12,12,Orthographic Projection,Projectors are orthogonal to projection surface,Arguably the simplest projection Image plane is perpendicular to one of the coordinate axes;Project onto plane by dropping that coordinate;All rays are parallel.,倘员掐裴笨学咆资寻铲葱圾榔牡粤醚蹄万规幽既辑箔乐拾彦粱傻谍委美厢计算机图形学computer graphics课件12计算机图形学computer graphics课件12,13,Multiview Orthographic Projection,Projection plane parallel to principal faceUsually form front,top,side views,isometric(not multivieworthographic view),front,side,top,in CAD and architecture,we often display three multiviews plus isometric,丫卷勋俯横摄钒踊佐奇蔫采骋透宙欲邵兼献淘甄妈慎丙次队悉阀棍涂钧匆计算机图形学computer graphics课件12计算机图形学computer graphics课件12,14,Advantages and Disadvantages,Preserves both distances and anglesShapes preservedCan be used for measurementsBuilding plansManualsCannot see what object really looks like because many surfaces hidden from viewOften we add the isometric,相舱耶们涪翔季习藐滴坡焚练民移洱慎蛀彝袋卒艰谷西粗沿熊稚猛篡绍祈计算机图形学computer graphics课件12计算机图形学computer graphics课件12,15,Axonometric Projections,Allow projection plane to move relative to object,classify by how many angles ofa corner of a projected cube are the samenone:trimetrictwo:dimetricthree:isometric,秧蹬撅迹税庙鄙劲弥突亲二钟屡就铰感陨幻苹红赞诞喀椽掸雍构虱理绝食计算机图形学computer graphics课件12计算机图形学computer graphics课件12,16,Types of Axonometric Projections,旬纫镍瞳八伴诵翌登汗焦瞒哼席甄岳点玄朋撇荆彩禾钳毁塌是邑酸吼吨陡计算机图形学computer graphics课件12计算机图形学computer graphics课件12,17,Advantages and Disadvantages,Lines are scaled(foreshortened)but can find scaling factorsLines preserved but angles are notProjection of a circle in a plane not parallel to the projection plane is an ellipseCan see three principal faces of a box-like objectSome optical illusions possibleParallel lines appear to divergeDoes not look real because far objects are scaled the same as near objectsUsed in CAD applications,赔牲蓑还药咏发熟驰恿颤隋讯硷蠕膘翌哉掩虑忌持恼苦八我祟氛磅堤扑僧计算机图形学computer graphics课件12计算机图形学computer graphics课件12,18,Oblique Projection,Arbitrary relationship between projectors and projection plane,暴撩倡滞短避荧富演斜中触陕砒摸荫销纳搐酋录径显琐笋肾商酚啄玩匹庄计算机图形学computer graphics课件12计算机图形学computer graphics课件12,19,Advantages and Disadvantages,Can pick the angles to emphasize a particular faceArchitecture:plan oblique,elevation obliqueAngles in faces parallel to projection plane are preserved while we can still see“around”sideIn physical world,cannot create with simple camera;possible with bellows camera(波纹管相机)or special lens(architectural),缺痒情峨谗踢刁憨受管均咐锡洛硷缴汲融惕槛损唁窝开递铲新羞中囤既枚计算机图形学computer graphics课件12计算机图形学computer graphics课件12,20,Perspective Projection,Projectors converge at center of projection,Naturally we see things in perspective Objects appear smaller the farther away they are;Rays from view point are not parallel.,呛菌很亏伎昭承歉锹沁纹腮葵食倾腔聚滴妒倚寒任两扑增丙杨虏嗜萍妆稼计算机图形学computer graphics课件12计算机图形学computer graphics课件12,21,Vanishing Points,Parallel lines(not parallel to the projection plan)on the object converge at a single point in the projection(the vanishing point)Drawing simple perspectives by hand uses these vanishing point(s),vanishing point,剔锻惊钞抹累苇末砍会塑烈儿绣艺浓癣伍氮愁畜络李酪晕雨攒诈杠既好葫计算机图形学computer graphics课件12计算机图形学computer graphics课件12,22,Three-Point Perspective,No principal face parallel to projection planeThree vanishing points for cube,瓶需剧占此异夺戳沤雅舒烦赤蒲相扑妊藩稗动刨仕维找柠狱朋豁第蒜飞蒙计算机图形学computer graphics课件12计算机图形学computer graphics课件12,23,Two-Point Perspective,On principal direction parallel to projection planeTwo vanishing points for cube,匀忿谩俭掂姚插聋亭纂献藻古秩痔肢捶帕蘸毖伞疡倍腿蜂债吝煽锰廓馋脏计算机图形学computer graphics课件12计算机图形学computer graphics课件12,24,One-Point Perspective,One principal face parallel to projection planeOne vanishing point for cube,嚏诛定巴巴戈艇獭梢构念适堑彝淫洛窗祷祸躬宋蝶买侨吻烈瘦遏承国乖圈计算机图形学computer graphics课件12计算机图形学computer graphics课件12,25,Advantages and Disadvantages,Objects further from viewer are projected smaller than the same sized objects closer to the viewer(diminution)Looks realisticEqual distances along a line are not projected into equal distances(nonuniform foreshortening)Angles preserved only in planes parallel to the projection planeMore difficult to construct by hand than parallel projections(but not more difficult by computer),疤酥杖玩画皮蒜奏缮趟螟菜肮搁始耶药筑发美算褂倡改囊茧邪屁赖七跟昌计算机图形学computer graphics课件12计算机图形学computer graphics课件12,26,Computer Viewing,There are three aspects of the viewing process,all of which are implemented in the pipeline,Positioning the cameraSetting the model-view matrixSelecting a lensSetting the projection matrixClippingSetting the view volume,喝敦威内张侮艘觉差寒专笺捏屈骂村珊哼舟梢般焉筷矿疫扰跳安乘豺涝冬计算机图形学computer graphics课件12计算机图形学computer graphics课件12,27,The OpenGL Camera,In OpenGL,initially the object and camera frames are the sameDefault model-view matrix is an identityThe camera is located at origin and points in the negative z directionOpenGL also specifies a default view volume that is a cube with sides of length 2 centered at the originDefault projection matrix is an identity,氦度恒丈峰岛刽煎娩挫稿便酣葡盆此其堵牲犬滩伏襄执盗库懒杂八挡邓邮计算机图形学computer graphics课件12计算机图形学computer graphics课件12,28,OpenGL code,Remember that last transformation specified is first to be applied,glMatrixMode(GL_MODELVIEW)glLoadIdentity();glTranslatef(0.0,0.0,-d);glRotatef(-90.0,0.0,1.0,0.0);,柔萄望逞袋尝钮杂德境咳背羡讲猩昂肩惊笆帽柜鞘忽做炮碴翅辈室太撒肃计算机图形学computer graphics课件12计算机图形学computer graphics课件12,29,Default Projection,Default projection is orthogonal,clipped out,2,猪屉遂赔硬忠沿蒸膳实镜汾瘫挛堂评饿率烦诲猜怎脱睛穷枚何肩瑟逞睛盅计算机图形学computer graphics课件12计算机图形学computer graphics课件12,30,Moving the Camera Frame,If we want to visualize object with both positive and negative z values we can eitherMove the camera in the positive z directionTranslate the camera frameMove the objects in the negative z directionTranslate the world frameBoth of these views are equivalent and are determined by the model-view matrix-Want a translation(glTranslatef(0.0,0.0,-d);)-d 0,哨诀聪松戴耽技硬信吁涌翅蠕歇磋尽颗含凳诈单蠢郊亮个他锭燃裴计素搅计算机图形学computer graphics课件12计算机图形学computer graphics课件12,31,Moving Camera back from Origin,default frames,frames after translation by d d 0,glTranslatef(0.0,0.0,-d);,女萨拌蹦领物哥究惶映睬芽吸撬翟烙剃喜氏剿揖拿缄酬烬吹汰涵冀顶纷辊计算机图形学computer graphics课件12计算机图形学computer graphics课件12,32,Moving the Camera,We can move the camera to any desired position by a sequence of rotations and translationsExample:side viewRotate the cameraMove it away from originModel-view matrix C=TR,glTranslatef(0.0,0.0,-d);glRotatef(-90.0,0.0,1.0,0.0);Important!,慷瓷职熟凳艰酝褒与疮敛沿霓用交夯糙吱蔬驯冀澈醒诡徊杜陋碌恳跃患吗计算机图形学computer graphics课件12计算机图形学computer graphics课件12,33,The LookAt Function,The GLU library contains the function gluLookAt to form the required modelview matrix through a simple interfaceNote the need for setting an up directionStill need to initialize Can concatenate with modeling transformationsExample:isometric view of cube aligned with axes,glMatrixMode(GL_MODELVIEW):glLoadIdentity();gluLookAt(1.0,1.0,1.0,0.0,0.0,0.0,0.,1.0.0.0);,钉思镍嫉柱旬持晓昆钞大宣剁水脱樱逊抽轩悸淫酪嚎搭硒佣缚图稿佃拱盟计算机图形学computer graphics课件12计算机图形学computer graphics课件12,34,gluLookAt,glLookAt(eyex,eyey,eyez,atx,aty,atz,upx,upy,upz),彪捡漫吠湾槐录孙闰快蛇行撵屁性淬蔓猛昂剧腿梦闭续苯的梧雅诅睫联什计算机图形学computer graphics课件12计算机图形学computer graphics课件12,35,Other Viewing APIs,The LookAt function is only one possible API for positioning the cameraOthers includeView reference point,view plane normal,view up(PHIGS,GKS-3D)Yaw偏转,pitch倾斜,roll侧滚Elevation,azimuth,twist(仰角、方位角、扭转角)Direction angles,戎萄械辛妮泊犊蛮踪毕冷贞旦玫这驾尉彝医搭秒迎熔皋狡薯舶硝慎夸特漓计算机图形学computer graphics课件12计算机图形学computer graphics课件12,36,Yaw,pitch,roll,侧滚,倾斜,偏转,角埋慢翅拇摆央缎茵右毙亲劈养耘歹鲸谐睹妨箭火栋拆误因条晤洋枷动维计算机图形学computer graphics课件12计算机图形学computer graphics课件12,37,PHIGS,GKS-3D,倡归作较视袱告滥札伐鸥吠键净测矾拱违曰谊怕赴隋醛蛮潜走丘蚤拢圈聋计算机图形学computer graphics课件12计算机图形学computer graphics课件12,VPN&VUP,VPN:Normal of projection faceOne direction cannot decide the cameraCamera can rotate around the VPN;+VUP can decide the camera frame,38,茎肖琢论灯谋雹现交勋础芬酋弹蓄吠愿休兆穿铭弊非絮尊丝箍蚜一篓菇薪计算机图形学computer graphics课件12计算机图形学computer graphics课件12,VUP,Can not be parallel with Projection face.Project VUP to view plane get v.,39,弗弘府砷舵劝仲奖扯而雕关刻屋矗也垫经耽损忽断提炕占住刁睹羞挎尽森计算机图形学computer graphics课件12计算机图形学computer graphics课件12,40,方位角,仰角,由暗勾皑啪史嚏愉澄田瘪惫渠嘉鳃酶孩群拾卞乎嘛各失相属豁常跨煞佑仑计算机图形学computer graphics课件12计算机图形学computer graphics课件12,41,OpenGL Orthogonal Viewing,void glOrtho(GLdouble left,GLdouble right,GLdouble bottom,GLdouble top,GLdouble near,GLdouble far);,near and far measured from camera,讶邹第谗咙飘康侧焦所回炙载遇澎彦馏祖拯瞻孺量国砂他榆岩桓乱卧彤枯计算机图形学computer graphics课件12计算机图形学computer graphics课件12,42,OpenGL Perspective,void glFrustum(GLdouble left,GLdouble Right,GLdouble bottom,GLdouble top,GLdouble near,GLdouble far);,碉绦富兔家颊盾伏斟缸源遇晴记概镣倦非巩杖挂季稿筹诫恰侦枉朱酝挚而计算机图形学computer graphics课件12计算机图形学computer graphics课件12,43,Using Field of View,With glFrustum it is often difficult to get the desired viewvoid gluPerspective(GLdouble fovy,GLdouble aspect,GLdouble zNear,GLdouble zFar);often provides a better interface,aspect=w/h,仇仿岭挽响灸灾恬释橙鲜耪不率固脉久孤沛烙搽腑谅芭偿形规递架化郊强计算机图形学computer graphics课件12计算机图形学computer graphics课件12,Projection Matrix,44,Connecting,We get line:,Combining with image plane equation,Solving equations,剿坝搅槛苍峻盖淬害奖牲受缸蝉练歌铬晓轿茶王泪警栗呢雍制誓夏肩蝗蔑计算机图形学computer graphics课件12计算机图形学computer graphics课件12,Projection Matrix,45,We can get,Similarly,Substitute one point of 3D object into above,we can get the projection point on plane,from,节峡全娟柏络讫骇动抉绝蓄骨耕督陆雷借开磺斧好征须捣黔槽萌喧炒忧茹计算机图形学computer graphics课件12计算机图形学computer graphics课件12,Projection Matrix,46,Homogeneous coordinate expression:,疮近晌甩饮煞适咏侨养汤弘带秩拽捻谜闺丘遁乓憨锥温畴忍漆祖釉毅藕搽计算机图形学computer graphics课件12计算机图形学computer graphics课件12,47,Normalization,Rather than derive a different projection matrix for each type of projection,we can convert all projections to orthogonal projections with the default view volumeThis strategy allows us to use standard transformations in the pipeline and makes for efficient clipping,另酮法嚏翰勘嘲向顿酱楼轨铺婴炙春绿杀棉二豺概活体汀坯择脚蛆佩粪雾计算机图形学computer graphics课件12计算机图形学computer graphics课件12,48,Pipeline View,modelviewtransformation,projectiontransformation,perspective division,clipping,projection,nonsingular,4D 3D,against default cube,3D 2D,倡腾嫩垦亮地荫逆伟畸圆节蹈窃瞪衅撑急穿脯桑弥顽配岭症宽郁为霉憋俊计算机图形学computer graphics课件12计算机图形学computer graphics课件12,49,Orthogonal Normalization,glOrtho(left,right,bottom,top,near,far),normalization find transformation to convertspecified clipping volume to default,佩锰爬舌瞻紧涕幽腆蠢码盎萌馈鳃踌晌炳酣订都驳谩服躬暖胎沛檀汁攒猖计算机图形学computer graphics课件12计算机图形学computer graphics课件12,50,Orthogonal Matrix,Two stepsMove center to originT(-(left+right)/2,-(bottom+top)/2,(near+far)/2)Scale to have sides of length 2S(2/(left-right),2/(top-bottom),2/(near-far),P=ST=,惨旱汪弟蹋凡碗舷谷舷历池旨氦搐堆抚耳望毫嘱菱伊傍劳有抑乾吝菏醛倪计算机图形学computer graphics课件12计算机图形学computer graphics课件12,51,Final Projection,Set z=0 Equivalent to the homogeneous coordinate transformationHence,general orthogonal projection in 4D is,Morth=,P=MorthST,堰洲绅秃渡盼闷唾焕容掂瘦陇末添腕筷殉柯恢哇饺鲍去辙痘卖谋翱焚睫坡计算机图形学computer graphics课件12计算机图形学computer graphics课件12,52,Simple Perspective,Consider a simple perspective with the COP at the origin,the near clipping plane at z=-1,and a 90 degree field of view determined by the planes x=z,y=z,剔充乓给宝砸椒敲捞顶仕佬亨乏垛龚昌膛蚌们炼骨坐验晚夫难谈关馏桨瘟计算机图形学computer graphics课件12计算机图形学computer graphics课件12,53,Perspective Matrices,Simple projection matrix in homogeneous coordinatesNote that this matrix is independent of the far clipping plane,M=,酗侣某拘昼壬羹呕讶悸妹圃惶登论埠卖钱磐阂箩予院备帛摈亚阉忽偿铲绷计算机图形学computer graphics课件12计算机图形学computer graphics课件12,54,Generalization,N=,after perspective division,the point(x,y,z,1)goes to,x=x/zy=y/zz=-(a+b/z),which projects orthogonally to the desired point regardless of a and b,肆挚琅蚊峨禹马伞刘骄钳力碑于砍醚稍痴间亦苦庭膜炙酣莎清我怎汗漠贮计算机图形学computer graphics课件12计算机图形学computer graphics课件12,55,Picking a and b,If we pick,a=,b=,the near plane is mapped to z=-1the far plane is mapped to z=1and the sides are mapped to x=1,y=1,Hence the new clipping volume is the default clipping volume,寄恩桐算编增滥泞渡揪强憎显扇霖陡涕彤谣贪亏戴叙匆竟敞限傀路挡凉核计算机图形学computer graphics课件12计算机图形学computer graphics课件12,56,Normalization Transformation,original clipping volume,original object,new clipping volume,distorted objectprojects correctly,泥杠势惮滩辙羹代莲膊末娄垮塑砸汰蔬垃上愈袋举替纤幢卫阀涨腐棍萄烦计算机图形学computer graphics课件12计算机图形学computer graphics课件12,Projection Matrix,57,蚂籽渠鉴宫秤婉捷辗逆闻召獭晕果官伟调透椰翌厂着拭匈资八括遗兄愁撕计算机图形学computer graphics课件12计算机图形学computer graphics课件12,Summary,58,Perspective Projection and Parallel ProjectionParallel projection orthographics projectionInfinite viewpointProjection

    注意事项

    本文(计算机图形学computergraphics课件12.ppt)为本站会员(sccc)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开