KEMBAR78
CGZS Unit 1-1 | PDF | Computer Graphics | Cartesian Coordinate System
0% found this document useful (0 votes)
40 views24 pages

CGZS Unit 1-1

The document provides a comprehensive overview of computer graphics, covering its definition, applications, and key components of graphics workstations, including video display devices and graphics software. It details algorithms for line and circle drawing, transformations, and viewing and clipping techniques in both two and three dimensions. Additionally, it introduces visible-surface detection methods and projection concepts, emphasizing the importance of graphics in various fields such as entertainment, education, and design.

Uploaded by

Barbara Duplessi
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)
40 views24 pages

CGZS Unit 1-1

The document provides a comprehensive overview of computer graphics, covering its definition, applications, and key components of graphics workstations, including video display devices and graphics software. It details algorithms for line and circle drawing, transformations, and viewing and clipping techniques in both two and three dimensions. Additionally, it introduces visible-surface detection methods and projection concepts, emphasizing the importance of graphics in various fields such as entertainment, education, and design.

Uploaded by

Barbara Duplessi
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/ 24

351 GM 19 Computer Graphics

Unit I Overview of Computer Graphics:


Definition and applications of computer graphics, Elements of graphics workstation, Video
Display Devices - Bit-Mapped Graphics and Vector Graphics, working of CRT, Raster
scanning and random scanning, Beam penetration CRT, Shadow mask CRT, Flat-panel
displays (Introduction Only), Graphics Software, Co-ordinate representations, Graphics
Functions.
Unit II Line and circle Drawing:
DDA line drawing algorithm, Bresenham’s Line algorithm, Circle and elipse generating
algorithms- Midpoint Circle Algorithm, Midpoint Elipse Algorithm, Polynomials and spline
curves, Filling-Filed - Area Primitives, Scan-Line Polygon File Algorithm, Inside-Outside
Tests, Scan-Line File of Curved Boundary Areas, Boundary-File Algorithm, Flood-File
Algorithm
Unit III Transformations:
Attributes of Output Primitives, Line Attributes - Line Type, Line Width, Pen and Brush
Options, Line Color, Color and Grayscale levels- Color Tables, Grayscale, Area - Fil Attributes
- Fil Styles, Pattern Fil, Soft Fil, Character Attributes, Text Attributes Geometric
Transformations: Matrices, 2D transformations, Homogeneous representations - other
transformation - Two-Dimensional Viewing, The viewing pipeline, Viewing Coordinate
Reference Frame, Window-to-viewport Coordinate Transformation, Two-Dimensional
Viewing Functions, Clipping Operations - Point Clipping, Line Clipping, Cohen-Sutherland
Line Clipping, Polygon Clipping, Sutherland-Hodgeman Polygon Clipping.
Unit IV Two & three Dimensional Viewing and Clipping:
Interior and Exterior Clipping, Point Clipping, Line Clipping - Cohen-Sutherland Line
Clipping, Mid-Point subdivision algorithm, Sutherland-Hogeman Polygon Clipping
Algorithm, Text Clipping. Three Dimensional Concepts: Three Dimensional Display Methods
- Paralllel Projection, Perspective Projection, Visible Line and surface Identification, Surface
Rendering, Three Dimensional Object Representations - 3D transformations - Bezier Curves
and surfaces.
Unit V Visible-Surface Detection Methods and Projection (Introduction
Only):
Visibility, Image and object precision, Z-Buffer Algorithm, A-Buffer Algorithm, Scan-Line
Algorithm. Projection (Introduction Only): Perspective projection - one point, two point and
three point, Parallel projection - Orthographic, Axonometric and Oblique. Perspective
anomalies - Computer Animations, Design of Animation Sequences, General Computer -
Animation Functions - Raster Animations, Key-Frame Systems, Morphing, Motion
Specifications.

1
Unit I Overview of Computer Graphics
Definition and applications of computer graphics, Elements of graphics workstation, Video
Display Devices - Bit-Mapped Graphics and Vector Graphics, working of CRT, Raster
scanning and random scanning, Beam penetration CRT, Shadow mask CRT, Flat-panel
displays (Introduction Only), Graphics Software, Co-ordinate representations, Graphics
Functions.
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = =
Definition of Computer Graphics
• The term ‘Computer Graphics’ was coined by Verne Hudson and William Fetter from
Boeing who were pioneers in the field.
• It is an art of drawing pictures, lines, chart etc on computer screen by using
programming languages.
• The creation, manipulation and the representation of the visual image or the data in a
graphical manner using computer.
• Various technology is required for the creation and manipulation.
• In computer graphics objects are presented as a collection of discrete picture elements
(pixels).
Applications of computer graphics
Entertainment: Motion pictures, Music videos, and TV shows, Computer games.

