版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、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 Deriv
2、e 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
3、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,Finit
4、e 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-Wes
5、ley 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
6、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 ,
7、 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,
8、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 fro
9、m 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 +
10、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 200
11、5,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 recurs
12、ive 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
13、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,Bez
14、ier,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 ori
15、ginal 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 normal
16、s 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-2025学年度计算机四级考前冲刺练习及完整答案详解(易错题)
- 妇科疾病的护理新理念
- 2024-2025学年度中医助理医师试题预测试卷含完整答案详解(网校专用)
- 2024-2025学年医学检验(士)考试综合练习附答案详解(培优)
- 2024-2025学年度中医执业医师综合提升测试卷(必刷)附答案详解
- 2024-2025学年度辅警招聘考试经典例题一套附答案详解
- 2024-2025学年度化验员模拟题库及答案详解(全优)
- 2024-2025学年度收银审核员通关题库含答案详解【综合卷】
- 2024-2025学年度医疗卫生系统人员题库检测试题打印往年题考附答案详解
- 2024-2025学年度冶金工业技能鉴定考试综合练习附完整答案详解【考点梳理】
- 2026高考物理二轮复习专题07 热、光、原、振动与波(4大题型)(题型专练)(原卷版)
- 2026年常州工业职业技术学院单招职业适应性测试题库及答案详解(历年真题)
- 2026四川成都市金牛国投人力资源服务有限公司招聘金牛区街区规划师8人考试参考试题及答案解析
- 2026年国企供排水试题及答案
- 2026年南京旅游职业学院单招职业技能测试题库及答案详解(考点梳理)
- 2026年苏州工业职业技术学院单招职业技能考试题库及答案解析
- 2025年上饶职业技术学院单招综合素质考试试题及答案解析
- 2026年内蒙古化工职业学院单招职业适应性测试题库附参考答案详解(考试直接用)
- 无人驾驶汽车关键技术要点剖析
- 女性职场健康 保健知识课件
- 2024年四川省成都市高新区中考物理二诊试卷+答案解析
评论
0/150
提交评论