已阅读5页,还剩15页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Rendering Curves and Surfaces,Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico,2,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Objectives,Introduce methods to draw curves Approximate with lines Finite Differences Derive the recursive method for evaluation of Bezier curves and surfaces Learn how to convert all polynomial data to data for Bezier polynomials,3,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Evaluating Polynomials,Simplest method to render a polynomial curve is to evaluate the polynomial at many points and form an approximating polyline For surfaces we can form an approximating mesh of triangles or quadrilaterals Use Horners method to evaluate polynomials p(u)=c0+u(c1+u(c2+uc3) 3 multiplications/evaluation for cubic,4,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Finite Differences,For equally spaced uk we define finite differences,For a polynomial of degree n, the nth finite difference is constant,5,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Building a Finite Difference Table,p(u)=1+3u+2u2+u3,6,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Finding the Next Values,Starting at the bottom, we can work up generating new values for the polynomial,7,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,deCasteljau Recursion,We can use the convex hull property of Bezier curves to obtain an efficient recursive method that does not require any function evaluations Uses only the values at the control points Based on the idea that “any polynomial and any part of a polynomial is a Bezier polynomial for properly chosen control data”,8,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Splitting a Cubic Bezier,p0, p1 , p2 , p3 determine a cubic Bezier polynomial and its convex hull,Consider left half l(u) and right half r(u),9,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,l(u) and r(u),Since l(u) and r(u) are Bezier curves, we should be able to find two sets of control points l0, l1, l2, l3 and r0, r1, r2, r3 that determine them,10,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Convex Hulls,l0, l1, l2, l3 and r0, r1, r2, r3each have a convex hull that that is closer to p(u) than the convex hull of p0, p1, p2, p3 This is known as the variation diminishing property.,The polyline from l0 to l3 (= r0) to r3 is an approximation to p(u). Repeating recursively we get better approximations.,11,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Equations,Start with Bezier equations p(u)=uTMBp,l(u) must interpolate p(0) and p(1/2),l(0) = l0 = p0 l(1) = l3 = p(1/2) = 1/8( p0 +3 p1 +3 p2 + p3 ),Matching slopes, taking into account that l(u) and r(u) only go over half the distance as p(u),l(0) = 3(l1 - l0) = p(0) = 3/2(p1 - p0 ) l(1) = 3(l3 l2) = p(1/2) = 3/8(- p0 - p1+ p2 + p3),Symmetric equations hold for r(u),12,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Efficient Form,l0 = p0 r3 = p3 l1 = (p0 + p1) r1 = (p2 + p3) l2 = (l1 + ( p1 + p2) r1 = (r2 + ( p1 + p2) l3 = r0 = (l2 + r1),Requires only shifts and adds!,13,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Every Curve is a Bezier Curve,We can render a given polynomial using the recursive method if we find control points for its representation as a Bezier curve Suppose that p(u) is given as an interpolating curve with control points q There exist Bezier control points p such that Equating and solving, we find p=MB-1MI,p(u)=uTMIq,p(u)=uTMBp,14,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Matrices,Interpolating to Bezier,B-Spline to Bezier,15,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Example,These three curves were all generated from the same original data using Bezier recursion by converting all control point data to Bezier control points,Bezier,Interpolating,B Spline,16,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Surfaces,Can apply the recursive method to surfaces if we recall that for a Bezier patch curves of constant u (or v) are Bezier curves in u (or v) First subdivide in u Process creates new points Some of the original points are discarded,original and kept,new,original and discarded,17,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Second Subdivision,16 final points for 1 of 4 patches created,18,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Normals,For rendering we need the normals if we want to shade Can compute from parametric equations Can use vertices of corner points to determine OpenGL can compute automatically,19,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Utah Teapot,Most famous data set in computer graphics Widely available as a list of 306 3D vertices and the indices that define 32 Bezier patches,20,Angel: Interactive Computer Graphics 4E Addison-Wesley 2005,Quadrics,Any quadric can be written as the quadratic form pTAp+bTp+c=0 where p=x, y, zT with A, b
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年稀有金属冶金项目分析评价报告
- 城镇国有土地使用权出让协议书合集
- 2024年年信息安全项目策划方案报告
- 《化妆师》职业资格专业技术知识考试题库与答案
- 征地协议书合集
- 北京市区房屋出售合同合集
- 房屋买卖的协议是范例合集
- 2024年泵配件项目经营分析报告
- 2024年办公家具市场分析及竞争策略报告
- Unit 7【刷易错】(模块易错综合练)-2022-2023学年七年级英语下册单元模块满分必刷题(牛津译林版)
- 食品焙烤技术课程标准(共19页)
- 2022年信息系统管理工程师(中级)考试题库(含答案)
- 空气能设计方案8吨10匹
- 移动公厕技术参数
- 科学小实验手摇发电机(课堂PPT)
- FMEA培训课件(共96页).ppt
- 给排水专业知识
- 科技成果转化示范基地项目可行性研究报告写作范文
- 西南铝业质量证明书(共7页)
- 股权抵债协议书(协议范本)
- (完整版)工程测量毕业设计.doc
评论
0/150
提交评论