0% found this document useful (0 votes)
9 views72 pages

Unit 4 - CG

The document discusses three-dimensional concepts in computer graphics, focusing on 3D display methods, object representations, and rendering techniques. It covers various projection methods such as parallel and perspective projections, as well as depth cueing and surface rendering to enhance realism in 3D graphics. Additionally, it outlines different representations of 3D objects, including boundary representation and polygon surfaces, along with techniques like sweep representations and constructive solid geometry methods.

Uploaded by

Faimina Riyaz
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 views72 pages

Unit 4 - CG

The document discusses three-dimensional concepts in computer graphics, focusing on 3D display methods, object representations, and rendering techniques. It covers various projection methods such as parallel and perspective projections, as well as depth cueing and surface rendering to enhance realism in 3D graphics. Additionally, it outlines different representations of 3D objects, including boundary representation and polygon surfaces, along with techniques like sweep representations and constructive solid geometry methods.

Uploaded by

Faimina Riyaz
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/ 72

UNIT -4

Three Dimensional Concepts

COMPUTER GRAPHICS
Three Dimensional Concepts

 3D display methods
 3D object representations
3D SHAPES
2D SHAPES
Three-Dimensional Display
Methods

3D graphics deals with generating and display 3D objects in a 2D space(display
screen)

 To obtain a display of a three dimensional scene that has been modelled in world
coordinates, we must setup a coordinated reference for the camera

 This coordinate reference defines the position & orientation for the plane of the
camera film, which is the plane we want to use to display a view of the object in
the scene.

 Object descriptions are the transferred to the camera reference coordinate &
projected onto the selected display plane.

 The objects can be displayed in wire frame (outline), or we can apply lightining
and surface rendering techniques to shade the visible surfaces
 3D computer graphics are graphics that utilize a three
dimensional representation of geometric data that is stored in the
computer for the purposes of performing calculations and
rendering 2D images. Such images may be for later display or for
real-time viewing.
 3D display methods – different types of techniques

 Parallel Projection.

 Perspective Projection

 Depth Cueing
Parallel Projection
 A parallel projection is a projection of an object in three-dimensional space
onto a fixed plane, known as the projection plane or image plane, where the
rays, known as lines of sight or projection lines, are parallel to each other.

 We connect the projected vertices by line segments which correspond to


connections on the original object.

 A parallel projection preserves relative proportions of objects but does not


produce the realistic views.

 In parallel projection, z co-ordinate is discarded and parallel lines from each


vertex on the object are extended until they intersect the view plane.
Notes:
 Project points on 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.
 Parallel projection is further divided into two categories :

 a) Orthographic Projection

 b) Oblique Projection

 (a) Orthographic Projection :

It is a kind of parallel projection where the projecting lines emerge


parallelly from the object surface and incident perpendicularly at the
projecting plane.

 (b) Oblique Projection :

It is a kind of parallel projection where projecting rays emerges parallelly


from the surface of the polygon and incident at an angle other than 90
degrees on the plane.
Orthographic Projection
Oblique Projection
Perspective Projection
 The perspective projection, on the other hand, produces realistic views
but does not preserve relative proportions.

 In perspective projection, the lines of projection are not parallel. Instead ,


they all converge at a single point called the ‘center of projection’ or
‘projection reference point’.

 The perspective projection is perhaps the most common projection


technique familiar to us as image formed by eye or lenses of
photographic film on perspective projection.

 The lines of projection are not parallel


Projection Reference Point
 The distance and angles are not preserved and parallel lines do not
remain parallel. Instead, they all converge at a single point called the
center of projection or projection reference point.

 There are 3 types of perspective projections:

 One-point perspective projection is simple to draw

 Two-point perspective projection gives a better impression of depth

 Three-point perspective projection is the most difficult to draw


 The perspective projection conveys depth information by making
distance objects smaller than near one

 This is the way that our eyes and a camera lens form images and so
the displays are more realistic

 The disadvantage is that if the object has only limited variation, the
image may not provide adequate depth information and ambiguity
appears.
Differences between Parallel & Perspective Projection
Depth Cueing :
 Depth cueing is implemented by having objects blend into the background
color with increasing distance from the viewer.

 The range of distances over which this blending occurs is controlled by the
sliders.

 To create a realistic image, depth information is important so that we can


easily identify, for a particular viewing direction, which is the front and
which is the back of displayed objects.

 The depth of an object can be represented by the intensity of the image.

 The parts of the objects closest to the viewing position are displayed with
the highest intensities and objects farther away are displayed with
decreasing intensities. This effect is known as ‘depth cueing’.
 Note:

 To easily identify 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


higher intensities and lines farther away are displayed with lower
intensities.
Visible Line and Surface
Identification
 When we view a picture containing non-transparent objects and