2
Computer Art
• Painting packages are available. With cordless, pressure-sensitive stylus, artists can
produce electronic paintings which simulate different brush strokes, brush widths, and
colors.
• Photorealistic techniques, morphing and animations are very useful in commercial
art.
• For films, 24 frames per second are required. For video monitor, 30 frames per second
are required.

3
Morphing

Simulation: Training simulations for pilots, medical procedures, etc.

4
Education and Training: Training with computer-generated models of specialized systems
such as the training of ship captains and aircraft pilots.
Visualization
For analysing scientific, engineering, medical and business data or behaviour. Converting data
to visual form can help to understand mass volume of data very efficiently.
Image Processing
Image processing is to apply techniques to modify or interpret existing pictures. It is
widely used in medical applications.

Graphical User Interface


Multiple window, icons, menus allow a computer setup to be utilized more efficiently.
Computer-Aided Design (CAD)

5
• Design of buildings, automobiles, aircraft, watercraft, spacecraft, computers, textiles,
etc.
• Objects maybe displayed in a wireframe outline form. Multi-window environment is
also favoured for producing various zooming scales and views.
• Animations are useful for testing performance.

Fig 1. Color-coded wireframe display for an automobile wheel assembly.


Presentation Graphics
To produce illustrations which summarize various kinds of data. Except 2D, 3D graphics
are good tools for reporting more complex data.

= = = = = = = = = = = = = = = == = = = = = = = = = == = = = == = = = = = == = = = == =

Elements of Graphics Workstation


A graphics workstation is a specialized computer system designed for tasks related to computer
graphics, such as 3D modeling, rendering, animation, and image processing. The key elements
of graphics workstation are:

6
Graphics Processing Unit (GPU): The GPU is a critical component responsible for rendering
graphics and performing complex mathematical calculations required for tasks like 3D
rendering and simulations.
Central Processing Unit (CPU): CPU plays a role in overall system performance. It is used
to handle general computing tasks and support the parallel processing capabilities of GPUs.
Memory (RAM): Adequate RAM is crucial for handling large datasets, complex 3D models,
and high-resolution textures. storage is essential for storing large graphics files, project data,
and applications. Solid-state drives (SSDs) are commonly used to provide quick access to data,
reducing loading times for graphics applications.
Display System: Graphics workstations are equipped with high-quality displays capable of
rendering accurate and detailed images. Multiple monitors may be used to enhance
productivity, allowing for efficient multitasking and the simultaneous display of multiple
project components.
Input Devices: Specialized input devices are often used in graphics workstations, such as
graphics tablets or stylus-based input devices. These tools provide precision and control for
tasks like digital drawing, painting, and 3D modeling.
Professional Graphics Software: Graphics workstations are equipped with industry-standard
graphics software tailored for tasks like 3D modeling, animation, rendering, and image
processing. Examples include Autodesk Maya, Adobe Creative Suite, and Cinema 4D.
Specialized Hardware Accelerators: In some cases, graphics workstations may include
additional hardware accelerators for specific tasks. For example, dedicated hardware for real-
time ray tracing or AI-based features can enhance performance in certain graphics applications.
Peripheral Connectivity: Graphics workstations typically provide a variety of ports for
connecting external devices, such as external storage, peripherals, and additional displays.
= = = = = = = = = = = = = = = == = = = = = = = = = == = = = == = = = = = == = = = == =

Video Display Devices:


There are two main types of video display devices
1. Bit-Mapped Graphics
2. Vector Graphics.
Bit-Mapped Graphics: Uses a grid of pixels, each representing a color or shade. A bitmap
(also called "raster") graphic is created from rows of different colored pixels that together form
an image. In their simplest form, bitmaps have only two colors, with each pixel being either
black or white. With increasing complexity, an image can include more colors; photograph-
quality images may have millions. Examples of bitmap graphic formats include GIF, JPEG,
PNG, TIFF, XBM, BMP, and PCX as well as bitmap (i.e., screen) fonts. The image displayed
on a computer monitor is also a bitmap, as are the outputs of printers, scanners, and similar
devices. They are created using paint programs like Adobe Photoshop.

