Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS Computer Graphics Valdosta State University, Spring 2018

Similar presentations


Presentation on theme: "CS Computer Graphics Valdosta State University, Spring 2018"— Presentation transcript:

1 CS4830 - Computer Graphics Valdosta State University, Spring 2018
Instructor: Dr. Radu Paul Mihail Textbook website Course website

2 About this course Computer graphics: very broad field of CS, but studies methods/algorithms to create and manipulate visual content Video games: software that involves interaction with a user interface, typically to generate visual feedback We will study elements of both.

3 Course policies No technology use during lecture
Course grade composition: Attendance: 10% 3 exams: 50% Project assignments: 30% Final project (group): 10% To compute final grade, take average of all 4 components, multiply each by their respective weight and sum

4 Course Policies My expectations of a successful student:
Shows respect: texting, sleeping in class, showing up late is disrespectful Shows interest: this is an elective course, I assume you are here because you want to learn about computer graphics asks questions Shows honesty: Copying code from the web without attribution is cheating and I will pursue with plagiarism charges. At the very minimum, you will fail this course. I expect at a minimum 3w’s in-code citations (who/what/when/where)

5 Course Policies Some common features of a typical student who fails:
Shows up late, texts or does something other than paying attention to class Makes various excuses for their own failure to study Doesn’t listen, think they’re always right Starts late on projects and blames course/professor because copying/pasting code doesn’t work well Expects assignments/work to be step-by-step tutorial style Doesn’t think when writing code and has shallow understanding of important concepts in computing/algorithms Doesn’t take responsibility for their learning, expects teacher to do the learning for them. I can explain something 10 times but I can’t understand it for you

6 Chapter 1 Main focus will be 3D graphics, but end result of CG algorithms are 2D images, so we need to understand those Computer image: a rectangular grid of pixels (picture elements) Pixels are small, physical size depends on resolution and display size Each pixel can show a single color at a given time

7 Pixel color Early displays were grayscale, each pixel consisting of a single phosphor that can be set between off (emit no light) or on (emit all the light it can). Typically, 8 bits have been used for discretizing the light levels (total of 2^8 = 256 levels).

8 Pixel color First color devices used indexed color. In this case, there was a color palette (a discrete set of colors, usually 16 or 256) and each pixel was colored from the palette using an index (integer). Why?

9 Pixel color Modern displays are color. Each pixel consists of 3 phosphors: red, green and blue. We refer to these components of pixels as channels. Each channel is typically assigned 8 bits, for a total of 24 (or 32 with an alpha channel) bits/pixel in a modern display. This is called true color. High color uses 16 bits/pixel, 5 bits for red, 5 bits for green and 6 bits for blue. Perceptually almost unnoticeable from true color but boosts performance due to lesser memory transfer requirements

10 Why red/green/blue? Three types of “cone” cells in the human visual system.

11 Color blindess Isihara Color Plate Test

12 Image Storage Pixels displayed on screen are stored in a large block of memory called the frame buffer Every time the content on the screen changes, the frame buffer content is changed. The content transfer from memory to light is done in a synchronized manner, several times per second called the refresh rate Old cathode ray tube (CRT) devices used a moving electron beam to energize phosphors on a screen. The way they systematically lit all the phosphors was via a raster scan

13 Raster

14 Plasma/LCD/LED Modern displays do not refresh using a raster scan, the mechanisms are different, but display is still a collection of discrete pixels whose colors are determined by numbers The number of pixels that a display has vertically and horizontally is referred to as the resolution and is given in pixels. An example is 1920x1080 The size of a pixel in a display (the smaller the better) is often referred to as a ratio of pixels per unit distance. PPI (pixels per inch) is one example For printers, it is DPI (dots per inch)

15 Vector graphics Creating images by specifying each pixel (raster graphics) independently may not be best Alternative: define a list of geometric shapes that an image contains and draw them in some order Each shape, or primitive, has attributes (e.g., line thickness, position, or color)

16 Software Software that creates imagery can be divided in two:
Painting programs (e.g., Adobe Photoshop) Raster representation, each pixel is specified Drawing programs (e.g., Adobe Illustrator) Primitives are specified and pixels filled in based on the location and attributes of those primitives Video game engine graphics are a hybrid of the two

17 Image file formats Saving each pixel’s color individually takes a lot of memory. Think of a HD 1080p frame. It takes 1080x1920x3 = 5.9 MB for a single image. Raster images are typically compressed to save space. Compression can be lossy or lossless. Lossy compression means the recovered image is not exactly the same as the original image, but similar. The similarity is traded off with space requirements. Example lossy format: jpeg Lossless compression means that the recovered image is exactly the same as the original one. Example: png (portable network group) Vector graphics are stored as descriptions of shapes and attributes and these descriptions can be compressed. An example: SVG (scalable vector graphics)

18 Coordinate Systems Any digital image is specified using a coordinate system. A coordinate system sets up the correspondence between numbers and geometric points. In 2D, each point is assigned two numbers: x and y (horizontal and vertical displacement from some origin) A raster is a 2D grid arranged in rows and columns.


Download ppt "CS Computer Graphics Valdosta State University, Spring 2018"

Similar presentations


Ads by Google