surfaces, then we cannot see those objects from view which are
behind from objects closer to eye.

 We must remove these hidden surfaces to get a realistic screen


image.

 The identification and removal of these surfaces is called Hidden-


surface problem
Surface Rendering:
 Surface rendering involves setting the surface intensity of objects
according to the lighting conditions in the scene and according to
assigned surface characteristics.

 The lighting conditions specify the intensity and positions of light


sources and the general background illumination required for a scene.

 On the other hand the surface characteristics of objects specify the


degree of transparency and smoothness or roughness of the surface;
usually, the surface rendering methods are combined with perspective
and visible surface identification to generate a high degree of realism in
a displayed scene.
Set the 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
Three Dimensional Object
Representations
 Graphics scenes can contain many different kinds of objects and
material surfaces such as Trees, flowers, clouds, rocks, water, bricks,
wood paneling, rubber, paper, steel, glass, plastic, and cloth

 2D Object Representation – cannot access the proper view of an object,


only giving the front view

 3D Object Representation – make objects more clear externally &


internally, creating a proper view of any natural scene

 Objects are represented as a collection of surfaces


 3D solid object representations can be generally classified into two
broad categories

 1. Boundary Representation ( B-reps)

 It describes a three-dimensional object as a set of surfaces that


separate the object interior from the environment.

Examples are polygon facets and spline patches.

 2. Space Partitioning representation

 It describes the interior properties, by partitioning the spatial


region containing an object into a set of small, non-overlapping,
contiguous solids (usually cubes).

Eg: Octree Representation


3D Representations
 Polygon Surfaces

 Sweep Representation

 Constructive Solid Geometry Methods

 Octrees and Quadtrees


Polygon Surfaces

 The most commonly used representation for a 3D graphics object.

 It is a set of surface polygons that enclose the object interior.

 Set of adjacent polygons representing the object exteriors

 Set of polygons are stored for object description.

 This simplifies and speeds up the surface rendering and display of object since all surfaces
can be described with linear equations.
 3d Object Representation :
Polygon Surfaces
 Three ways to represent polygon surfaces
 1.Polygon Tables
 2.Plane Equations
 3.Polygon Meshes
Polygon Tables
 The polygon surface is specified with a set of vertex coordinates and associated attribute parameters.

 For each polygon input, the data are placed into tables that are to be used in the subsequent processing.

 Polygon data tables can be organized into two groups: Geometric tables and attribute tables.

 Geometric Tables

Contain vertex coordinates and parameters to identify the spatial orientation of the polygon surfaces.

 Attribute tables

Contain attribute information for an object such as parameters specifying the degree of transparency of the
object and its surface reflectivity and texture characteristics.
 The object is store by using three tables
1. Vertex Table
2. Edge Table
3. Polygon-surface table
Polygon Tables - Vertex Table

Vertex Table
 Coordinate values for each vertex in the object are stored inthis table.
 It store x, y, and z coordinate information of all the vertices as v1: x1, y1, z1.
Polygon Tables - Edge table
Edge table
 The Edge table is used to store the edge information of the polygon.
 In the following figure, edge E1 lies between vertex v1 and v2 which is represented in the table
as E1: v1, v2.
Polygon Tables - Polygon Surface
table
Polygon-Surface table
 Polygon surface table stores the number of surfaces present in the polygon.
 From the following figure, surface S1 is covered by edges E1, E2 and E3 which can be
represented in the polygon surface table as S1: E1, E2, and E3
 Listing the geometric data in three tables provides a convenient to the individual component
(vertices, edges and polygons) of each object.

 The object can be displayed efficiently by using data from the edge table to draw the
component lines.

 Extra information can be added to the data tables for faster information extraction. For
instance, edge table can be expanded to include forward points into the polygon table so that
common edges between polygons can be identified more rapidly.
 E1 : V1, V2, S1
 E2 : V2, V3, S1
 E3 : V3, V1, S1, S2
 E4 : V3, V4, S2
 E5 : V4, V5, S2
 E6 : V5, V1, S2
 This is useful for the rendering procedure that must vary surface shading smoothly
across the edges from one polygon to the next. Similarly, the vertex table can be
expanded so that vertices are cross-referenced to corresponding edges.

 Additional geometric information that is stored in the data tables includes the slope
for each edge and the coordinate extends for each polygon. As vertices are input,
we can calculate edge slopes and we can scan the coordinate values to identify the
minimum and maximum x, y and z values for individual polygons.

 The more information included in the data tables will be easier to check for errors.
 Some of the tests that could be performed by a graphics package are:

 1. That every vertex is listed as an endpoint for at least two edges.

 2. That every edge is part of at least one polygon.

 3. That every polygon is closed.

 4. That each polygon has at least one shared edge.

 5. That if the edge table contains pointers to polygons, every edge referenced by a