7
Vector Graphics: Uses mathematical equations to define shapes and lines. A vector image or
graphic is defined and created on a plane by connecting lines and curves. It uses mathematical
equations to form shapes. It creates a finer and more detailed image. You can see clear lines,
points, and curve when you zoom in on the image. Vector graphics are used by all types of
artists, design experts, and creative professionals. It makes creating illustrations, logos, and
other types of designs for printing on big objects easy. You would have heard or observed many
graphic designers talking about converting the images to vectors before printing. Common
vector file types are .ai, .eps, .pdf, svg, sketch and the editors used are often - Adobe Illustrator
or Sketch. Images that need to be scaled to different sizes, vector graphics are used to achieve
those results.
Working of CRT (Cathode Ray Tube):
• The primary output device in a graphics system is a video monitor. The operation of
most video monitors was based on the standard cathode-ray tube (CRT) design.
• In recent years, flat-panel displays have become more popular due to their reduced
power consumption and thinner designs.
• The basic operation of a CRT is explained below:
• A beam of electrons i.e negatively charged electrons (cathode rays) emitted by an
electron gun, passes through focusing and deflection systems that direct the beam
toward specified positions on the phosphor coated screen. Fig.1.

Fig 1 Basic design of a magnetic-deflection CRT.

8
• The phosphor then emits a small spot of light at each position contacted by the electron
beam.
• Because the light emitted by the phosphor fades very rapidly, some method is needed for
maintaining the screen picture.
• One way to keep the phosphor glowing is to redraw the picture repeatedly by quickly
directing the electron beam back over the same points. This type of display is called a
refresh CRT.
• The primary components of an electron gun in a CRT are the heated metal cathode and a
control grid (Fig. 2).

Fig 2 Operation of an electron gun with an accelerating anode


• Heat is supplied to the cathode by directing a current through a coil of wire, called the
filament, inside the cylindrical cathode structure.
• This causes electrons to be “boiled off” the hot cathode surface.
• In the vacuum inside the CRT envelope, the free, negatively charged electrons are then
accelerated toward the phosphor coating by a high positive voltage.
• The accelerating voltage can be generated with a positively charged metal coating on the
inside of the CRT envelope near the phosphor screen, or an accelerating anode can be used,
as in Fig.3.

9
Fig 3 Electrostatic deflection of the electron beam in a CRT.

• Control Grid controls the flow of negatively charged electrons.


• Focusing system is used to create clear picture by focusing the flow of electrons into a
narrow beam. Focusing is accomplished with either electric or magnetic fields.
• The amount of light emitted by the phosphor coating depends on the number of electrons
striking the screen, The focusing system in a CRT is needed to force the electron beam to
converge into a small spot as it strikes the phosphor. Otherwise, the electrons would repel
each other, and the beam would spread out as it approaches the screen.
• The distance that the electron beam must travel to different points on the screen varies
because the radius of curvature for most CRTs is greater than the distance from the focusing
system to the screen center. Therefore, the electron beam will be focused properly only at
the center to the screen.
• As the beam moves to the outer edges of the screen, displayed images become blurred.
• To compensate for this, the system can adjust the focusing according to the screen position
of the beam. As with focusing, deflection of the electron beam can be controlled either
with electric fields or with magnetic fields.
• Deflection system controls the direction of electron beam by using electric or magnetic
field. Suppose it is working on electric field, the two plates are parallel plate and used for
horizontal plate and vertical plate.
• Suppose it is working on magnetic field, two pair of coils are used.
• Horizontal deflection is accomplished with one pair of coils, and vertical deflection by the
other pair. The proper deflection amounts are attained by adjusting the current through the
coils.

