0% found this document useful (0 votes)
16 views6 pages

CG 4

Uploaded by

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

CG 4

Uploaded by

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

UNIT 4

Three Dimensional Concepts


The three-dimensional transformations are extensions of two-dimensional transformation.
In 2D two coordinates are used, i.e., x and y whereas in 3D three co-ordinates x, y, and z
are used.
For three dimensional images and objects, three-dimensional transformations are needed.
These are translations, scaling, and rotation. These are also called as basic transformations
are represented using matrix. More complex transformations are handled using matrix in
3D.
The 2D can show two-dimensional objects. Like the Bar chart, pie chart, graphs. But some
more natural objects can be represented using 3D. Using 3D, we can see different shapes
of the object in different sections.
In 3D when a translation is done we need three factors for rotation also, it is a component
of three rotations. Each can be performed along any three Cartesian axis. In 3D also we
can represent a sequence of transformations as a single matrix.

Computer Graphics uses CAD. CAD allows manipulation of machine components which
are 3 Dimensional. It also provides automobile bodies, aircraft parts study. All these
activities require realism. For realism 3D is required. In the production of a realistic 3D
scene from 2D is tough. It require three dimension, i.e., depth.

3D Geometry

Three dimension system has three axis x, y, z. The orientation of a 3D coordinate system
is of two types. Right-handed system and left-handed system. In the right -handed system
thumb of right- hand points to positive z-direction and left- hand system thumb point to
negative two directions. Following figure show right-hand orientation of the cube.

Using right-handed system co-ordinates of corners A, B, C, D of the cube


Point A x, y, z
Point B x, y, 0
Point C 0, y, 0
Point D 0, y, z
Producing realism in 3D: The three-dimensional objects are made using computer
graphics. The technique used for two Dimensional displays of three Dimensional objects
is called projection. Several types of projection are available, i.e.,
1. Parallel Projection
2. Perspective Projection
3. Orthographic Projection
1. Parallel Projection: In this projection point on the screen is identified within a point in
the three-dimensional object by a line perpendicular to the display screen. The architect
Drawing, i.e., plan, front view, side view, elevation are nothing but lines of parallel
projections.
2. Perspective Projection: This projection has a property that it provides idea about depth.
Farther the object from the viewer, smaller it will appear. All lines in perspective projection
converge at a center point called as the center of projection.
3. Orthographic Projection: It is simplest kind of projection. In this, we take a top,
bottom, side view of the object by extracting parallel lines from the object.
Three Dimensional Models
The techniques for generating different images of a solid object depend upon the type of
object. Two viewing techniques are available for viewing three-dimensional objects.
1. Geometry: It is concerned with measurements. Measurement is the location of a
point concerning origin or dimension of an object.
2. Topological Information: It is used for the structure of a solid object. It is mainly
concerned with the formation of polygons with the help of points of objects or the
creation of the object with polygons.

Polygon Surfaces

Objects are represented as a collection of surfaces. 3D object representation is divided


into two categories.
• Boundary Representations B−repsB−reps − It describes a 3D object as a set of
surfaces that separates the object interior from the environment.
• Space–partitioning representations − It is used to describe interior properties, by
partitioning the spatial region containing an object into a set of small, non-
overlapping, contiguous solids usuallycubesusuallycubes.
• The most commonly used boundary representation for a 3D graphics object is a set
of surface polygons that enclose the object interior. Many graphics system use this
method. 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.
• The polygon surfaces are common in design and solid-modeling applications, since
their wireframe display can be done quickly to give general indication of surface
structure. Then realistic scenes are produced by interpolating shading patterns
across polygon surface to illuminate.

Sweep Representations
Sweep representations are used to construct 3D object from 2D shape that have some
kind of symmetry.
For example, a prism can be generated using a translational sweep and rotational
sweeps can be used to create curved surfaces like an ellipsoid or a torus.
In both cases, you start with a cross-section and generate more vertices by applying
the appropriate transformation.
More complex objects can be formed by using more complex transformations. Also,
we can define a path for a sweep that allows you to create more interesting shapes.
Translational sweep:
i. Define a shape as a polygon vertex table as shown in figure 33 (a).
ii. Define a sweep path as a sequence of translation vectors figure 33 (b).
iii. Translate the shape; continue building a vertex table figure 33 (c).
iv. Define a surface table figure 33 (d).
Rotational sweep:
i. Define a shape as a polygon vertex table as shown in figure 34 (a).
ii. Define a sweep path as a sequence of rotations.
iii. Rotate the shape; continue building a vertex table as shown in figure 34 (b).
iv. Define a surface table as shown in figure 34 (c).

Constructive Solid Geometry (CSG)


1. Definition

• Combine volume occupied by overlapping 3D objects using set boolean operations


• Each primitive is defined as a combination of half-spaces.
• Typical standard primitives are:
cone, cylinder, sphere, torus, block, closed spline surface, right angular wedge.
swept solids (a revolution or linear sweep of a planar face which may contain
holes.
• Operations are union, intersection and difference.
2. Implementation with ray casting

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 represent the
screen). The surface limits for the composite object are determnined bu the specified set
operation . This method can also be used for physical simulation.

Quadtrees
Definition
• Based on the divided-and-conquer principle, a quadtree is a data structure that
recursively subdivides a plane into 4 quadrants.
• The decision to subdivide is based on an attribute of the current quadrant. If the
quadrant is heterogeneous with respect to this attribute, further subdivision occurs.
If it is homogeneous, or we have reached the desired level of detail, we stop
subdividing.
We will apply quadtrees to storing planar polygons. Our attribute will be
whether current quadrant is filled by the interior of a polygon:
Octrees
• Octrees are based on the same principle, but divide regions of 3D space (usually
into cubes).
• The scene is subdivided at each step with three mutually perpendicular planes,
aligned with the Cartesian coordinate planes.
• Individual partitions of 3D space are called Voxels (Volume Elements).
• Applications: raycasting, shadowcasting.
Octrees, like Quadtrees, use a node structure to store the volume elements:

In this figure, the octree has been refined twice. First, the root is refined into eight cells,
each representing an octant of the root's domain. Then, one of the root's children is
refined yet again.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy