The document covers 3D graphics and transformations, including methods like translation, rotation, scaling, reflection, and shearing using matrix representations. It explains the display of 3D objects on a 2D plane through techniques such as parallel and perspective projection, depth cueing, and surface rendering. Additionally, it discusses object representation, including boundary representations, polygon meshes, and spline representations, concluding with the specification of splines and Bezier curves for modeling complex shapes.
3D Transformations
Geometrictransformations and object modeling in 3D are
extended from 2D methods by including considerations for the
z coordinate.
Translation
A point is translated from position P=(x,y, z) to position
P’=(x’,y’, z’) with matrix operation
1 0 0
0 1 0
0 0 1
1 0 0 0 1 1
x
y
z
x t x
y t y
z t z
x
y
z
x x t
y y t
z z t
, ,x y z
, ,x y z
x
y
z
Scaling
The matrixexpression for the scaling transformation
of a position P = (x, y, z) relative to coordinate origin
can be written as
11000
000
000
000
1
'
'
'
z
y
x
s
s
s
z
y
x
z
y
x
x
y
z
x
y
z
z
'
'
'
.zz
.
.
s
syy
sxx
y
x
7.
The matrixrepresentation for an arbitrary fixed-point
(xf, yf, zf) can be expressed as:
1000
)1(00
)1(00
)1(00
),,(),,(),,(
fzz
fyy
fxx
fffzyxfff
zss
yss
xss
zyxTsssSzyxT
8.
Reflections
The matrixexpression for the reflection
transformation of a position P = (x, y, z) relative to xy
plane can be written as:
similarly, as reflections relative to yz plane and xz
plane, respectively.
9.
Shear
The matrixexpression for the shearing transformation
of a position P = (x, y, z)
Transformation in z axis
1000
0100
010
001
y
x
z
sh
sh
SH
10.
Transformation in yaxis
Transformation in x axis
1000
010
0010
001
z
x
y
sh
sh
SH
1000
010
001
0001
z
y
x
sh
sh
SH
11.
3D Display Methods
3D graphics deals with generating and displaying
three dimensional objects in a two-dimensional
space(eg: display screen).
In addition to color and brightness, a 3-D pixels adds
a depth property that indicates where the point lies on
the imaginary z-axis.
To generate realistic picture we have to first setup a
coordinate reference for camera. This co-ordinate
reference defines the position and orientation for the
plane of the camera.
12.
This planeused to
display a view of the
object
Object description
has to transfer to the
camera reference co-
ordinates and
projected onto the
selected display
plane.
13.
Parallel Projection
Project pointson the object surface along parallel
lines onto the display plane.
Parallel lines are still parallel after projection.
Used in engineering and architectural drawings.
Views maintain relative proportions of the object.
Top View Side View
Front View
14.
Perspective Projection
• Projectpoints to the display plane along converging
paths.
• This is the way that our eyes and a camera lens form
images and so the displays are more realistic.
• Parallel lines appear to converge to a distant point in
the background.
• Distant objects appear smaller than objects closer to
the viewing position.
15.
Depth Cueing
To easilyidentify the front and back of display objects.
Depth information can be included using various
methods.
A simple method to vary the intensity of objects
according to their distance from the viewing position.
Eg: lines closest to the viewing position are displayed
with the higher intensities and lines farther away are
displayed with lower intensities.
16.
Application :modelingthe effect of the atmosphere
on the pixel intensity of objects. More distant objects
appear dimmer to us than nearer objects due to light
scattering by dust particles, smoke etc.
17.
Visible line andsurface identification
• Highlight the visible lines or display them in different
color
• Display nonvisible lines as dashed lines
• Remove the nonvisible lines
18.
Surface rendering
• Setthe surface intensity of objects according to
Lighting conditions in the scene
Assigned surface characteristics
Lighting specifications include the intensity and
positions of light sources and the general background
illumination required for a scene.
Surface properties include
degree of transparency
and how rough or smooth
of the surfaces
19.
Exploded and CutawayViews
To maintain a hierarchical structures to include
internal details.
These views show the internal structure and
relationships of the object parts
20.
Stereoscopic Views
Todisplay objects using stereoscopic views
Stereoscopic devices present 2 views of scene
One for left eye.
Other for right eye.
These two views displayed on alternate refresh cycle
of a raster monitor
Then viewed through glasses that alternately darken
first one lens then the other in synchronized with the
monitor refresh cycle.
21.
3D Object Representation
Graphics scenes contain many different kinds of objects
and material surfaces
Trees, flowers, clouds, rocks, water, bricks, wood paneling,
rubber, paper, steel, glass, plastic and cloth
Polygon and Quadric surfaces: For simple Euclidean
objects eg: polyhedron and ellipsoid
Spline surfaces and construction: For curved surfaces
eg: aircraft wings , gears
Procedural methods – Fractals: For natural objects eg:
cloud, grass
Octree Encoding: For internal features of objects eg:CT
image
22.
Representation schemes categoriesinto 2
Boundary representation(B –reps)
A set of surfaces that separate the object interior from the
environment
Eg) Polygon facets, spline patches
Space-partitioning representation
Used to describe interior properties.
Partitioning the spatial region into a set of small, non
overlapping, contiguous solids (usually cubes)
Eg) octree representation
23.
Polygon Surfaces
Mostcommonly used boundary representation.
Polygon table
Specify a polygon surfaces using vertex coordinates and attribute parameter.
Polygon data table organized into 2 group.
1. Geometric data table: vertex coordinate and parameter to identify the spatial
orientation.
3 lists
Vertex table –coordinate values of each vertex.
Edge table - pointer back to vertex table to identify the vertices for polygon edge.
Polygon table- pointer back to edge table to identify the edges for each polygon
25.
2. Attribute table:Degree of transparency and surface
reflectivity etc.
Some consistency checks of the geometric data table:
Every vertex is listed as an endpoint for at least 2
edges.
Every edge is part of at least one polygon.
Every polygon is closed.
Each polygon has at least one shared edge.
26.
Plane Equation
Theequation for a plane surface expressed at the
form
Ax+By+Cz+D=0
We can obtain the values of A,B,C,D by solving 3
plane equations using the coordinate values for 3
noncollinear points in the plane(x1,y1, z1), (x2,y2, z2),
(x3,y3, z3).
3,2,1,1z)/()/()/( k kDCyDBxDA kk
28.
If we substituteany arbitrary point (x,y, z) into this
equation, then,
Ax + By + Cz + D ≠0 implies that the point (x,y,z) not on a
surface
Ax + By + Cz + D < 0 implies that the point (x,y,z) is inside the
surface.
Ax + By + Cz + D >0 implies that the point (x,y,z) is outside the
surface.
29.
Polygon Meshes
Objectsurfaces are tiled to specify the surface facets
with mesh function.
Triangle strip - Produce n-2 connected triangles ,for n
vertices
Quadrilateral mesh - Produce (n-1)×(m-1) quadrilateral for
n×m array of vertices.
Sphere
A sphericalsurface with radius r
centred on the origin is defined as the
set of points (x, y, z) that satisfy the
equation
This can also be done in parametric
form using latitude and longitude
angles
2222
rzyx
sin
sincos
coscos
rz
ry
rx
22
y axis
z axis
x axis
P ( x, y, z )
θ
φ
r
32.
Ellipsoid
An extensionof a spherical surface
Where the radii in three mutually perpendicular
directions ,have different values.
parametric form using latitude and longitude angles
1
222
zyx r
z
r
y
r
x
sin
sincos
coscos
z
y
x
rz
ry
rx
22
33.
Torus
Doughnut –shapedobject.
parametric form using latitude and longitude angles
1
2
2
22
zyx r
z
r
y
r
x
r
sin
sin)cos(
cos)cos(
z
y
x
rz
rry
rrx
34.
SuperQuadrics
A generalizationof quadric surfaces, formed by
including additional parameters into quadric
equations
Increased flexibility for adjusting object shapes.
Superellipse
1
/2/2
S
y
S
x r
y
r
x
35.
When s=1,get an ordinary ellipse
Parametric representation.
s
y
s
x
ry
rx
sin
cos
36.
Superellipsoid
For s1=s2=1,get an ordinary ellipsoid
Parametric representation.
1
1
12
21 /2
//2/2
S
z
SSS
y
S
x r
z
r
y
r
x
1
21
21
sin
sincos
coscos
s
z
ss
y
ss
x
rz
ry
rx
22
38.
Spline Representation
Splineis a flexible strip used to produce a smooth curve through a designed set of
points.
Spline mathematically describe with a piecewise cubic polynomial function whose
first and second derivative are continuous across the various curve section.
39.
A splinecurve is specified using a set of coordinate
position called control points , which indicates the
general shape of the curve.
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, that are fitted to the
general control-point path
40.
The splinecurve is defined, modified and manipulated
with operation on the control points.
The boundary formed by the set of control points for a
spline is known as a convex hull
41.
A polylineconnecting the control points is known as
a control graph.
Usually displayed to help designers keep track of
their splines.
42.
Parametric Continuity Condition
For the smooth transition from one section of a
piecewise parametric curve to the next, impose
continuity condition at the connection points.
Each section of a spline is described with parametric
coordinate functions
)(zz
)(
)(
21
u
uuuuyy
uxx
43.
Zero –order Parametriccontinuity (C0 )
Simply means that the curves meet. That is x,y and z evaluated
at u2 for the first curve section are equal to the values of x,y
and z evaluated at u1 for the next curve section.
First –order Parametric continuity (C1 )
The first parametric derivatives(tangent lines) of the
coordinate functions for two successive curve sections are
equal at their joining point.
Second –order Parametric continuity (C2 )
Both first and second parametric derivatives of the two curve
sections are the same at the intersection.
44.
Geometric Continuity Condition
In Geometric Continuity ,only require parametric derivatives
of the two sections to be proportional to each other at their
common boundary
Zero –order Geometric continuity (G0 )
Same as Zero –order parametric continuity. That is the two
curves sections must have the same coordinate position at the
boundary point.
First –order Geometric continuity (G1 )
The first parametric derivatives(tangent lines) of the
coordinate functions for two successive curve sections are
proportional at their joining point.
Second –order Geometric continuity (G2 )
Both first and second parametric derivatives of the two curve
sections are proportional at their boundary.
45.
Spline Specification
Threemethods for specifying a 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.
46.
Parametric cubicpolynomial representation for the x
coordinate of a spline section
Boundary condition set on the endpoint coordinates
x(0) and x(1) and on first parametric derivatives at
the endpoints x’(0) and x’(1).
10,)( 23
uducubuaux xxxx
47.
From theboundary condition, obtain the matrix that
characterizes the spline curve.
geomspline
geomspline
MMUux
MMC
CU
x
d
x
c
x
b
x
a
uuuux
)(
123)(
Bezier Curve andSurfaces
This spline approximation method developed by the
French engineer Pierre Bezier for use in the design of
Renault automobile bodies.
Easy to implement.
Available in CAD system, graphic package, drawing
and painting packages.
Bezier Curve
A Bezier curve can be fitted to any number of control
points.
Given n+1 control points position
pk=(xk, yk, zk) 0≤k≤n
50.
The coordinatepositions are blended to produce the
position vector P(u) which describes the path of the
Bezier polynomial function between p0 and pn
The Bezier blending functions BEZk,n(u) are the
Bernstein polynomials
n
k
nkk uuBEZpuP
0
, 10),()(
knk
nk uuknCuBEZ
)1(),()(,
51.
where parameters C(n,k)are the binomial coefficients
The individual curve coordinates can be given as
follows
)!(!
!
),(
knk
n
knC
n
k
nkk uBEZxux
0
, )()(
n
k
nkk uBEZzuz
0
, )()(
n
k
nkk uBEZyuy
0
, )()(
52.
Properties Of BezierCurves
Bezier Curve is a polynomial of degree one less than
the number of control points
53.
Bezier Curvesalways passes through the first and last
control points.
P(0) = p0
P(1) = pn
Bezier curves are tangent to their first and last edges of
control garph.
The curve lies within the convex hull as the Bezier
blending functions are all positive and sum to 1
1)(
0
,
n
k
nk uBEZ
54.
Design Techniques
ClosedBezier curves are
generated by specifying the
first and last control points at
same position.
Specifying multiple control
points at a single coordinate
position gives more weight
to that position.
55.
Cubic Bezier Curve
Cubic Bezier curves are generated with 4 control
points.
Cubic Bezier curves gives reasonable design flexibility
while avoiding the increased calculations needed with
higher order polynomials.
The blending functions when n = 3
3
3,3
2
3,2
2
3,1
3
3,0
)1(3
)1(3
)1(
uBEZ
uuBEZ
uuBEZ
uBEZ
56.
At u=0,BEZ0,3=1, and at u=1, BEZ3,3=1. thus, the
curve will always pass through control points P0 and
P3.
The functions BEZ1,3 and BEZ2,3, influence the shape
of the curve at intermediate values of parameter u.
The resulting curve tends toward points P1 and P3.
57.
Bezier Surface
Twosets of orthogonal Bezier curves are used to
design surface.
Pj,k specify the location of the control points.
n
k
nkmjkj
m
j
uBEZvBEZpvuP
0
,,,
0
)()(),(
58.
B-Spline Curves and
Surfaces
1.The degree of a B-spline polynomial can be set independently of
the number of control points.
2. B-splines allow local control over the shape of a spline curve
(or surface)
59.
The pointon the curve that corresponds to a knot is
referred to as a knot vector.
The knot vector divide a B-spline curve into curve
subinterval, each of which is defined on a knot span.
60.
Given n+ 1 control points P0, P1, ..., Pn
Knot vector U = { u0, u1, ..., un+d }
The B-spline curve defined by these control points
and knot vector
Pk is kth control point
Blending function Bk,d of degree d-1
n
k
nduuu
dk
B
k
puP
0
12,
maxmin
,)(
,
)(
61.
Blending functionsdefined with Cox-deBoox recursive form
)()()(
,0
,1
)(
1,1
1
1,
1
,
1
1,
uB
uu
uu
uB
u
uu
uB
otherwise
uuif
uB
dk
kdk
dk
dk
dk
k
dk
kk
k
62.
To change theshape of a B-spline curve,
modify one or more of these control
parameters:
1. The positions of control points
2. The positions of knots
3. The degree of the curve
63.
Uniform B-Spline
Thespacing between knot values is constant.
Non-uniform B-spline
Unequal spacing between the knot values.
Open uniform B-Spline
This B-Spline is across between Uniform B-Spline and
non-uniform B-Spline.
The knot spacing is uniform expect at the ends where
knot values are repeated d times
Sweep Representations
Sweeprepresentations are useful for constructing 3
dimensional objects that possess translational,
rotational or other symmetries.
Objects are specified as a 2 dimensional shape and a
sweep that moves that shape through a region of
space
67.
Octrees
Octrees arehierarchical tree structures used to
represent solid objects.
Octrees are particularly useful in applications that
require cross sectional views – for example medical
applications.
68.
Octrees & Quadtrees
Octrees are based on a two-dimensional
representation scheme called quadtree encoding.
Quadtree encoding divides a square region of space
into four equal areas until homogeneous regions are
found.
These regions can then be arranged in a tree
An octreetakes the same approach as quadtrees, but
divides a cube region of 3D space into octants.
Each region within an octree is referred to as a
volume element or voxel.
Division is continued until homogeneous regions are
discovered