10
• Electrostatic deflection has two pairs of parallel plates are mounted inside the CRT
envelope. One pair coil plates is mounted horizontally to control the vertical deflection,
and the other pair is mounted vertically to control horizontal deflection (Fig. 3).
• Phosphor coated screen, inside surface of CRT is coated with phosphorus.
• Phosphorous glows when highly energy electron beam hits the screen. (Left to Right,
Up-and Down). i.e When the electrons in the beam collide with the phosphor coating.
• Spots of light are produced on the screen by the transfer of the CRT beam energy to the
phosphor.
• The frequency (or color) of the light emitted by the phosphor is proportional to the
energy difference between the excited quantum state and the ground state. Different kinds
of phosphors are available for use in a CRT.
• Persistence: How long emitted light continues after the CRT beam is removed.
✓ Lower persistence phosphors require higher refresh rates to maintain a picture on the
screen without flicker. It is useful for animation.
✓ High-persistence phosphor is useful for displaying highly complex, static pictures.
Typically, persistence ranges from 10 to 60 microseconds in graphics monitors.
• Resolution: The maximum number of points that can be displayed without overlap on
a CRT is referred to as the resolution.
• Resolution is the number of points per centimeter that can be plotted horizontally and
vertically.
• High-resolution displays are capable of showing more detail, making them ideal for
tasks that require precision, such as graphic design, video editing, or medical imaging.
• Aspect Ratio: The aspect ratio is related to resolution and indicates the relationship
between the number of points vertically and horizontally. For instance, an aspect ratio
of 3/4 means that for every 3 points vertically, and 9 points horizontally
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = = = = = = === = = = =

Raster Scan Display


• The most common type of graphics monitor employing a CRT is the raster-scan display,
based on television technology.
• In a raster-scan system, “the electron beam is swept across the screen, one row at a time
from top to bottom”.
• As the electron beam moves across each row, the beam intensity is turned on and off to
create a pattern of illuminated spots.
• Picture definition is stored in a memory area called the refresh buffer or frame buffer.
11
• This memory area holds the set of intensity values for all the screen points.
• Stored intensity values are then retrieved from the refresh buffer and "painted" on the screen
one row (scan line) at a time as in the following figure.

• For a bit level system, A bit value of 1 indicates that the electron beam is to be turn ON at
that position. A bit value of 0 indicates that the beam intensity is to be turn OFF.
• Refreshing on raster-scan displays is carried out at the rate of 60 to 80 frames per second,
although some systems are designed for higher refresh rates.
• Sometimes, refresh rates are described in units of cycles per second, or Hertz (Hz), where
a cycle corresponds to one frame.
• A refresh rate of 60 frames per second as simply 60 cycle per second or 60 Hz.
• Each screen point is referred to as a pixel or pel (shortened forms of picture element).
• At the end of each line electron beam returns to the left side of the screen to begin
displaying the next scan line.
• Horizontal Retrace: The return to the left of the screen, after refreshing each scan line, is
called the horizontal retrace of the electron beam.
• Vertical Retrace: At the end of each frame (displayed in 1/80th to 1/60th of a second), the
electron beam returns (vertical retrace) to the top left comer of the screen to begin the next
frame.
• Types of scanning or travelling of beam in Raster Scan.
1. Interlaced scanning
2. Non- Interlaced scanning
Interlaced scanning
• Each horizontal line of the screen is traced from top to bottom due to fading of display
of object occur.
• This problem can be solved by non-interlaced scanning.

12
• In this first of all odd numbered lines are traced or visited by an electron beam, then in the
next circle, even number of lines are located.
Noninterlaced scanning.
• For non-interlaced display refresh rate of 30 frames per second used. But it gives flickers.
• For interlaced display refresh rate of 60 frames per second is used.
Advantages:
1. Realistic image
2. Million Different colors to be generated
3. Shadow Scenes are possible.
Disadvantages:
1. Low Resolution
2. Expensive
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = = = = = = === = = = =

Random Scan Display


• Random Scan System uses an electron beam which operates like a pencil to create a
line image on the CRT screen.
• The picture is constructed out of a sequence of straight-line segments.
• Each line segment is drawn on the screen by directing the beam to move from one point
on the screen to the next, where its x & y coordinates define each point.
• After drawing the picture. The system cycles back to the first line and design all the
lines of the image 30 to 60 time each second.
• The process is shown in fig:

Random-scan monitors are also known as vector displays or stroke-writing displays or


calligraphic displays.
Advantages:

13
1. A CRT has the electron beam directed only to the parts of the screen where an image is to
be drawn.
2. Produce smooth line drawings.
3. High Resolution
Disadvantage:
Random-Scan monitors cannot display realistic shades scenes.

= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = = = = = = === = = = =

Color CRT Monitors


A CRT monitor displays color pictures by using a combination of phosphors that emit different
colored light. By combining the emitted light from the different phosphors, a range of colors
can be generated. The two basic techniques for producing color displays with a CRT are
1. The Beam-Penetration method.
2. The Shadow-Mask method.
BEAM-PENETRATION METHOD

