CS 318 Intro to Computer Graphics John C. Hart

Slides:



Advertisements
Similar presentations
Parametric Curves Ref: 1, 2.
Advertisements

© University of Wisconsin, CS559 Spring 2004
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 8, 2014 SPLINES CUBIC CURVES HERMITE CURVES BÉZIER CURVES B-SPLINES BICUBIC SURFACES SUBDIVISION SURFACES.
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Q about GL to render polygon glBegin(GL_TRIANGLES) glVertex3f(0,0,0); glVertex3f(1,1,0); glVertex3f(1,0,0); glVertex3f(0,1,0); glEnd();
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Subdivision Curves & Surfaces and Fractal Mountains. CS184 – Spring 2011.
1 Computer Graphics Chapter 7 3D Object Modeling.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Surfaces Chiew-Lan Tai. Surfaces 2 Reading Required Hills Section Hearn & Baker, sections 8.11, 8.13 Recommended Sections 2.1.4, , 3D Computer.
Cornell CS465 Fall 2004 Lecture 16© 2004 Steve Marschner 1 Curved surfaces CS 465 Lecture 16.
Computer Graphics - Class 14
Offset of curves. Alina Shaikhet (CS, Technion)
Fractal Mountains, Splines, and Subdivision Surfaces Jordan Smith UC Berkeley CS184.
Surfaces Chiew-Lan Tai. Surfaces 2 Reading Required Hills Section Hearn & Baker, sections 8.11, 8.13 Recommended Sections 2.1.4, , 3D Computer.
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Cubic Bezier and B-Spline Curves
Subdivision Overview Subdivision is a two part process Control Mesh
Bspline Notes Jordan Smith UC Berkeley CS184. Outline Bézier Basis Polynomials –Linear –Quadratic –Cubic Uniform Bspline Basis Polynomials –Linear –Quadratic.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
1 Free-Form Deformations Free-Form Deformation of Solid Geometric Models Fast Volume-Preserving Free Form Deformation Using Multi-Level Optimization Free-Form.
Computer Graphics Lecture 13 Curves and Surfaces I.
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
2003CS Hons RW778 Graphics1 Chapter 6: Polygonal Meshes 6.2 Introduction 6.2 Introduction –Polygonal mesh: collection of polygons (faces) –List of polygons,
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
4/15/04© University of Wisconsin, CS559 Spring 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
Manuel Mesters - Subdivision Surfaces computer graphics & visualization Seminar Computer Graphics Geometric representation and processing: Subdivision.
Numerical Computation
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Korea University Jung Lee, Computer Graphics Laboratory 3D Game Engine Design David H. Eberly 8.3 Special Surfaces 2001/11/13.
INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.
CS559: Computer Graphics Lecture 24: Shape Modeling Li Zhang Spring 2010.
Geometric Objects and Transformation
Subdivision Schemes Basic idea: Start with something coarse, and refine it into smaller pieces for rendering –We have seen how subdivision may be used.
Non-Uniform Rational B-Splines NURBS. NURBS Surfaces NURBS surfaces are based on curves. The main advantage of using NURBS surfaces over polygons, is.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
CS418 Computer Graphics John C. Hart
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Lee Byung-Gook Dongseo Univ.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
11/26/02(C) University of Wisconsin Last Time BSplines.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Subdivision surfaces.
College of Computer and Information Science, Northeastern UniversityFebruary 27, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lectures.
Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 30 of 42 Wednesday, 09.
Blossoms CS 419 Advanced Topics in Computer Graphics John C. Hart
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Subdivision Schemes. Center for Graphics and Geometric Computing, Technion What is Subdivision?  Subdivision is a process in which a poly-line/mesh is.
CS559: Computer Graphics Lecture 24: Shape Modeling Li Zhang Spring 2010.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 SPLINES
© University of Wisconsin, CS559 Spring 2004
Introduction to Parametric Curve and Surface Modeling
© University of Wisconsin, CS559 Fall 2004
Curve design 455.
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

