0% found this document useful (0 votes)
33 views

CG 01 Intro 2023 2024

The document discusses computer graphics and provides an overview of the field including its applications, basic concepts, output primitives, transformations, clipping and rasterization. It also covers graphic systems, pixels and frame buffers, CPUs and GPUs, input and output devices, images, objects and viewers, lighting, cameras, and the human visual system.

Uploaded by

sanegool55
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)
33 views

CG 01 Intro 2023 2024

The document discusses computer graphics and provides an overview of the field including its applications, basic concepts, output primitives, transformations, clipping and rasterization. It also covers graphic systems, pixels and frame buffers, CPUs and GPUs, input and output devices, images, objects and viewers, lighting, cameras, and the human visual system.

Uploaded by

sanegool55
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/ 58

Computer Graphics

Lecture 1
Course Outlines
1. Introduction to Computer Graphics

2. Basic Concepts of Computer Graphics

3. Output Primitives

4. 2D Transformations

5. 3D Transformations

6. Clipping & Rasterization


2
• Computer graphics is concerned with all aspects
of producing pictures or images using a
computer.

• The field began humbly 50 years ago, with the


display of a few lines on a cathode ray tube
(CRT).

• Currently, we can generate images by


computer that are indistinguishable from
photographs of real objects.
3
Applications of Computer Graphics

The applications of computer graphics are many


and varied; we can, however, divide them into four
major areas:
1.Display of Information

2.Design

3.Simulation and Animation

4.User Interfaces
4
1- Display of Information

5
• The field of scientific visualization provides
graphical tools that help researchers to interpret
the vast quantity of data that they generate.

• In fields such as fluid flow, molecular biology, and


mathematics, images generated by conversion of
data to geometric entities that can be displayed
have yielded new insights into complex
processes.

• The system used a mathematical model to generate the


6
data.
Scientific Visualization 7
2- Design

8
• Professions such as engineering an architecture
are concerned with design.

• Starting with a set of specifications, engineers


and architects seek a cost-effective solution that
satisfies the specifications.

• Design is an iterative process.


• Rarely in the real world is a problem specified
such that there is a unique optimal solution.

9
• Design problems are either overdetermined,
such that they possess no solution that satisfies

all the criteria, or underdetermined, such


that they have multiple solutions that
satisfy the design criteria.

• The designer works in an iterative manner.


He/She generates a possible design, tests
it, and then uses the results as the basis

for exploring other solutions. 10


• Today, the use of interactive graphical tools in
computer-aided design (CAD) pervades fields
such as:

1. Architecture

2. The design of mechanical parts

3. Very-large-scale integrated (VLSI) circuits.

11
12
3- Simulation and Animation

13
• Once graphics systems evolved to be capable of
generating sophisticated images in real time,
designers and researchers began to use them as
simulators.

• Graphical flight simulators have proved both to


increase safety and to reduce training expenses.

• The use of special VLSI chips has led to a


generation of arcade games as sophisticated as
flight simulators.
14
F16 Fighter Simulator
15
Driving Car Simulator
16
4- User Interface

17
• Our interaction with computers has become
dominated by a visual paradigm that includes
windows, icons, menus, and a pointing device,
such as a mouse.

• From a user’s perspective, windowing systems


such as Microsoft Windows, and the
Macintosh Operating System differ only in
details.

18
• More recently, millions of people have
become users of the Internet.

• Their access is through graphical network


browsers, such as Firefox, Chrome, Safari,
and Internet Explorer, that use these same
interface tools.

19
• The GUI consists of different icons such as:

1. Program icons.

2. Object icons.

3. Menu icons.

4. Check-Box icons

5. Spinner icons.

20
Program Icons 21
Object Icons 22
Menu Icons 23
Check-box Icons 24
Spinner Icons

25
Graphic System
• A computer graphic system is a computer
system; as such, it must have all the
components of a general-purpose computer
system.

• Let us start with the high-level view of a graphics


system, as shown in the following block diagram.

26
A graphics system 27
• There are six major elements in our
system:

1. Input devices

2. Central Processing Unit

3. Graphics Processing Unit

4. Memory

5. Frame buffer

6. Output devices
28
Pixels and the Frame Buffer
• The image we see on the output device is an
array—the raster—of picture elements, or pixels,
produced by the graphics system.

• the pixels are stored in a part of memory called


the frame buffer