14
• The beam-penetration method for displaying color pictures has been used with
random-scan monitors.
• Two layers of phosphor, usually RED and GREEN, are coated onto the inside of the
CRT screen, and the displayed color depends on how far the electron beam penetrates
into the phosphor layers.
• A beam of slow electrons excites only the outer RED layer.
• A beam of very fast electrons penetrates through the RED layer and excites the inner
GREEN layer.
• At intermediate beam speeds, combinations of red and green light are emitted to show
two additional colors, ORANGE and YELLOW.
• The speed of the electrons, and hence the screen color at any point, is controlled by the
beam-acceleration voltage.

Advantage: Beam penetration has been an inexpensive way to produce color in random-scan
monitors.
Disadvantage: only four colors are possible, and the quality of pictures is not as good as with
other methods.
SHADOW-MASK METHODS
• Shadow-mask methods are commonly used in raster scan systems (including color
TV) because they produce a much wider range of colors than the beam penetration
method.
• A shadow-mask CRT has three phosphor color dots at each pixel position.
• One phosphor dot emits a RED Light, another emits a GREEN light, and the third emits
a BLUE light.
• This type of CRT has three electron guns, one for each color dot, and a shadow-mask
grid just behind the phosphor-coated screen.

15
1. Delta-Delta Shadow-Mask method, commonly used in color CRT systems.
• The three electron beams are deflected and focused as a group onto the shadow mask,
which contains a series of holes aligned with the phosphor-dot patterns.
• When the three beams pass through a hole in the shadow mask, they activate a Dot
Triangle, which appears as a small color spot on the screen.
• The phosphor dots in the triangles are arranged so that each electron beam can activate
only its corresponding color dot when it passes through the shadow mask.
2.In-Line arrangement in which the three electron guns, and the corresponding red-green-
blue color dots on the screen, are aligned along one scan line instead of in a triangular pattern.
This in-line arrangement of electron guns is easier to keep in alignment and is commonly used
I n high-resolution color CRTs.

16
• The color variations in a shadow-mask CRT by varying the intensity levels of the three
electron beams.
• By turning OFF the RED and GREEN guns, gets the color coming from the BLUE
phosphor.
• Other combinations of beam intensities produce a small light spot for each pixel
position, since our eyes tend to merge the three colors into one composite.
• The color depends on the amount of excitation of the red, green, and blue phosphors.
• White (or gray) area is the result of activating all three dots with equal intensity.
• Yellow is produced with the green and red dots only.
• Magenta is produced with the blue and red dots.
• Cyan shows up when blue and green are activated equally.
• In some low-cost systems, the electron beam can only be set to on or off, limiting
displays to Eight Colors.

17
• These monitors use shadow-mask methods and take the intensity level for each electron
gun (red, green, and blue) directly from the computer system without any intermediate
processing.
• High-quality raster-graphics systems have 24 bits per pixel in the frame buffer, allowing
256 voltage settings for each electron gun and nearly 17 million color choices for each
pixel.
• An RGB color system with 24 bits of storage per pixel is generally referred to as a Full-
Color System or a True-Color System.
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = = = = = = === = = = =
FLAT-PANEL DISPLAYS
Flat panel monitor are thinner than CRTs, and can hang them on walls or wear them on our
wrists.
1. Reduced volume
2. Weight
3. Low Power consumption when compared to a CRT.
• Current uses for flat-panel displays include TV monitors, calculators, pocket video
games, laptop computers, armrest viewing of movies on airlines, as advertisement
boards in elevators, etc
Flat-panel displays into two categories:
1. Emissive displays
2. Non-Emissive displays.

18
1. Emissive displays (or emitters): These devices that convert electrical energy into light.
Examples:
1. Plasma panels.
2. Thin-film electroluminescent.
3. Light-Emitting Diodes (LED).
Flat CRTs have also been devised, in which electron beams arts accelerated parallel to the
screen, then deflected 90' to the screen. But flat CRTs have not proved to be as successful as
other emissive devices.
2. Non-emissive displays (or non-emitters): These device use optical effects to convert
sunlight or light from some other source into graphics patterns.
Example: Liquid-Crystal Device (LCD)- calculators
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = = = = = = === = = = =

Graphics Software
Graphical Kernel System (GKS):
• GKS was one of the earliest standardized graphics software systems developed in 1984.
• GKS initially focused on two-dimensional graphics but later extended to support
three-dimensional graphics as well.
Programmer’s Hierarchical Interactive Graphics System (PHIGS):
• PHIGS, developed as an extension of GKS, provided enhanced capabilities for
hierarchical object modeling, color specifications, surface rendering, and picture
manipulations. It aimed to address limitations in GKS and further standardize graphics
software.
OpenGL:
• With the rise in popularity of Silicon Graphics, Inc. (SGI) workstations, a set of
graphics routines called GL (Graphics Library) became widely used in the graphics
community.
• OpenGL emerged as a hardware-independent version of GL in the early 1990s.
• It was designed for efficient processing of three-dimensional applications but could also
handle two-dimensional graphics.
• OpenGL is now maintained by the OpenGL Architecture Review Board and is widely
used in various industries for developing graphics applications.

Language Bindings:

19
• Graphics functions in standard packages like OpenGL are specified independently of
any programming language.
• Language bindings define how these functions can be accessed from specific high-
level programming languages like C, C++, Java, or Python.
• For example, the OpenGL bindings for C and C++ are the same, but separate bindings
exist for other languages to accommodate their specific syntax and capabilities.

• Overall, software standards like OpenGL have played a crucial role in enabling
portability and interoperability of graphics applications across different hardware
platforms and programming languages.
= = = = = = = = = = = = = = = = = = = = = = = == = = = = = = = = = = = = = = = = == = = = = = = = === = = = =

Co-ordinate representations
• Before we can create a picture using a computer program, we have to describe the
shapes and locations of the objects we want to draw.
• For example, if we want to draw a house, we need to specify the positions of its walls,
roof, windows, and door.
• Standard Cartesian Coordinate System: Most graphics packages use a standard
coordinate system called Cartesian coordinates.
• In this system: Each point in space is described by its x, y, and z coordinates.
• The x-axis points to the right, the y-axis points upwards, and the z-axis points towards
you (out of the screen).
• For example, to describe a box, we need to know the positions of its corners using these
x, y, and z coordinates.

• Sometimes, the coordinates we have might be in a different system, like spherical or


hyperbolic coordinates. Before we can use these coordinates in a graphics package,
we need to convert them into Cartesian coordinates. This ensures that the objects will
be drawn correctly in the standard coordinate system used by the graphics package.

20
• Specialized Coordinate Frames: Some graphics packages are designed for specific
purposes, like mapping or astronomy. In these cases, they may allow the use of different
coordinate systems that are better suited for those applications.
• However, for general-purpose graphics, it's typical to use Cartesian coordinates.
• Modeling Coordinates: Think of modeling coordinates as the blueprint for each
individual object in a scene. If we're drawing a bicycle, we might have separate
blueprints for the wheels, frame, seat, handlebars, and so on. Each blueprint defines the
shape and size of its respective object.
• World Coordinates: Now, imagine we're building a scene with all these objects. We
need a big canvas to place them on. World coordinates are like this canvas. We take
each object from its individual blueprint (modeling coordinates) and position it on the
canvas (world coordinates) according to where we want it to be in the scene.
• Viewing Pipeline: Imagine you've built a whole scene with different objects positioned
in the world. Now, you want to view this scene on a screen or some other output device.
The process of getting the scene ready for display is called the viewing pipeline.
• Converting to Viewing Coordinates: First, we imagine placing a virtual camera to
capture the scene from a specific viewpoint. This camera has a position and orientation,
just like a real one. We convert the positions of all objects in the world to what they
would look like from the perspective of this camera. These converted positions are
called viewing coordinates.
• Projection to 2D: Next, we need to turn our 3D scene into a flat 2D image, like a photo.
This process is called projection.
• Normalized Coordinates: After projection, we end up with a 2D image, but the
coordinates might still be in different ranges depending on the size of the scene and the
output device. To make things consistent and easier to work with, we convert these
coordinates into normalized coordinates. In normalized coordinates, each value falls
within a specific range, typically from -1 to 1 or from 0 to 1. OR
• Normalized Device Coordinates (NDC): Normalized coordinates are standardized
coordinates that fall within a specific range, typically from -1 to 1 or from 0 to 1. They
are also known as normalized device coordinates because they make a graphics package
independent of the coordinate range for any specific output device. This means that no
matter the resolution or size of the output device, the coordinates will always be within
the same range.

