0% found this document useful (0 votes)
9 views

3D Object Representations

The document outlines various methods for 3D object representation in computer graphics, focusing on polygon representation, spline curves, and quadric surfaces. It discusses the importance of mathematical equations for polygons, the use of polygon tables for storing object information, and the classification of solid object representations into boundary and space partitioning methods. Additionally, it covers advanced topics like blobby objects, superquadric shapes, and spline curves, emphasizing their applications in modeling and rendering.

Uploaded by

Naveena Karthik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

3D Object Representations

The document outlines various methods for 3D object representation in computer graphics, focusing on polygon representation, spline curves, and quadric surfaces. It discusses the importance of mathematical equations for polygons, the use of polygon tables for storing object information, and the classification of solid object representations into boundary and space partitioning methods. Additionally, it covers advanced topics like blobby objects, superquadric shapes, and spline curves, emphasizing their applications in modeling and rendering.

Uploaded by

Naveena Karthik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 106

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

COURSE CODE: 22CS401

COURSE TITLE : COMPUTER GRAPHICS AND MULTIMEDIA

1
3D OBJECT REPRESENTATION

2
Learning Objective
To Study of different representation of
polygon
Formation of rigid object
Formation of natural scene.

3
Introduction :
In this unit, we will study the polygon
representation methods – these methods
are quite important because it’s the polygon
that constitutes every closed object like
tree, clouds, ball, car, etc., to be
represented through graphics.

Further, each polygon has its own


mathematical equation which works as
the generating function for that polygon.

4
It’s the Bezier curves which have
revolutionized the field of computer graphics
and opened a new arena, i.e., automobile
sector, for analysis and designing of
automobiles.

In this unit, we will deal with fitting curves to


the digitized data.

Two techniques are available for obtaining such


curves cubic
spline and
parabolicaly blended curves.
5
1.1 3D display methods,
 Polygon and quadric surfaces provide precise description
for simple Euclidean objects like polyhedrons, ellipsoids.
 Spline surfaces and construction techniques are useful for
designing aircraft wings, gears, and other engineering
structures with curved surfaces
 Procedural methods such as fractals constructions and
particle systems give us accurate representations for the
natural objects like clouds, trees etc.
 Physically based modeling methods using systems for
interacting forces can be used to describe the non-rigid
behaviors of piece of jelly, or a piece of cloth.
 Octrees encoding are used to represent internal features of
the objects, such as those obtained from medical CT
images, volume renderings and other visualization
techniques.

6
The representational schemes of solid
objects are divided into two broad
categories:
Boundary representations: Here the 3D
object is represented as a set of surfaces
that separate the object interior from
the environment. Examples are polygonal
facets and spline patches. For better
understanding consider Figure 1.

Figure 1
7
Space partitioning representations:
These are used to describe the interior
properties, by partitioning the spatial
regions containing an object into a set of
small non-overlapping contiguous solids
(usually cubes).
 Example: Octree (which is the space
partitioning description of 3D object). For a
better understanding consider Figure 2.

8
1.1.1 Polygon Surfaces

It is possible to store object’s description


as a set of surface polygons and the
same is actually done by many graphic
systems, actually this way of object
description fastens the rendering and
display of object surfaces.
 The approach is beneficial because all the
surfaces can now be described with linear
equations and hence polygonal description
of the surfaces is referred as “standard
graphic objects”.

9
Consider Figure 3 where the cylindrical surface is
represented as a mesh of polygons. The
representation is known as wire frame
representation which can quickly describe the
surface structure.
On the basis of the structure a realistic
rendering can be performed by interpolating
the shading patterns across the polygon
surfaces.
Thus polygon mesh representation of the curved
surface is actually dividing a curved surface into
polygon facets.
This improves and simplifies the process of
rendering (transforming a 3D scene to 2D scene
with least loss of information like height, depth
etc).
10
Now the objects are composed of
standard graphic objects (polygon
surfaces).
Each graphic object needs some method
for its description which could be a
polygon table or equation etc.

11
1.1.2 Polygon Tables
Every polygon is analogous to a graph
G(V,E).
So we can say that a polygon surface can
be specified with as a set of vertex
coordinates and associated attribute
parameters (the attributes may be color,
contrast, shading, etc).
Most systems use tables to store the
information entered for each polygon, and
it’s the data in these tables which is then
used for subsequent processing, display
and manipulation of the objects in the
12
scene.
Polygon data tables can be organized into
two groups:
Attribute tables: This table holds object
information like transparency, surface
reflexivity, texture characteristics, etc.,
of an object in the scene.
• Geometric tables: This table stores the
information of vertex coordinates and
parameters like slope for each edge,
etc. To identify the spatial orientation of
polygon surface.
In order to store geometric information
of a polygon properly, this table is further
bifurcated into three more tables:
13
In order to store geometric information of a
polygon properly, this table is further
bifurcated into three more tables:
a) Vertex table: Holds coordinate values of
vertices in the object.
b) Edge table: Holds pointers back in to the
vertex table for identification of the
vertices related to each polygon edge.
c) Polygon table or polygon surface
table: Holds pointers back into the edge
table for identification of the edges related
to the polygon surface under construction.