• The depth, or precision, of the frame buffer,


defined as the number of bits that are used for

each pixel. 29
30
 These picture elements (known as pels or, more
commonly, pixels) can be either on or off, as in the 1-bit
bitmap.

 By using more bits to describe them, can represent


varying shades of color:

1. 4 bits for 16 colors;


2. 8 bits for 256 colors;
3. 15 bits for 32,768 colors;
4. 16 bits for 65,536 colors;
5. 24 bits for 16,772,216 colors. 31
• In full-color systems, there are 24 (or more) bits
per pixel. Such systems can display sufficient
colors to represent most images realistically.

Image of Yeti the cat && Detail of area


around one eye showing individual pixels. 32
The CPU and the GPU
• In a simple system, there may be only one
processor, the (CPU) of the system, which
must do both the normal processing and the
graphical processing.

• The graphical function of the processor is to


take specifications of graphical primitives and
to assign values to the pixels in the frame
33
buffer .
Output Devices
• Until recently, the dominant type of display
(or monitor) was the cathode-ray tube (CRT).

• When electrons strike the phosphor coating


on the tube, light is emitted.

• The output of the computer is converted, by


digital to-analog converters, to voltages
across the x and y deflection plates.
34
•Light appears on the surface of the CRT
when a sufficiently intense beam of electrons
is directed at the phosphor.

The cathode-ray tube (CRT). 35


Input Devices
• Most graphics systems provide a keyboard
and at least one other input device

• The most common input devices are the


mouse, the joystick, and the data tablet.

• These devices allow a user to indicate a


particular location on the display.
36
Trackball
Mouse

Data tablet Joystick


37
Images: Physical and
Synthetic
• In modern systems, we want to exploit the
capabilities of the software and hardware to
create realistic images of computer-
generated three dimensional objects

• This task involves many aspects of image


formation, such as lighting, shading, and
properties of materials. 38
Objects and Viewers
• Two basic entities must be part of any image-
formation Process: Object and Viewer.

• We form objects by specifying the positions in


space of various geometric primitives, such
as points, lines, and polygons.

• To form an image, we must have someone or


something that is viewing our objects.
39
• It is the viewer that forms the image of
our objects.

Image seen by three different viewers.


40
Light and Images
• If there is no light source, the objects would
be dark, and there would be nothing visible
in our image.

• We must indicated how the color enters the


picture or what the effects of the surface
properties of the objects are.
41
A camera system with an object and a
42
light source
43
• The visible spectrum, which has
wavelengths in the range of 350 to 780
nanometers (nm), is called (visible) light.

44
The electromagnetic spectrum
Imaging Systems
• We now introduce two imaging systems:

 The pinhole camera

 The human visual system.


 The pinhole camera: is a simple example of
an imaging system that will enable us to
understand the functioning of cameras and of

other optical imagers 45


The pinhole camera
• A pinhole camera is a box with a small hole
in the center of one side of the box.

• The film is placed inside the box on the side


opposite the pinhole.

• The film plane is located a distance d from


the pinhole.

46
47
Pinhole camera

48
Side view of the pinhole camera

49
50
Camera Specifications
Camera Specifications

• we can identify four types of necessary


specifications:

– Position

– Orientation

– Focal length

– Film plane
51
The Human Visual System
• Our extremely complex visual system has
all the components of a physical imaging
system, such as a camera or a microscope.

• Light enters the eye through the lens and


cornea

• The iris opens and closes to adjust the


amount of light entering the eye
52
The human visual system

53
• The lens forms an image on a two-
dimensional structure called the retina at the
back of the eye.
• The rods and cones are light sensors and
are located on the retina.
• The sizes of the rods and cones determine
the resolution of our visual systems
• Rods are responsible for vision at low light
levels (scotopic vision). Cones are active at
higher light levels (photopic vision)

54
The Programmer’s Interface
• In a typical application, such as the
painting program in the Figure, the user
sees menus and icons that represent
possible actions.

• By clicking on these items, the user


guides the software and produces images

without having to write programs. 55


• Interface for a painting program 56
• The interface between an application
program and a graphics system can be
specified through a set of functions that
resides in a graphics library.

• These specifications are called the


application programming interface
(API).

57
Three-Dimensional APIs
• If we are to follow the synthetic-camera
model, we need functions in the API to
specify the following:

– Objects

– A viewer

– Light sources

– Material properties 58

You might also like