Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 41

Computer Graphics

Virendra Singh Kushwah Assistant Professor Department of Computer Science


04/28/12 Designed By Virendra Singh Kushwah 1

What is Computer Graphics ? and science Computer graphics is the art

representing and manipulating information images generated through computation. Computer graphics generally means creation, storage and manipulation of models and images.

of using

Q. What is a Pixel?
04/28/12 Designed By Virendra Singh Kushwah 2

What is Interactive Computer Graphics? User controls contents, structure, and appearance of objects
and their displayed images via rapid visual feedback Basic components of an interactive graphics system input (e.g., mouse, tablet and multi-touch) processing (and storage) display/output (e.g., screen, paper-based printer, video recorder) First truly interactive graphics system, Sketchpad, pioneered at MIT by Ivan Sutherland for his 1963 Ph.D. thesis

Note : CRT monitor, light pen and function-key panel


04/28/12 Designed By Virendra Singh Kushwah 3

Continue
An image works for computer graphics. An image may be either in 2D or 3D.

04/28/12

Designed By Virendra Singh Kushwah

2D and 3D image
An image is a 2D rectilinear array of pixels An image is known y 2D image which has as 2 coordinates. X-Axis, Y-Axis
x y image which has An image is known as 3Daxis y 3 coordinates. X-Axis, Y-Axis & P Z-Axis z x
04/28/12 Designed By Virendra Singh z axis Kushwah

x axis

Representation of Pixels

Important: So an image is an array of pixels.


04/28/12 Designed By Virendra Singh Kushwah 6

Applications of Computer Graphics


Entertainment Computer-aided design Scientific visualization Training Education E-commerce Computer art
Designed By Virendra Singh Kushwah 7

04/28/12

04/28/12

Designed By Virendra Singh Kushwah

04/28/12

Designed By Virendra Singh Kushwah

04/28/12

Designed By Virendra Singh Kushwah

10

04/28/12 In Bangalore,

Pilot trainingKushwah be conducted by is to

Designed By Virendra Singh

11

04/28/12

Designed By Virendra Singh Kushwah

12

04/28/12

Designed By Virendra Singh Kushwah

13

04/28/12

Designed By Virendra Singh Kushwah

14

Questions
What is computer aided design (CAD)? Difference between CAD and computer art. What is the purpose of AutoCAD software?

04/28/12

Designed By Virendra Singh Kushwah

15

04/28/12

Somewhere Pixel is known By Virendra Singh Designed as a dot.


Kushwah

16

04/28/12

The number of pixels per square inch on a computer-generated display; the greater the resolution, the better the picture Resolution is the term used to describe the number of dots, or pixels, used to display an image. The display, or resolution on a monitor, is composed of thousands of pixels or dots. This display is indicated by a number combination, such as 800 x 600. This indicates that there are 800 dots horizontally across the monitor, by 600 lines of dots vertically,
Designed By Virendra Singh Kushwah 17

What is a Display Resolution

Aspect Ratio
The aspect ratio of an image is the ratio of the width of the image to its height, expressed as two numbers separated by a colon. For an x:y aspect ratio, no matter how big or small the image is, if the width is divided into x units of equal length and the height is measured using this same length unit, the height will be measured to be y units. For example, consider a group of images, all with an aspect ratio of 16:9. One image is 16inches wide and 9inches high. Another image is 16 centimetres wide and 9 centimetres high. In the above examples, the aspect ratio is same but number of pixels By Virendra Singh in the both images will be Designed 04/28/12 18 Kushwah different.

How to get aspect ratio value of an image?


Width = 1024 Height = 768 Total pixels = 1024 x 768 = 768, 432 pixels
This image is known as 0.8 MP (megapixel) image. Calculating aspect ratio = 1024/768 = 1.33 Designed By Virendra 04/28/12 So, we can write 1.33:1Singh aspect ratio. Kushwah

19

4:3 (1.33:1) 16:9 (1.78:1)


04/28/12 Designed By Virendra Singh Kushwah 20

Different aspect ratio


For movie, we have seen 16:10 also. We have example here to aspect ratio. Please watch this clip.

04/28/12

Designed By Virendra Singh Kushwah

21

Types of Computer graphics


There are two types of computer graphics: Raster graphics: where each pixel is separately defined (as in a digital photograph), vector graphics: where mathematical formulas are used to draw lines and shapes, which are then interpreted at the viewer's end
Designed By Virendra Singh Kushwah

04/28/12

22

In computer graphics, a raster graphics image or bitmap is a data structure representing a generally rectangular grid of pixels, or points of colour, viewable via a monitor, paper, or other display medium. Raster images are stored in image files with varying formats. Bitmap images (also known as raster images) are made up of pixels in a grid. A coloured raster image (or pixmap) will usually have pixels with between one and eight bits for each of the red, green, and blue components, though other colour encodings 23 Designed By Virendra Singh 04/28/12 Kushwah are also used