14
15
Some basic tests that should be performed
before producing a polygon surface by any
graphic package:
1) every vertex is listed as an endpoint for at
least two edges,
2) every edge is part of at least one polygon,
3) every polygon is closed,
4) each polygon has at least one shared
edge,
5) if the edge table contains pointer to
polygons, every edge referenced by a
polygon pointer to polygon, every edge
referenced by a polygon pointer has a
16 reciprocal pointer back to polygon.
V1

Polygon Tables
Vertex Table
E1 E3 E6
Edge Table
Surface Table V3 V5
V2 E2
E4 E5

V4
VERTEX TABLE EDGE TABLE POLYGON-SURFACE
TABLE
V1 x1,y1,z1 E1 V1,V2
V2 x2,y2,z2 E2 V2,V3 S1 E1,E2,E3

V3 x3,y3,z3 E3 V3,V1 S2 E3,E4,E5,E6

V4 x4,y4,z4 E4 V3,V4
V5 x5,y5,z5 E5 V4,V5
E6 V5,V1
17
1.1.3 Plane Equation
 Plane is a polygonal surface, which bisects its
environment into two halves. One is referred to as
forward and the other as backward half of any plane.
Now the question is, which half is forward and which
backward, because both are relative terms.
 So we consider any point on the plane should satisfy
the equation of a plane to be zero, i.e., Ax + By + Cz +
D=0.
 This equation means any point (x,y,z) will only lie on
the plane if it satisfies the equation to be zero any
point (x,y,z) will lie on the front of the plane if it
satisfies the equation to be greater than zero, and
any point (x,y,z) will lie on the back of the plane if it
satisfies the equation to be less than zero.

18
Plane Equations
Ax+By+Cz+D=0 where x,y,z is any point
on a plane
Three noncollinear points can determine
A,B,C,D
1 y z
Select (x1,y1,z1),(x2,y2x,z2),(x
1 1 1 z
3,y3,z3)
1 1
x y
1 1
1
A 1 y z 2 B x 1 z
2
2
C x y
2 2 2
1
1 y z 3 3x 1 z 3 3
x y
3 3
1
x 1
y 1
z 1

D  x 2
y 2
z 2

x 3
y 3
z 3
19
Plane Equations
A=y1(z2-z3)+y2(z3-z1)+y3(z1-z2)
B=z1(x2-x3)+z2(x3-x1)+z3(x1-x2)
C=x1(y2-y3)+x2(y3-y1)+x3(y1-y2)
D= -x1(y2z3-y3z2)-x2(y3z1-y1z3)-x3(y1z2-y2z1)

As vertex values and other information are


entered into the polygon data structure,
values for A, B,C and D are computed for
each polygon and then can be stored with
other polygon data.

20
1.1.4 Polygon Meshes
Construct the object from triangles or
quadrilaterals by tiling
Most models are constructed this way
Easy to work with
Easy to render
Rates about 300 million triangles/sec
available with ordinary graphics cards for
PC computers

21
Polygon Meshes -triangular meshes-
Free form/Boolean disadvantages:
complexity of description & algorithms
Representing a model as closed triangular
mesh is EASY – Operations & Description
format very simple
Base representation for scanned data
Most popular web representation

22
Curves and
Surfaces
Curves and
Surfaces
•Displays of three dimensional
curved lines and surfaces can be
generated from an input set of
mathematical functions defining the
objects or from a set of users
specified data points.
• When functions are specified, a
package can project the defining
equations for a curve to the display plane
and plot pixel positions along the
path of the projected function.
Quadric
surfaces

• A frequently used class of objects are the quadric surfaces, which are
described with second-degree equations (quadratics).
• They include
1. Spheres,
2. Ellipsoids,
3. Paraboloids,
4. Hyperboloids etc.
Quadric
surfaces
Sphe
re
• In Cartesian coordinates, a spherical surface with radius r centered on
the coordinate origin is defined as the set of points (x, y, z) that satisfy
the equation
Sphere in parametric
form

• We can also describe the