CS 318 Intro to Computer Graphics John C. Hart Parametric Surfaces CS 318 Intro to Computer Graphics John C. Hart

Space Curves z x y x y z t t t Separate into three coordinate functions p(t) = (x(t), y(t), z(t)) x(t) = (1-t)3 x0 + 3t(1-t)2 x1 + 3t2(1-t) x2 + t3 x3 y(t) = (1-t)3 y0 + 3t(1-t)2 y1 + 3t2(1-t) y2 + t3 y3 z(t) = (1-t)3 z0 + 3t(1-t)2 z1 + 3t2(1-t) z2 + t3 z3 Make your own roller-coaster ride Camera position along space curve Look at point is next position along space curve (tangent) Up direction is cross product of vector to next positon with vector to previous position (binormal) x y z t t t

p0(t), p1(t), p0(t+Dt), p1(t+Dt) Extrusion CS418 Two 3-D copies of each 2-D curve p0(t) = (x(t),y(t),0) p1(t) = (x(t),y(t),1) Create a mesh of quads (or tri-strip) p0(t), p1(t), p0(t+Dt), p1(t+Dt)

Generalized Cylinder Construct a 2-D profile curve q(s) = (a(s), b(s)) p(t) p(t+Dt) p(t–Dt) T(t) -T(t–Dt) Construct a 2-D profile curve q(s) = (a(s), b(s)) Construct a space curve p(t) = (x(t), y(t), z(t)) Construct a Frenet frame at each point along space curve T(t) = p(t+Dt) – p(t) B(t) = T(t)  -T(t – Dt) N(t) = B(t)  T(t) (all normalized) Plot 2-D curve in (N,B) space gc(s,t) = p(t) + a(s) N(t) + b(s) B(t)

Revolution y Construct a 2-D profile curve q(t) = (x(t), y(t)) Rotate about y axis p(s,t) = (x(t) cos 2p s, y(t), x(t) sin 2p s) z x

Bezier Patches p02 p00 p01 p03 p12 p10 p11 p13 p22 Bezier patch Tensor product of two Bezier curves Product of Bernstein polynomials Bernstein interpolation of Bernstein polynomials Works same way for B-splines p20 p23 p21 p31 p32 p30 p33

Blossoming Patches Curves: p(t)  p(t,t,t) Patches: p(s,t)  p(s,s,s;t,t,t) Variables not allowed to cross the semicolon In patches, bilinear interpolation replaces linear interpolation in curves p(000;011) p(001;011) p(111;011) p(011;011) p(001;011) p(011;111) p(000;111) p(111;111) p(01s;00t) p(00s;00t) p(11s;00t) p(01s;01t) p(00s;01t) p(11s;01t) p(01s;11t) p(00s;11t) p(11s;11t) … etc.

Knot Insertion [0 2 4 6 8 10] 4 6 8 2 4 6 0 2 4 6 8 10

Knot Insertion [0 2 4 5 6 8 10] 4 6 8 4 5 6 5 6 8 2 4 6 2 4 5 0 2 4 6 8 10

Knot Insertion [0 2 4 5 6 8 10] 4 5 6 5 6 8 2 4 5 0 2 4 6 8 10

Loop Knot Insertion 2 3 4 1 2 3 3 4 5 (7 8 9) 0 1 2 4 5 6 (6 7 8)

Loop Knot Insertion 2 3 4 3 3.5 4 2 2.5 3 1 2 3 3 4 5 (7 8 9) 1 1.5 2 4 4.5 5 0 1 2 4 5 6 (6 7 8) 5 5.5 6

Loop Knot Insertion 2 3 4 3 3.5 4 2 2.5 3 1.5 2 3 3 4 5 1 2 3 1 2 2.5 1 1.5 2 4 4.5 5 0 1 2 4 5 6 5 5.5 6