21
• Visible Surfaces and Clipping: Before displaying the scene, we need to identify which
surfaces are visible from the viewpoint of the camera. We also need to eliminate parts
of the scene that are outside the bounds of the view we want to show on the display
device. This process is called clipping.
• Scan-conversion: Once we have identified the visible surfaces and clipped the scene
accordingly, we then convert the scene into a format that can be displayed on the
output device. This process is called scan-conversion. In a raster system, the scene
is converted into a series of pixels, which are then stored in a refresh buffer. This buffer
is used to update the display device.
• Device Coordinates: The coordinate system used by the display device is called device
coordinates. In the case of a video monitor, it is often referred to as screen coordinates.
These coordinates correspond to the physical pixels on the display device.
• Left-handed Coordinate System: Both normalized coordinates and screen coordinates
are often specified in a left-handed coordinate reference frame. In a left-handed system,
increasing positive distances from the xy plane (the screen or viewing plane) are
interpreted as being farther from the viewing position. This convention helps in
understanding the spatial relationships between objects in the scene and their positions
on the display device.
• In summary, normalized device coordinates provide a standardized coordinate system
that is independent of the output device. The scene is then processed to identify visible
surfaces, clipped, and converted into device coordinates for display on the output
device, such as a video monitor. The left-handed coordinate system is commonly used
for both normalized and screen coordinates to maintain consistency in spatial
relationships.
= = = = = = = = = = = = = = = == = = = = = = == = = = = = = = = = = = = = = = = = = = = =
NOTES:
To generate a picture using a programming package, we first need to give the geometric
descriptions of the objects that are to be displayed.
• These descriptions determine the locations and shapes of the objects.
For example,
A point is specified by its (x, y, z) coordinates.
A line segment is defined by the coordinates of its two endpoints.
A polygon is defined by the coordinates of its vertices in sequential order.

22
A circle is determined by its center point and radius.
Coordinate system is a way of assigning numbers to points. There are two ways we can
represent the coordinate system.
1. In 2-D, we need a pair of numbers to specify a point and the coordinates are referred to
as x and y.
2. In 3-D, we need three numbers to specify a point and the third coordinate is often called
z.
2-D Coordinate System
In a 2D coordinate system, an actor's position can determine based on the X and Y axes, left-
right, and up-down respectively.

3-D Coordinate System


• In a 3D coordinate system, along with the X and Y dimensions, we can determine the
actor's position based on the Z axis: the inclusion of depth.
• 3-D graphics applications use two types of Cartesian coordinate systems:
1. left-handed
2. right-handed.

• In both coordinate systems, the positive x-axis points to the right, and the positive y-
axis points up.
• The fingers represent X and Y directions.

23
• The direction of thumb points, either toward or away, is the direction that the positive
z-axis points for that coordinate system.
= = = = = = = = = = = = = = = = == = = = = = = = = = = = = == = = = = = = = = = = = = ==

Graphics Functions
• A graphics package is like a toolbox for creating and working with pictures or images
on a computer.
• Just like how you have different tools in a real toolbox for different tasks, a graphics
package has various functions or routines that help you create, modify, and display
images.
• Graphics Output Primitives: These are the basic building blocks used to create
pictures. They include things like drawing points, lines, shapes (like circles or squares),
and even more complex objects like spheres or cones.
• Attributes: Attributes are like properties or characteristics of these basic building
blocks. For example, you can change the color, thickness, or style of a line, or the color
and pattern of a filled area.
• Geometric Transformations: These are tools that allow you to change the size,
position, or orientation of objects within a picture. For example, you can move a shape
to a different location, make it bigger or smaller, or rotate it.
• Viewing Transformations: Once you've created a scene with objects and applied
transformations, you need to decide how to view it. Viewing transformations help you
select a specific view of the scene and how it's projected onto a screen or output device.
• Input Functions: These allow interaction with the graphics, such as using a mouse or
keyboard to control and modify the images.
• Subdividing Pictures: Sometimes, pictures can get complex. Subdividing allows you
to break down a picture into smaller, more manageable parts, making it easier to work
with.
• Control Operations: These are like housekeeping tasks. They help you manage things
like clearing the screen, setting up the display area, and initializing parameters before
working on a new picture.
= = = = = = = = = = = = = = = = == = = = = = = = = = = = = == = = = = = = = = = = = = ==

24

You might also like