spherical surface in parametric
form, using latitude and
longitude angles.
Sphere in parametric
form
Ellipso
id
• An ellipsoidal surface can be described as an extension of a spherical
surface, where the radii in three mutually perpendicular directions
can have different values.
Ellipso
id
• The Cartesian representation for points over the surface of
an ellipsoid centered on the origin is
Ellipsoid - Parametric
representation
Superquad
rics
Superquad
rics
• Superquadrics are formed by incorporating additional
into the quadric equations to provide increased flexibility
parameters
adjusting
for object shapes.
• The number of additional parameters used is equal to the dimension
of the object: one parameter for curves and two parameters for
surfaces.
Superquad
rics
1. Superellipse
2. Superellipsoid
Superelli
pse
superelli
pse
• We obtain a Cartesian representation for a superellipse from the
corresponding equation for an ellipse by allowing the exponent on
the x and y terms to be variable.
Superellipse – In
parametric form
Superelli
pse
Superellips
oids
Superellips
oids
Superellips
oids
• Figure 10-13 illustrates supersphere shapes that can be generated
using various values for parameters s, and s2.
• These and other superquadric shapes can be combined to create
more complex structures, such as furniture, threaded bolts, and other
hardware
Superellips
oids
Blobby
objects
Blobby
objects
Blobby
objects
• Some objects do not maintain a fixed shape
• They change their surface characteristics in certain motions
• These objects are referred to as blobby objects, since their shapes
show a certain degree of fluidity
• Examples in this class of objects include
1. water droplets
2. melting objects
3. muscle shapes in the human body.
Blobby
objects
• Several models have been
developed for representing blobby
objects as distribution functions
over a region of space.
• Combinations of Gaussian density
functions, or "bumps“ (Fig 10.16)
Blobby
objects
•Several models have
been developed for
representing blobby
objects as distribution
functions over a
region of space.
•Combinations of
Gaussian density
functions, or "bumps“
(Fig 10.16)
Blobby
objects

• A surface function is then defined as


Blobby objects –
Metaballs
Blobby
objects
Blobby objects -
metaball
• The "metaball" model describes blobby objects as combinations of
quadratic density functions of the form
Spli
ne
•Drafting terminology
• Spline is a flexible strip that is easily flexed to pass through a series
of design points (control points) to produce a smooth curve.
•Spline curve – a piecewise polynomial (cubic) curve whose
first and second derivatives are continuous across the
various curve sections.
Spline
Representations
• A spline is a smooth curve
defined mathematically
using a set of constraints
• Splines have many uses:
• 2D illustration
• Fonts
• 3D Modelling
• Animation
Big
Idea
• User specifies control points
• Defines a smooth curve

Curv
e

Contr Contr
ol ol
Point Points
s
Interpolation Vs
Approximation
• A spline curve is specified using a
set of control points
• There are two ways to fit a curve to
these points:
• Interpolation - the curve passes
through all of the control
points
• Approximation - the
curve does not pass
through all of the control
points
• Approximation for
structure or shape
• Interpolation for
animation
Convex
Hulls
• The boundary formed by the set of control points for a spline is
known as a convex hull
• Think of an elastic band stretched around the control points
Control
Graphs
• A polyline connecting the control points in order is known as a
control graph
• Usually displayed to help designers keep track of their splines
Piecewise cubic
splines
Types of
Curves

• A curve is an infinitely large set of points. Each point has two


neighbors except endpoints. Curves can be broadly classified into
three categories −
• explicit, implicit, and parametric curves.
• Implicit Curves
Implicit
Curves

• Implicit curve representations define the set of points on a curve by


employing a procedure that can test to see if a point in on the curve.
• Usually, an implicit curve is defined by an implicit function of
the form −
• f(x, y) = 0
• Eg. A common example is the circle, whose implicit
representation is
• x2 + y2 - R2 = 0
Explicit
Curves

• A mathematical function y = f(x) can be plotted as a curve.


• Such a function is the explicit representation of the curve.
Parametric
curve
• The explicit and implicit curve representations can be used only when
the function is known.
• Curves having parametric form are called parametric curves.
• In practice the parametric curves are used.
• Every point on the curve is having two neighbors (other than the end
points).
Parametric
curve
• A two-dimensional parametric curve has the following form −
• P(t) = f(t), g(t) or P(t) = x(t), y(t)
• The functions f and g become the (x, y) coordinates of any point on
the curve, and the points are obtained when the parameter t (or u)
is varied over a certain interval [a, b], normally [0, 1].
Parametric Continuity
Conditions
• To ensure a smooth transition from one section of a piecewise
parametric curve to the next, we can impose various continuity
conditions at the connection points.
• If each section of a spline is described with a set of parametric
coordinate functions of the form
Parametric Continuity
Conditions
• Three types of continuity
1. Zero Order Continuity
2. First Order Continuity
3. Second Order Continuity
Zero Order
Continuity

• Two piece of curve must meet at transition point


