Professional Documents
Culture Documents
CS101 Introduction To Computing: Graphics & Animation
CS101 Introduction To Computing: Graphics & Animation
Lecture 33
Graphics & Animation
1
We also found out about the addressing scheme 2 used on the Internet
IP Address
A unique identifier for a computer on a TCP/IP network Format: four 8-bit numbers separated by periods. Each 8-bit number can be 0 to 255
Domain Names
IP addresses are fine for computers, but difficult to recognize and remember for humans A domain name is a meaningful, easy-toremember label for an IP address
FTP
Used to transfer files between computers on a TCP/IP network (e.g Internet)
Telnet Protocol
Using Telnet, a user can remotely log on to a computer (connected to the users through a TCP/IP network, e.g. Internet) & have control over it like a local user, including control over running various programs
The Web
The greatest, shared resource of information created by humankind A user may access any item on the Web through a URL, e.g.
http://www.vu.edu.pk/cs/index.html
http://www.vu.edu.pk/cs/index.html
Protocol Identifier
Server Address
eMail
Computer-to-computer messaging Inexpensive, and quite quick, but not instant!
10
11
Instant Messaging
The IM services available on the Internet (e.g. ICQ, AIM, MSN Messenger, Yahoo! Messenger) allow us to maintain a list of people (contacts) that we interact with regularly We can send an instant messages to any of the contacts in our list as long as that contact is online
13
Key Point
Once the IM server provides the communication info to the user and his/her contacts IM client, the two are able to communicate with each other without the IM servers assistance This server-less connection is termed as a P2P connection
14
15
Computer Graphics
Images created with the help of computers 2-D and 3-D (displayed on a 2-D screen but in such a way that they give an illusion of depth) Used for scientific research, artistic expression, or for industrial applications Graphics have made the computer interfaces more intuitive by removing the need to 17 memorize commands
Displaying Images
Most all computer displays consist of a grid of tiny pixels arranged in a regular grid of rows and columns
Images are displayed by assigning different colors to the pixels located in the desired portion of the computer display
Lets discuss the pixel a bit more
18
Pixel
The smallest image forming element on a computer display The computer display is made up of a regular grid of these pixels The computer has the capability of assigning any color to any of the individual pixels on the display Lets now see how the computer displays a square 19
20
Often, the intensity of each color is represented with a byte, resulting in 256x256x256 (16+ million) unique color combinations 21
For example, the platelet may be restricted to 256 colors (requiring 1 byte/pixel instead of 3)
23
The quality of the displayed image will not suffer at all if the image only uses colors that are a part of the platelet
24
2
3
25
Dithering
In this scheme, pixels of alternating colors are used to simulate a color that is not present in the platelet
For example, red and green pixels can be alternated to give the impression of bright yellow
The quality of the displayed image is poorer
26
Aliasing
The computer screen consists of square-ish pixels arranged in a fixed grid At times, when a diagonal line is drawn on this grid, it looks more like a staircase, instead of a straight line
This effect called aliasing can be managed by reducing the size of pixels
27
28
Anti-Aliasing (1)
Anti-aliasing is another technique used for managing the staircase effect Lets say that we need to draw a white straightline such that it overlaps 60% with one pixel, and 40% with another initially, and near the end, 58%, 41%, and 1%, respectively, with three pixels
29
Anti-Aliasing (2)
The staircase effect is caused because the proper drawing of the line requires a pixel that does not exist
31
32
Anti-Aliasing (3)
The 3rd option is to color the pixel with 60% overlap to a 40% gray color & the other one to 60% gray
33
34
If an object is drawn on top of another, it is difficult to move just one of them while leaving the other untouched
Changing the resolution often requires considerable touch-up work Relatively large file size
37
Image Processing
A branch of computer science concerned with manipulating and enhancing computer graphics Examples:
Converting 2-D satellite imagery into a 3-D model of a terrain
43
3-D CAD
44
3-D Rendering
The process of converting information about 3D objects into a bit-map that can be displayed on a 2-D computer display
Animation
Graphics in motion, e.g. cartoons Illusion of motion is created by showing the viewer a sequence of still images, rapidly Drawing those images - each slightly different from the previous one - used to be quite tedious work Computers have helped in cutting down some 46 of the tediousness
47
10
11
12
13
14
15
16
48
Visualization of processes, e.g the IM process Displaying the results of scientific experiments, e.g. nuclear fusion
49
Tweening (1)
Creating a reasonable illusion of motion requires the drawing of 14-30 images per second of animation very tedious!
In practice, only 4-5 images (called key images) instead of 14-30 are drawn, and then the computer is asked to create the remaining inbetween images
50
Tweening (2)
This process of creating these in-between images from key images is called in-betweening (or tweening for short)
The simplest algorithm for tweening calculates the position of a particular segment of an image by calculating the average of the positions of that same image segment belonging to adjacent key images
51
We discussed how graphics & animation are displayed We also looked at several formats used for storing graphics and animation
53
To become able to appreciate the role of intelligent systems in scientific, business and consumer applications
To look at several techniques for designing intelligent systems 54