3D Object Representations
3D Object Representations
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.
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.
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
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
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)
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
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
Geometric
Continuity
An alternate method for joining two successive curve sections
Geometric
Continuity
• 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)