• Segments have to match ‘nicely’.
• Given two segments P(u) and Q(v).
• We consider the transition of P(1) to Q(0).
• Zero-order parametric continuity
• C0: P(1) = Q(0).
• Endpoint of P(u) coincides with start point Q(v).
First Order
Continuity
• First parametric derivatives (tangent lines) of the coordinate functions
two successive curve sections are equal at their joining point.
• Segments have to match ‘nicely’.
• Given two segments P(u) and Q(v).
• We consider the transition of P(1) to Q(0).
• First order parametric continuity
• C1: dP(1)/du = dQ(0)/dv.

• Direction of P(1) coincides with direction of Q(0).


Second Order
Continuity

• Second-order parametric continuity, or C2 continuity, means that both


the first and second parametric derivatives of the two curve sections
are the same at the intersection.
• Given two segments P(u) and Q(v).
• We consider the transition of P(1) to Q(0).
• Second order parametric continuity
• C2: d2P(1)/du2 = d2Q(0)/dv2.
• Curvatures in P(1) and Q(0) are equal.
Geometric
Continuity
• It suffices to require that the directions are the same:
• geometric continuity.
Module 3 / Session – 1
T.Raghunathan AP/CSE

Geometric
Continuity
An alternate method for joining two successive curve sections
Geometric
Continuity

An alternate method for joining two successive curve sections


1. Zero Order Geometric Continuity
2. First Order Geometric Continuity
3. Second Order Geometric Continuity
Geometric
Continuity
1. Zero Order Geometric Continuity
• the two curves sections must have the same coordinate position at the
boundary point ( Same as zero order parametric continuity)
2. First Order Geometric Continuity
• the parametric first derivatives are proportional at the intersection of two
successive sections (In parametric continuity these are equal)
3. Second Order Geometric Continuity
• both the first and second order derivatives of the two curve sections
2.

are proportional at their boundary


Spline
Representation
• There are three equivalent methods for specifying a particular spline
representation:
• (1) We can state the set of boundary conditions that are imposed on
the spline;
• (2) we can state the matrix that characterizes the spline;
• (3) we can state the set of blending functions
boundary
conditions
• Boundary conditions for this curve might be set,
• for example, on the endpoint coordinates x(0) and x(l) and on the
parametric first derivatives at the endpoints x'(0) and x ' ( 1 ) .
• Boundary conditions are sufficient to determine the values of the
four coefficients ax, bx, cx, and dx.
boundary
conditions
Matrix
Form
• we can obtain the matrix that characterizes this spline curve by first
rewriting Eq as the matrix product
blending
functions
Bezier
curves
• Bezier curve is discovered by the French engineer Pierre Bézier.
• These curves can be generated under the control of other points.
Approximate tangents by using control points are used to generate
curve.
Bezier
curves
Bezier
curves
• The simplest Bézier curve is the straight line from the point P0 to P1.
• A quadratic Bezier curve is determined by three control points.
• A cubic Bezier curve is determined by four control points.
Properties of Bezier
curves
• They generally follow the shape of the control polygon, which consists
of the segments joining the control points.
• They always pass through the first and last control points.
• They are contained in the convex hull of their defining control points.
• The degree of the polynomial defining the curve segment is one less
that the number of defining polygon point. Therefore, for 4 control
points, the degree of the polynomial is 3, i.e. cubic polynomial.
• A Bezier curve generally follows the shape of the defining polygon.
Properties of Bezier
curves
• The direction of the tangent vector at the end points is same as that of the
vector determined by first and last segments.
• The convex hull property for a Bezier curve ensures that the polynomial
smoothly follows the control points.
• No straight line intersects a Bezier curve more times than it intersects its
control polygon.
• They are invariant under an affine transformation.
• Bezier curves exhibit global control means moving a control point alters the
shape of the whole curve.
• A given Bezier curve can be subdivided at a point t=t0 into two Bezier
segments which join together at the point corresponding to the parameter
value t=t0.
Bezier
curves
• Suppose we are given n + 1 control-point positions: pk = (xk, yk, zk),
with k varying from 0 to n.
• These coordinate points can be blended to produce the position
vector P(u), which describes the path of an approximating Bezier
polynomial function between P0 and Pn
Bezier
curves
Bezier
curves
Bezier curves Numericals and
derivation
Bezier curves and
surfaces
Bezier curves and
surfaces
Bezier curves and
surfaces
Bezier curves and
surfaces
Bezier curves and
surfaces
• 1)Given control points (10,100), (50, 100), (70,120) and (100, 150).
Calculate coordinates of any four points lying on the corresponding
Beizer curve.

• 2) Set up the equation of Beizer curve and roughly trace it for three
control points (1,1), (2,2) and (3,1).
(From CO-RCS603.4)

You might also like