- 1、本文档共40页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
香港大学计算机图形学课件Chapter12A.ppt
Chapter 12 Curves and Surfaces Curves are approximated with straight line segments Curves defined using functions: ellipses, parabola, cos(u), e-u, rational functions, … Curves defined via control points: Polynomials that pass through the points Piecewise polynomials (cubic splines), … Bézier curves B-splines Non-Uniform Rational B-Splines (NURBS) A more efficient algorithm First compute all the bn,i’s from a recursive definition before the summation. void BezierCurve( GLfloat cp[][3], int np, double u, GLfloat p[]) { double b[100], x, y, z, u1; int n = np - 1; if (u .99999) u = .99999; u1 = 1. - u; b[0] = pow( u1, n); for (int i=1; i=n; ++i) { b[i] = b[i-1] * (n-i+1) / i * u / u1; } x = y = z = 0.; for (int i=0; i=n; ++i) { x = x + b[i]*cp[i][0]; y = y + b[i]*cp[i][1]; z = z + b[i]*cp[i][2]; } p[0] = x; p[1] = y; p[2] = z; } * Polynomials Given k + 1 points, fit a kth degree polynomial that passes through the points. A quadratic polynomial that passes through 3 given points u x x = p(u) = a + b u + cu2 Lagrange polynomials that passes through two points (u0, x0), (u1, x1) that passes through three points (u0, x0), (u1, x1), (u2, x2), Lagrange polynomials on vertices Two points Three points P0 P1 u=0 u=1 P0 P1 P2 u=0 u=2 u=1 That passes through 4 points When k is large, say, 4, 5 or beyond, this approach is inefficient. Undesirable oscillations often occur in high degree polynomials A 5th degree polynomial A more desirable curve Splines (piecewise polynomials) Constant splines The curve that goes through the points is approximated with horizontal lines (0 degree polynomials) qi(u) = ui . qi(u)s are discontinuous, ie, qi(ui) ? qi+1(ui). u0 u1 u2 x u3 . . . g1(u) g2(u) g3(u) g0(u) Linear splines The curve is approximated with straight lines (1st degree polynomials)
您可能关注的文档
- 远观APP趋势:未来的APP软件发展与挑战.pptx
- 通信系统 第4章 光纤通信系统.ppt
- 锆石U-Pb协和图及协和年龄加权平均值计算方法.pptx
- 长江大学统计学原理(第三章统计整理)PPT.pptx
- 阿里巴巴后台操作经验分享.pptx
- 面向对象程序设计 第6讲指针.ppt
- 面向对象程序设计 第七章 数组与指针1.ppt
- 面向对象程序设计第10章.ppt
- 面向对象程序设计第6章 类与对象.ppt
- 面向对象程序设计语言C++ - 第1章 引论.ppt
- 2025江浙沪居民睡眠健康小调研报告.pdf
- 毕业论文的开题报告范文.docx
- 团委活动方案(拓展).docx
- 汽车智能驾驶行业深度报告:端到端与AI共振,智驾平权开启新时代.pdf
- 小核酸行业深度:技术平台和适应症不断验证,迎来销售和临床密集兑现期-华福证券-2025.3.31-65页.docx
- 医药生物行业医疗AI专题报告二多组学篇AI技术驱动精准诊断实现重要突破-25031440页.docx
- CXO行业系列报告三寒冬已过行业需求逐步回暖-25031430页.docx
- 全国租赁市场报告2025年3月_可搜索.pdf
- 玩具行业“情绪经济”专题:创新玩法+IP赋能,重新定义玩具-华鑫证券-2025.docx
- 医疗保健行业PCAB抑制剂药物深度报告抑酸药物市场空间广阔PCAB抑制剂大有可为-25.pdf
文档评论(0)