- 1、本文档共28页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
面绘制算法
surface-rendering
method
1
回顾光照模型
光照模型 (Illumination model)
又称为:光照模型 (lighting model)
也称为:明暗模型 (shading model)
建模物体表面某点处的可见颜色计算
简单近似模型:phong模型 (已讲)
2
单光源的phong模型表达式:
从视点观察到物体上任一点P处的光强度I :
应为环境反射光强度I 、漫反射光强度I 以及镜面反
e d
射光强度I 的总和:
s
I I I I
e d s
I K I K (L N ) I K (R V)n
a a p d p s
3
对于平面:
可以直接计算面亮度。(明暗着色方法)。
对于由曲面构成的表面
可计算表面的每一点亮度,但处理时间较长。
通常将曲面划分为一系列的多边形网格(一般为四边
形或三边形),用一组平面多边形来逼近曲面。
Wireframe
4
Computation of Vectors
l and v are specified by the application
Can computer r from l and n
Problem is determining n
For simple surfaces is can be determined but how
we determine n differs depending on underlying
representation of surface
OpenGL leaves determination of normal to
application
Exception for GLU quadrics and Bezier surfaces (Chapter 11)
5
Plane Normals
Equation of plane: ax+by+cz+d = 0
From Chapter 4 we know that plane is
determined by three points p , p , p or
0 2 3
normal n and p0
Normal can be obtained by
n = (p -p ) ×(p -p )
2 0 1 0
6
Normal to Sphere
Implicit function f(x,y.z)=0
Normal given by gradient
Sphere f(p)=p·p-1
文档评论(0)