Three-Dimensional Object Representation

Slides:



Advertisements
Similar presentations
Computer Graphics- SCC 342
Advertisements

Lecture Notes #11 Curves and Surfaces II
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Lecture 10 Curves and Surfaces I
ICS 415 Computer Graphics Bézier Splines (Chapter 8)
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
© University of Wisconsin, CS559 Spring 2004
B-Spline Blending Functions
Dr. S.M. Malaek Assistant: M. Younesi
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
1 Computer Graphics Chapter 7 3D Object Modeling.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
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.
Curves Mortenson Chapter 2-5 and Angel Chapter 9
Objects in 3D – Parametric Surfaces Computer Graphics Seminar MUM, summer 2005.
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
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:
Curve Modeling Bézier Curves
CS-321 Dr. Mark L. Hornick 1 3-D Object Modeling.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
19/13/ :20 UML Graphics II Parametric Curves and Surfaces Session 3.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
(Spline, Bezier, B-Spline)
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
Spline Representations
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
June D Object Representation Shmuel Wimer Bar Ilan Univ., School of Engineering.
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
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.
Geometric Modelling 2 INFO410 & INFO350 S Jack Pinches
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Representation of Curves and Surfaces Graphics.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
In the name of God Computer Graphics Bastanfard. Curve Function(2) Other method is approximate it using a poly-line. Just locate a set of points along.
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.
(c) 2002 University of Wisconsin
Slide 129 October 1999CS Computer Graphics (Top Changwatchai) Bézier Curves - Results of Derivation Tangents at endpoints are equal to endpoint slopes.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
3D Object Representations. Introduction Line and circle and polygon algorithms- represented simple and smooth object. Some Natural object are neither.
Introduction to Parametric Curve and Surface Modeling.
UNIT - 4 3D concepts and object representation 1.
© University of Wisconsin, CS559 Spring 2004
Constructing Objects in Computer Graphics
Surfaces and Curves.
Curve & Surface.
Representation of Curves & Surfaces
CS 445 / 645 Introduction to Computer Graphics
(Spline, Bezier, B-Spline)
Chapter 10-2: Curves.
Three Dimensional Object Representation
© University of Wisconsin, CS559 Fall 2004
CURVES CAD/CAM/CAE.
© University of Wisconsin, CS559 Spring 2004
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
UNIT-5 Curves and Surfaces.
Introduction to Parametric Curve and Surface Modeling
3-Dimensional Object Representation
Spline representation. ❖ A spline is a flexible strip used to produce a smooth curve through a designated set of points. ❖ Mathematically describe such.
Type to enter a caption. Computer Graphics Week 10 Lecture 2.
Presentation transcript:

Three-Dimensional Object Representation Chapter 10 Three-Dimensional Object Representation

Introduction Graphics scenes can contain many different kinds of objects No one method can describe all these objects Accurate models produce realistic displays of scenes Polygon and quadric surfaces Spline surfaces and construction techniques Procedural methods Physically-based modeling methods Octree encodings Boundary representations (B-reps) Space-partitioning representations

Polygon Surfaces The most commonly used boundary represent-ation All surfaces are described with linear equations Simplify and speed up surface rendering and display of objects Precisely define a polyhedron For non-polyhedron objects, surfaces are tesselated Commonly used in design and solid modeling The wireframe outline can be display quickly

Polygon Tables Specify a polygon surface Geometric tables Vertex coordinates Spatial orientation of the polygon Attribute tables Degree of transparency Surface reflectivity Texture

Polygon Tables Convenient organization for geometric data Vertex Table Edge Table Polygon Table v1 E3 E6 E1 S1 S2 v3 v5 E2 E4 E5 v2 v4

Polygon Tables

Polygon Tables Alternative arrangements Use just two tables: a vertex table and a polygon table Some edges could get drawn twice Use only a polygon table This duplicates coordinate information Extra information to the data tables Expand the edge table to include forward pointers into the polygon table Common edges between polygons Expand vertex table to contain cross-reference to corresponding edges

Polygon Tables Additional geometric information The slope for each edge Coordinate extents for each polygon Tests for consistency and completeness Every vertex is an endpoint for at least two edges Every edge is part of at least one polygon Every polygon is closed Each polygon has at least one shared edge Every edge referenced by a polygon pointer has a reciprocal pointer back to the polygon

Plane Equations The equation for a plane surface Ax + By + Cz +D = 0 By Cramer’s rule: Values of A,B,C and D are computed for each polygon and stored with the other polygon data

Plane Equations Orientation of a plane surface Surface normal vector (A, B, C) Distinguish two sides of a surface “Inside” face “Outside” face The normal vector from inside to outside Viewing the outer side of the plane in a right-handed coordinate system Vertices are specified in counterclockwise direction

Plane Equations N=(A,B,C)

Plane Equations

Plane Equations Identify a point (x, y, z) as either inside or outside a plane surface In a right-handed coordinate system, the plane parameters A, B, C, and D were calculated using vertices selected in a counterclockwise order when viewing the surface in an outside-to-inside direction. If Ax+By+Cz+D<0, the point(x,y,z) is inside the surface If Ax+By+Cz+D>0, the point(x,y,z) is outside the surface