Raster Graphics

Example of raster image

04/28/12

Designed By Virendra Singh Kushwah

A Bitmap Image--shown zoomed in with the original size in the upper right corner. Notice the individual pixels that 24 make up the image.

Key points
Common Popular bitmap bitmap formats editing programs include:
are:

BMP GIF JPEG, JPG PNG TIFF PSD (Adobe Photoshop)


04/28/12

Microsoft Paint Adobe Photoshop Corel Photo-Paint Corel Paint Shop Pro

The GIMP
Designed By Virendra Singh Kushwah 25

Vector graphics
Vector images are made up of many individual, scalable objects. These objects are defined by mathematical equations rather than pixels, so they always render at the highest quality. Objects may consist of lines, curves, and shapes with editable attributes such as colours, fill, and outline. Changing the attributes of a vector object does not effect the object itself. You can freely change any number of object attributes without destroying the basic object. An object can be modified not only by changing its attributes, but also by shaping and transforming it using Singh Designed By Virendra nodes and control 04/28/12 26 Kushwah handles.

Example of vector graphics compare with raster


Vecto r imag e

04/28/12

Conversion of r

Designed By Virendra Singh Kushwah

27

Key points
Common vector formats include: AI (Adobe Illustrator) CDR (CorelDRAW) CMX (Corel Exchange) CGM Computer Graphics Metafile DXF (Drawing Exchange Format) AutoCAD WMF Windows Metafile Popular vector drawing programs are: Adobe Illustrator CorelDRAW Xara Xtreme Serif DrawPlus
04/28/12 Designed By Virendra Singh Kushwah 28

Graphics display
Definition: A display of graphics information (images) on the computer screen. There are two types of display 1.Raster scan display 2.Random scan display

04/28/12

Designed By Virendra Singh Kushwah

29

Meaning of raster
Hindi meaning Raster graphics, graphical techniques using arrays of pixel values

04/28/12

Designed By Virendra Singh Kushwah

30

Raster-Scan Display
interface to host computer
(display commands) (interaction data)

00000000000000000000000001000000 00000000000000000000000001000000 00000000000000000000000111110000 00000000011000000001111111111111 00000000111100000000000111110000 00000011111111000000000001000000 00001111111111110000000001000000 00111111111111111100000000000000 00011111111111111000000000000000 00011111111111111000000000000000 00011111111111111000000000000000 00000000000000000000000000000000

display processor CRT

keyboard data input

frame buffer
Designed By Virendra Singh Kushwah

04/28/12

31

What is frame buffer?


A framebuffer is a video output device that drives a video display from a memory buffer containing a complete frame of data. The information in the memory buffer typically consists of color values for every pixel (point that can be displayed) on the screen. Color values are commonly stored in 1-bit monochrome, 4-bit palettized, 8-bit palettized, 16-bit highcolor and 24-bit truecolor formats.
04/28/12 Designed By Virendra Singh Kushwah 32

A Sun cgsix framebuffer

A framebuffer is a video output device that drives a video display from a memory buffer containing a complete frame of data.
04/28/12 Designed By Virendra Singh Kushwah 33

input CPU DP CRT pixel

pixel = picture element

frame buffer (bit-map,pixmap)

04/28/12

Designed By Virendra Singh Kushwah

34

(a)

(b)

(c)

(d)

A raster-scan system displays an object as a set of points across each screen scan line
04/28/12 Designed By Virendra Singh Kushwah 35

Real picture of electronic gun

The Cathode Ray Tube (CRT) is a vacuum tube containing an electron gun (a source of electrons) and a fluorescent screen, with internal or external means to accelerate and deflect the electron beam, used to create images in the form of light emitted from the fluorescent screen.
04/28/12 Designed By Virendra Singh Kushwah 36

What is anti aliasing?


Anti-Aliasing is a method of fooling the eye that a jagged edge is really smooth. Anti-Aliasing is often referred in games and on graphics cards.
The letter on the left is a blown up letter a with no antialiasing. The letter on the right has had anti-aliasing applied to it. In this blown up form it looks like its simply blurred but if we reduce the size down to a more standard size you may see the difference.

04/28/12

Designed By Virendra Singh Kushwah

37

04/28/12

Designed By Virendra Singh Kushwah

38

Interlace
Interlace is a technique of improving the picture quality of a video signal without consuming extra bandwidth. Interlaced video was designed for display on CRT televisions.

04/28/12

Designed By Virendra Singh Kushwah

39

04/28/12

Designed By Virendra Singh Kushwah

40

Thanking You
04/28/12 Designed By Virendra Singh Kushwah 41

You might also like