polygon pointer has a reciprocal pointer back to the polygon.
Sweep Representations
 Used to construct 3D objects from 2D shape
 Sweep representations are useful for constructing 3D objects that
possess transitional, rotational, or other symmetries.
 Objects are specified as 2D shape and a sweep that moves that shape
through a region of space.
 Sweep representations are useful for both surface modeling and solid
modeling
 Two ways to achieve sweep:
1. Translational Sweep
2. Rotational Sweep
Solid modeling Surface modeling
 Solid-modeling packages often provide a number of construction techniques

 Sweep representations are useful for constructing three-dimensional objects that


possess translational, rotational, or other symmetries

 We can represent such objects by specifying a two dimensional shape and a sweep
that moves the shape through a region of space

 A set of two-dimensional primitives, such as circles and rectangles, can be provided for
sweep representations as menu options

 Other methods for obtaining two-dimensional figures include closed spline curve
constructions and cross-sectional slices of solid objects.
1. Translational Sweep

 In translational sweeps, the 2D shape is swept along a linear path normal to the
plane of the area to construct three-dimensional object.

 To obtain the wireframe representation we have to replicate the 2D shape and


draw a set of connecting lines in the direction of the shape
2. Rotational Sweep

 In rotational sweeps, the 2D shape is rotated about an a axis of rotation specified


in the plane of 2D shape to produce three dimensional object
 Figure below illustrates a translational sweep. The periodic spline curve in Figure (a)
defines the object cross section.

1. We then perform a translational sweep by moving the control point’s p, through p3 a set
distance along a straight line path perpendicular to the plane of the cross section.

2. At intervals along this path, we replicate the cross-sectional shape and draw a set of
connecting lines in the direction of the sweep to obtain the wireframe representation
shown in Fig (b).

3. An example of object design using a rotational sweep is given in Figure below this time,
the periodic spline cross section is rotated about an axis of rotation specified in the
plane of the cross section to produce the wireframe representation shown in Fig (b).
 An example of object design using a rotational sweep is given in Figure

 This time, the periodic spline cross section is rotated about an axis of rotation
specified in the plane of the cross-section to produce the wireframe representation
shown in Fig (b).

 Any axis can be chosen for a rotational sweep

 If we use a rotation axis perpendicular to the plane of the spline cross-section in Fig.
(a), we generate a two-dimensional shape.

 But if the cross section shown in this figure has depth, then we are using one three-
dimensional object to generate another
 In general we can specify sweep constructions using any path

 For translation we can vary the shape or size of the original 2D shape along the sweep path

 For rotational sweeps, we can move along a circular path through any angular distance from
0° to 360°

 These sweeps whose generating area or volume changes in size, shape or orientation as
they are swept and that follow an arbitrary curved trajectory are called general sweeps

 General sweeps are difficult to model efficiently for example, the trajectory and object
shape may make the swept object intersect itself, making volume calculations complicated

 Further more, general sweeps do not always generate solids. For example, sweeping a 2D
shape in its own plane generates another 2D shape.
Constructive Solid Geometry Methods
 Objects are represented as a combination of simpler solid objects
(primitives)

 This modeling technique combines the volumes occupied by overlapping 3D


shapes using set boolean operations.
This creates a new volume by applying the union, intersection, or difference
operation to two volumes.

 Typical standard primitives are:


cone, cylinder, sphere, torus, block, closed spline surface, right angular
wedge.
Ray Casting
 It is typically used to implement CSG operators when objects are
described with boundary representations

 Ray casting is applied by determining the objects that are


intersected by a set of parallel lines emanating from the xy plane
along the z axis

 The xy plane is referred to as the firing plane

 Ray Casting is often used to implement CSG operation when objects are described
with boundary representation.

 We fire a ray from the plane xy (which represents the screen). The surface limits for
the composite object are determined by the specified set operation
Octrees and Quadtrees
Octree

 An octree is defined as a tree data structure in which each internal


node is associated with exactly eight children.

 Octrees are most often implemented to partition a 3-dimensional


space by recursively subdividing it into eight octants.

 Octrees are treated as the 3-dimensional analog of quadtrees. The


name is created from oct + tree, but note that it is normally written
"octree" with only one "t".

 Octrees are often implemented in 3D graphics and 3D game


engines.
 For spatial representation

 Each node in an octree is responsible to subdivide the space it


represents into eight octants. In a point region (PR)

 octree, the node stores an explicit 3-dimensional point, which is the


"center" of the subdivision for that node; the point

 specifies one of the corners for each of the eight children. In case
of a matrix based (MX) octree, the subdivision point is implicitly the
center of the space represented by the node. The root node of a PR
octree can be able to represent infinite space; the root node of an
MX octree must be able to represent a finite bounded space so that
the implicit centers are well-defined.
Thank You

You might also like