Loop Knot Insertion 2 3 4 3 3.5 4 2 2.5 3 1.5 2 3 3 4 5 1 2 3 1.5 2 2.5 1 2 2.5 1 1.5 2 4 4.5 5 0 1 2 4 5 6 5 5.5 6

Loop Knot Insertion 2 3 4 3 3.5 4 2 2.5 3 1.5 2 3 3 4 5 1 2 3 1.5 2 2.5 1 2 2.5 1 1.5 2 4 4.5 5 0 1 2 4 5 6 5 5.5 6

Smoothing a Polygon

Smoothing a Polygon Add edge midpoints

Smoothing a Polygon Add edge midpoints Add struts Struts connect midpoints of segments from vertices to edge midpoints One strut per vertex

Smoothing a Polygon Add edge midpoints Add struts Struts connect midpoints of segments from vertices to edge midpoints One strut per vertex Add strut midpoints

Smoothing a Polygon Add edge midpoints Add struts Struts connect midpoints of segments from vertices to edge midpoints One strut per vertex Add strut midpoints Connect

Smoothing a Polygon Add edge midpoints Add struts Struts connect midpoints of segments from vertices to edge midpoints One strut per vertex Add strut midpoints Connect Repeat

B-Spline Patches Tensor product of two curves Need to subdivide control points to create four sub-patches Need to generate new control points vertex points (replacing control points) edge points face points

Face Points Approximate edge points as midpoint of control points E = 1/2 p + 1/2 p Face point is midpoint of approximate edge points F = 1/2 E + 1/2 E = 1/4 p + 1/4 p + 1/4 p + 1/4 p

Edge Points E2 p0 F1 Face points are midpoints between approx. edge points Approx. edge point is midpoint between control points Actual edge point is midpoint between midpoints between approx edge point and face points E = 1/2 (1/2 (1/2 E0 + 1/2 E1) + 1/2 E1) + 1/2 (1/2 E1 + 1/2 (1/2 E1 + 1/2 E2)) = 1/2 (1/2 F0 + 1/2 (1/2 p0 + 1/2 p1)) + 1/2 (1/2 (1/2 p0 + 1/2 p1) + 1/2 F1) = 1/4 (F0 + p0 + p1 + F1) E F0 E1 E0 p1

Vertex Points E2 V2 E0 p2 E3 V0 = 1/4 E0 + 1/2 p0 + 1/4 E1 V = 1/2 (1/2 (1/2 V0 + 1/2 V1) + 1/2 V1)+ 1/2 (1/2 V1 + 1/2 (1/2 V1 + 1/2 V2) = 1/4 (1/4 (F0 + F1 + p0 + p1) + 1/4 (F2 + F3 + p1 + p2) + 2 V1) = 1/4 (1/4 (F0 + F1 + F2 + F3) + 1/4 (p0 + 2 p1 + p2) + 2/4 (E2 + E3 + 2 p1)) = 1/16(F0 + F1 + F2 + F3 + 2E0 + 2E1 + 2E2 + 2E3 + 4p1) V1 p0 p1 V0 E1 F2 p2 F0 E2 E1 p0 p1 F3 E0 E3 F1

Catmull-Clark Subdiv + + n Add new “face” vertex at each face centroid centroid = average of face’s vertices Add new “edge” vertex at the average of each edge’s endpoints and adjacent face centroids Move each vertex to a new position that is… where n is the valence of the vertex (# of neighboring edges, also # of adjacent faces) 1  ave. adjacent face centroids 2  ave. adjacent edge midpoints (n-3)  current vertex position + + n

Example

Creases f i+1j = Centroid of polygon ei+1j = (vi + eij)/2 Dart vertex (one sharp edge): vi+1 = (n-2)/n vi + 1/n2 Sj eij + 1/n2 Sj fi+1j Crease vertex (two sharp edges): vi+1 = (eij + 6vi + eik)/8 Corner vertex (three or more sharp edges) vi+1 = vi

Another Example

Success?