Computer Graphics & Modeling: Curves, Spline Techniques, Bezier Curves

Computer Graphics & Modeling: Curves, Spline Techniques, Bezier Curves
Slide Note
Embed
Share

The world of computer graphics and 3D modeling through curves, spline techniques, and Bezier curves. Dive into the mathematics required to draw complex shapes using 2D curves with the potential to create captivating 3D models. Uncover the history behind computer modeling in auto-manufacturing, pioneered by visionaries like Pierre Bezier and de Casteljau. Discover the significance of control points, smooth curves, and the intuitive nature of Bezier curves. Delve into the intricacies of the Bezier curve's desirable properties, its ability to interpolate, and its tangent characteristics.

  • Computer graphics
  • Modeling
  • Curves
  • 3D
  • Bezier

Uploaded on Mar 18, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Computer Graphics CSE 167 [Win 19], Lecture 9: Curves 1 Ravi Ramamoorthi http://viscomp.ucsd.edu/classes/cse167/wi19

  2. Course Outline 3D Graphics Pipeline Animation Rendering Modeling

  3. Graphics Pipeline In HW 1, HW 2, draw, shade objects But how to define geometry of objects? How to define, edit shape of teapot? We discuss modeling with spline curves Demo of HW 3 solution Homework submission (Feb 27) After midterm, but please start on it before Not on edX edge, http://34.219.177.190/cs167hw3/ Same password as for readings (and code grade only)

  4. Curves for Modeling Rachel Shiner, Final Project Spring 2010

  5. Motivation How do we model complex shapes? In this course, only 2D curves, but can be used to create interesting 3D shapes by surface of revolution, lofting etc Techniques known as spline curves This unit is about mathematics required to draw these spline curves, as in HW 3 History: From using computer modeling to define car bodies in auto-manufacturing. Pioneers are Pierre Bezier (Renault), de Casteljau (Citroen)

  6. Outline of Unit Bezier curves deCasteljau algorithm, explicit form, matrix form Polar form labeling (next time) B-spline curves (next time) Not well covered in textbooks (especially as taught here). Main reference will be lecture notes. If you do want a printed ref, handouts from CAGD, Seidel

  7. Bezier Curve (with HW3 demo) Motivation: Draw a smooth intuitive curve (or surface) given few key user-specified control points Control points (all that user specifies, edits) Demo HW 3 Control polygon Smooth Bezier curve (drawn automatically)

  8. Bezier Curve: (Desirable) properties Interpolates, is tangent to end points Curve within convex hull of control polygon Control points (all that user specifies, edits) Control polygon Smooth Bezier curve (drawn automatically)

  9. Survey Anonymous, know how things are going Will try to use it to improve course

  10. Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve? Algorithmic:deCasteljau algorithm Explicit: Bernstein-Bezier polynomial basis 4x4 matrix for cubics Properties: Advantages and Disadvantages

  11. deCasteljau: Linear Bezier Curve Just a simple linear combination or interpolation (easy to code up, very numerically stable) P1 F(1) Linear (Degree 1, Order 2) F(0) = P0, F(1) = P1 F(u) = ? F(u) P0 P0 P1 F(0) 1-u u F(u) = (1-u) P0 + u P1

  12. deCasteljau: Quadratic Bezier Curve P1 Quadratic Degree 2, Order 3 F(0) = P0, F(1) = P2 F(u) = ? P2 P0 P0 1-u P1 P2 u u 1-u 1-u u F(u) = (1-u)2 P0 + 2u(1-u) P1 + u2 P2

  13. Geometric interpretation: Quadratic u 1-u 1-u u u

  14. Geometric Interpretation: Cubic u u u u u u

  15. deCasteljau: Cubic Bezier Curve P1 P2 Cubic Degree 3, Order 4 F(0) = P0, F(1) = P3 P3 P0 P0 1-u P1 u P2 u 1-u P3 u 1-u 1-u u 1-u u u 1-u F(u) = (1-u)3 P0 +3u(1-u)2 P1 +3u2(1-u) P2 + u3 P3

  16. Summary: deCasteljau Algorithm P1 P1 P2 P1 P2 P0 P3 P0 P0 Linear Cubic Quadratic Degree 2, Order 3 F(0) = P0, F(1) = P2 P0 P1 Degree 3, Order 4 F(0) = P0, F(1) = P3 P0 P1 1-u u 1-u Degree 1, Order 2 F(0) = P0, F(1) = P1 P2 P2 u 1-u P3 u P0 P1 1-u u 1-u u 1-u u 1-u 1-u u u 1-u u F(u) = (1-u) P0 + u P1 F(u) = (1-u)2 P0 + 2u(1-u) P1 + u2 P2 u 1-u F(u) = (1-u)3 P0 +3u(1-u)2 P1 +3u2(1-u) P2 + u3 P3

  17. DeCasteljau Implementation Can be optimized to do without auxiliary storage

  18. Summary of HW3 Implementation Bezier (Bezier2 and Bspline discussed next time) Arbitrary degree curve (number of control points) Break curve into detail segments. Line segments for these Evaluate curve at locations 0, 1/detail, 2/detail, , 1 Evaluation done using deCasteljau Key implementation: deCasteljau for arbitrary degree Is anyone confused? About handling arbitrary degree? Can also use alternative formula if you want Explicit Bernstein-Bezier polynomial form (next) Questions?

  19. Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve? Algorithmic: deCasteljau algorithm Explicit: Bernstein-Bezier polynomial basis 4x4 matrix for cubics Properties: Advantages and Disadvantages

  20. Recap formulae Linear combination of basis functions Linear: F(u) = P0(1-u)+P1u Quadratic: F(u) = P0(1-u)2+P1[2u(1-u)]+P2u2 Cubic: F(u) = P0(1-u)3+P1[3u(1-u)2]+P2[3u2(1-u)]+P3u3 k Degree n: F(u) = n(u) Pk Bk n(u) areBernstein-Bezier polynomials Bk Explicit form for basis functions? Guess it?

  21. Recap formulae Linear combination of basis functions Linear: F(u) = P0(1-u)+P1u Quadratic: F(u) = P0(1-u)2+P1[2u(1-u)]+P2u2 Cubic: F(u) = P0(1-u)3+P1[3u(1-u)2]+P2[3u2(1-u)]+P3u3 k Degree n: F(u) = n(u) Pk Bk n(u) areBernstein-Bezier polynomials Bk Explicit form for basis functions? Guess it? Binomial coefficients in [(1-u)+u]n

  22. Summary of Explicit Form F(u) = P0(1-u)+P1u Linear: Quadratic: F(u) = P0(1-u)2+P1[2u(1-u)]+P2u2 Cubic: F(u) = P0(1-u)3+P1[3u(1-u)2]+P2[3u2(1-u)]+P3u3 k Degree n: F(u) = n(u) Pk Bk n(u) areBernstein-Bezier polynomials Bk n! k!(n-k)!(1-u)n-kuk n(u)= Bk

  23. Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve? Algorithmic: deCasteljau algorithm Explicit: Bernstein-Bezier polynomial basis 4x4 matrix for cubics Properties: Advantages and Disadvantages

  24. Cubic 4x4 Matrix (derive) F(u) = P0(1-u)3+P1[3u(1-u)2]+P2[3u2(1-u)]+P3u3 P0 P1 P2 P3 ( ) M = ? = u3 u2 u 1

  25. Cubic 4x4 Matrix (derive) F(u) = P0(1-u)3+P1[3u(1-u)2]+P2[3u2(1-u)]+P3u3 P0 P1 P2 P3 -1 3 -3 1 -3 3 0 0 3 -6 3 0 1 0 0 0 ( ) = u3 u2 u 1

  26. Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve? Algorithmic: deCasteljau algorithm Explicit: Bernstein-Bezier polynomial basis 4x4 matrix for cubics Properties: Advantages and Disadvantages

  27. Properties (brief discussion) Demo of HW 3 Interpolation: End-points, but approximates others Single piece, moving one point affects whole curve (no local control as in B-splines later) Invariant to translations, rotations, scales etc. That is, translating all control points translates entire curve Easily subdivided into parts for drawing (next lecture): Hence, Bezier curves easiest for drawing

More Related Content