Bezier Curves A spline approximation method Developed by Pierre Bezier Renault automobile bodies Given n + 1 control points Bernstein polynomials

Bezier Curves The degree of the Bezier polynomial One less than the number of control points used. The relative position of control points With certain placements, we obtain degenerate Bezier polynomials.

Properties of Bezier Curves It always passes through the first and last control points. Values of the parametric first derivatives The slope at the beginning of the curve is along the line joining the first two control points. The slope at the end of the curve is along the line joining the last two control points

Properties of Bezier Curves The parametric second derivative The Bezier blending functions They are all positive. Their sum is always 1: The convex-hull property is hold

Design Techniques Using Bezier Curves Closed Bezier curves Specifying the first and last control points at the same position. Multiple control points Specifying multiple control points at a single coordinate position gives more weight to that position.

Cubic Bezier Curves Four blending functions for cubic Bezier curves Blending function BEZ 1,3 is maximum at u = 1/3. Blending function BEZ 2,3 is maximum at u = 2/3. Bezier curves do not allow for local control of the curve shape.

Cubic Bezier Curves

Cubic Bezier Curves

Bezier Surfaces The Bezier surface Its parametric vector function is formed as the Cartesian product of Bezier blending functions

B-Spline Curves B-splines have two advantages over Bezier splines: The degree is independent of the number of control points. Allow local control of the shape. Blending function formulation The range of parameter u depends on how we choose the B-spline parameters. B k,d are polynomials of degree d - 1.

B-Spline Curves B-spline blending functions Cox-deBoor recursion formulas: Knot vector: The selected set of subinterval endpoints u j. We can choose any value for the subinterval endpoints satisfying the relation u j+1  u j

B-Spline Curves

B-Spline Curves Values for umin and umax depend on: The number of control points we select. The value we choose for parameter d. How we set up the subintervals.

B-Spline Curves Properties of B-spline curves Have degree d - 1 and C d-2 continuity over the range of u. For n + 1 control points, the curve is described with n + 1 blending functions. Each B k,d is defined over d subintervals, starting at knot value u k. The range of parameter u is divided into n + d subintervals by n + d + 1 knot values. With knot values {uo, u1, ..., u n+d}, the resulting B-spline curve is defined from u d-1 to u n+1. Any one control point can affect the shape of at most d curve sections.

B-Spline Curves Convex Hull property The B-spline curve holds the property. For any parameter value of u in the interval from knot value u d-1 to u n+1, the sum over all basis functions is 1. For different knot vectors, there are three classes: Uniform Open uniform Non-uniform

Uniform, Periodic B-Splines Uniform B-spline The spacing between knot values is constant. {-1.5,-1.0,-0.5,0.0,0.5,1.0,1.5,2.0} Often normalized to the range between 0 and 1. {0.0,0.2,0.4,0.6,0.8,1.0} Uniform B-splines have periodic blending functions. Periodic blending function For given values of n and d, all blending functions have the same shape. Each successive blending function is simply a shifted version of the previous function:

Uniform, Periodic B-Splines

Uniform, Periodic B-Splines

Uniform, Periodic B-Splines Example: d = n = 3 Knot vector = {0, 1, 2, 3, 4, 5, 6} The slope at the start position is parallel to the line joining the first two control points. The slope at the end position is parallel to the line joining the last two control points. p1 p2 Pstart =1/2(P0+P1) Pend =1/2(P2+P3) P’start = P1 -P0 p0 P’end = P3 -P2 p3

Cubic, Periodic B-Splines For cubics, d = 4 and each blending function spans four subintervals. If we are to fit the cubic control points,then we could use the integer vector {0,1,2,3,4,5,6,7} An alternate formulation: start with the boundary conditions, normalized interval u[0,1]

Cubic, Periodic B-Splines A matrix formulation for a cubic periodic B-spline with four control points

Cubic, Periodic B-Splines Example: A closed, periodic, piecewise, cubic B-spline constructed with cyclic specification of the six control points.

Open, Uniform B-Splines A class between uniform and nonuniform B-splines Knot spacing is uniform except at the ends where knot values are repeated d times. Example: {0, 0, 1, 2, 3, 3}, for d = 2 and n = 3 {0, 0, 0, 0, 1, 2, 2, 2, 2}, for d = 4 and n = 4 For any d and n, the knot vector

Open, Uniform B-Splines Characteristics are very similar to Bezier splines When d = n + 1, open B-splines reduce to Bezier splines, all knot values are either 0, or 1. Example: a cubic, open B-splines (d = 4) Knot vector = {0, 0, 0, 0, 1, 1, 1, 1} An open B-spline passes through the first and last control points. Specifying multiple control points at the same coordinate position pulls curve closer.

Nonuniform B-Splines Nonuniform B-splines We can specify any values and intervals for the knot vector. {0, 1, 2, 3, 3, 4} {0, 2, 2, 3, 3, 6} {0, 0.2, 0.6, 0.9, 1.0} Provides increased flexibility in controlling a curve shape. Multiple knot values reduce the continuity by 1 for each repeat of a particular value.

B-Spline Surfaces The Cartesian product of B-spline blending functions in the form: Where are (n1 + 1) by (n2 + 1) control points