... Output System Layers. Application 2. Application 1. Application 3. Swing. UIKit SWT. Window System. Operating System

Similar documents
Graphics Hardware and Display Devices

Computer Graphics. Chapter 1 (Related to Introduction to Computer Graphics Using Java 2D and 3D)

Computer Graphics 1 Instructor Information. Books. Graphics? Course Goals and Outcomes. Where are computer graphics? Where are computer graphics?

Overview of Computer Graphics

Homework Graphics Input Devices Graphics Output Devices. Computer Graphics. Spring CS4815

Homework Graphics Input Devices Graphics Output Devices. Computer Graphics. Spring CS4815

Computer Graphics Lecture 2

What is Output? p Fig. 6-1 Next

Chapter 1 Introduction

CMP 477 Computer Graphics Module 2: Graphics Systems Output and Input Devices. Dr. S.A. Arekete Redeemer s University, Ede

Image Formation. Introduction to Computer Graphics. Machiraju/Zhang/Möller/Klaffenböck

The Display pipeline. The fast forward version. The Display Pipeline The order may vary somewhat. The Graphics Pipeline. To draw images.

Graphics Systems and Models

Computer Graphics. Lecture 1 Introduction to Computer Graphics. Somsak Walairacht - Computer Engineering KMITL

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics

Image Formation. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Creating a Title in Photoshop

CS1101: Lecture 21. Organization: Input/Output. Lecture Outline. Buses. A simple personal computer. Buses

Raster Scan Displays. Framebuffer (Black and White)

Computer Graphics. Shadows

Output Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by:

3. Raster Algorithms. 3.1 Raster Displays. (see Chapter 1 of the Notes) CRT LCD. CS Dept, Univ of Kentucky

Drawing in 3D (viewing, projection, and the rest of the pipeline)

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo)

Computer Graphics - Chapter 1 Graphics Systems and Models

From 3D World to 2D Screen. Hendrik Speleers

The Graphics Pipeline

VTU QUESTION PAPER SOLUTION UNIT -1 INTRODUCTION

Computer Graphics and Visualization. Graphics Systems and Models

SAZ4C COMPUTER GRAPHICS. Unit : 1-5. SAZ4C Computer Graphics

The Traditional Graphics Pipeline

Inside Your PC. Introduction to Computer Science. Polly Huang NTU EE

Computer Graphics Solved MCQs -Part 2 MCQs Questions

CEng 477 Introduction to Computer Graphics Fall 2007

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Definition. Blending & Compositing. Front & Back Buffers. Left & Right Buffers. Blending combines geometric objects. e.g.

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Input: Implementing Interaction Techniques as Finite State Machines

All forms of EM waves travel at the speed of light in a vacuum = 3.00 x 10 8 m/s This speed is constant in air as well

Drawing Fast The Graphics Pipeline

The Traditional Graphics Pipeline

Sir Sadiq s computer notes for class IX. Chapter no 3. Input/Output Devices

Lecture 11: Output 2. Fall UI Design and Implementation 1

Input and output Systems. Peter Rounce - room G06

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Computer Graphics Lecture Notes

CS 325 Computer Graphics

Deferred Rendering Due: Wednesday November 15 at 10pm

Drawing Fast The Graphics Pipeline

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

CS488. Visible-Surface Determination. Luc RENAMBOT

INFOGR Computer Graphics

Display Technologies: CRTs Raster Displays

Devices displaying 3D image. RNDr. Róbert Bohdal, PhD.

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Computer Graphics: Line Drawing Algorithms

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

Motivation. Intensity Levels

INTRODUCTION. Slides modified from Angel book 6e

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

Lecture 6: Output. Fall UI Design and Implementation 1

Today s hall of fame or shame candidate is the Domino s Pizza build-your-own-pizza process. You can try it yourself by going to the Domino s website

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

Lesson 1 Parametric Modeling Fundamentals

Intensity Transformation and Spatial Filtering

Lecture 4 Image Enhancement in Spatial Domain

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

Computer Graphics Fundamentals. Jon Macey

U.C. Berkeley, EECS, Computer Science TAKE HOME EXAM. Your Class Computer Account: DO NOT OPEN THIS INSIDE SODA HALL -- WAIT UNTIL YOU ARE ALONE!

Output models Drawing Rasterization Color models

Drawing Fast The Graphics Pipeline

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

Thank you for backing the project. Hope you enjoy these PDFs over the next few months <3

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 5 September 13, 2012

FACULTY AND STAFF COMPUTER FOOTHILL-DE ANZA. Office Graphics

Introduction To Computer Hardware

What is the typical configuration of a computer sold today? 1-1

OPSE FINAL EXAM Fall CLOSED BOOK. Two pages (front/back of both pages) of equations are allowed.

CS152 Computer Architecture and Engineering Lecture 19: I/O Systems

Books: 1) Computer Graphics, Principles & Practice, Second Edition in C JamesD. Foley, Andriesvan Dam, StevenK. Feiner, John F.

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E.

DOOM 3 : The guts of a rendering engine

Lecture 16 Color. October 20, 2016

Top 10 Productivity Tips in Fusion 360

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Part II: Creating Visio Drawings

CS635 Spring Department of Computer Science Purdue University

Lecture 17 Introduction to Memory Hierarchies" Why it s important " Fundamental lesson(s)" Suggested reading:" (HP Chapter

SOLIDWORKS: Lesson 1 - Basics and Modeling. Introduction to Robotics

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

Principle of LCD Display Section D

Scanline Rendering 2 1/42

4) Finish the spline here. To complete the spline, double click the last point or select the spline tool again.

Physically-Based Laser Simulation

The Traditional Graphics Pipeline

(Refer Slide Time 00:01:09)

ISOM 2017 Appendix 1 CMYK Printing and Colour Definitions. Version 1, Issued by: IOF Map Commission

Let s start with occluding contours (or interior and exterior silhouettes), and look at image-space algorithms. A very simple technique is to render

Transcription:

Output: Hardware

Output System Layers Application 1 Application 2 Application 3 Swing SWT... UIKit Window System Operating System Hardware (e.g., graphics card) 2

Output Hardware 3

Start with some basics: display devices l Just how do we get images onto a screen? l Most prevalent device: CRT l Cathode Ray Tube l AKA TV tube 4

Cathode Ray Tubes l Cutting edge 1930 s technology l (basic device actually 100 yrs old) l Vacuum tube (big, power hog, ) l Refined some, but no fundamental changes l But still dominant l Because TVs are consumer item l LCD s just starting to challenge 5

How a CRT works (B/W) Vacuum Tube Phosphor Coating Electron Gun Deflection Coils Negative charge 15-20 Kv Positive charge 6

Move electron beam in fixed scanning pattern l Raster lines across screen l Modulate intensity along line (in spots) to get pixels 7

Pixels determined by 2D array of intensity values in memory l Frame buffer l Each memory cell controls 1 pixel 42 DAC l All drawing by placing values in memory 8

Adding color l Use 3 electron guns l For each pixel place 3 spots of phosphor (glowing R, G, & B) l Arrange for red gun to hit red spot, etc. l Requires a lot more precision than simple B/W l Use shadow mask behind phosphor spots to help 9

Color frame buffer l Frame buffer now has 3 values for each pixel l each value drives one electron gun l can only see ~ 2^8 gradations of intensity for each of R,G,&B l 1 byte ea => 24 bits/pixel => full color 10

Other display technologies: LCD l Liquid Crystal Display l Discovered in 1888 (!) by Reinitzer l Uses material with unusual physical properties: liquid crystal l rest state: rotates polarized light 90 l voltage applied: passes as is 11

Layered display l Layers Horizontal Polarizer Liquid Crystal Vertical Polarizer l In rest state: light gets through l Horizontally polarized, LC flips 90, becomes vertically polarized l Passes through 12

Layered display l Layers Horizontal Polarizer Liquid Crystal Vertical Polarizer l In powered state: light stopped l Horizontally polarized, LC does nothing, stopped by vertical filter 13

Lots of other interesting/cool technologies l Direct retinal displays l University of Washington HIT lab l Set of 3 color lasers scan image directly onto retinal surface l Scary but it works l Very high contrast, all in focus l Potential for very very high resolution l Has to be head mounted 14

All these systems use a frame buffer l Again, each pixel has 3 values l Red, Green Blue l Why R, G, B? l R, G, and B are particular freq of light l Actual light is a mix of lots of frequencies l Why is just these 3 enough? 15

Why R, G, & B are enough l Eye has receptors (cones) that are sensitive to (one of) these l Eye naturally quantizes/samples frequency distribution l 8-bit of each does a pretty good job, but some complications 16

Complications l Eye s perception is not linear (logarithmic) l CRT s (etc.) do not respond linearly l Different displays have different responses l different dynamic ranges l different color between devices! l Need to compensate for all of this 17

Gamma correction l Response of all parts understood (or just measured) l Correct: uniform perceived color l Normally table driven l 0 255 in (linear intensity scale) l 0 N out to drive guns N=1024 or 2048 typical 18

Unfortunately, gamma correction not always done l E.g., TV is not gamma corrected Knowing RGB values does not tell you what color you will get! l For systems you control: do gamma correction 19

24 bits/pixel => true color, but what if we have less? l 16 bits/pixel l 5 each in RGB with 1 left over l decent range (32 gradations each) l Unfortunately often only get 8 l 3 bits for GB, 2 for R l not enough l Use a trick instead 20

Color lookup tables (CLUTs) l Extra piece of hardware l Use value in FB as index into CLUT l e.g. 8 bit pixel => entries 0 255 2 0: R G B 1: R G B... 2: 17 236 129 255: R G B l Each entry in CLUT has full RBG value used to drive 3 guns 21

Palettes l 8 bits / pixel with CLUT l Gives palette of 256 different colors l Chosen from 16M l Can do a lot better than uniform by picking a good palette for the image to be displayed (nice algorithms for doing this) 22

Imaging Models What does the hardware look like to the higher levels of software? 23

Software models of output (Imaging models) l Start out by abstracting the HW l What does the hardware look like to the higher levels of software? l Earliest imaging models abstracted early hardware: vector refresh l stroke or vector (line only) models l Display list containing end points of lines to be drawn l System just cycles through the display list, moving the electron gun between endpoints l Arbitrarily positionable electron gun, rather than the sweep pattern seen in raster imaging. 24

Vector models l Advantages l can freely apply mathematical xforms l Scale rotate, translate l Only have to manipulate endpoints l Disadvantages l limited / low fidelity images l wireframe, no solids, no shading 25

Current dominant: Raster models l Most systems provide model pretty close to raster display HW l integer coordinate system l 0,0 typically at top-left with Y down l all drawing primitives done by filling in pixel color values (values in FB) 26

Issue: Dynamics l Suppose we want to rubber-band a line over complex background l Drawing line is relatively easy l But how do we undraw it? 27

Undrawing things in raster model l Ideas? (red, su, xo, pal, fwd) 28

Undrawing things in raster models l Four solutions: l 1) Redraw method l Redraw all the stuff under l Then redraw the line l Relatively expensive (but HW is fast) l Note: don t have to redraw all, just damaged area l Simplest and most robust (back) 29

How to undraw l 2) Save-unders l When you draw the line, remember what pixel values were under it l To undraw, put back old values l Issue: (what is it?) 30

How to undraw l 2) Save-unders l l l When you draw the line, remember what pixel values were under it To undraw, put back old values Issue: what if background changes l Tends to either be complex or not robust l Typically used only in special cases (back) 31

How to undraw l 3) Use bit manipulation of colors l Colors stored as bits l Instead of replacing bits XOR with what is already there l A ^ B ^ B ==? 32

How to undraw l 3) Use bit manipulation of colors l Colors stored as bits l Instead of replacing bits XOR with what is already there l A ^ B ^ B == A (for any A and B) l Draw line by XOR with some color l Undraw line by XOR with same color 33

Issue with XOR? l What is it? 34

Issue with XOR l Colors unpredictable l SomeColor ^ Blue ==?? l Don t know what color you will get l Not assured of good contrast Ways to pick 2nd color to maximize contrast, but still get wild colors 35

Undraw with XOR l Advantage of XOR undraw l Fast l Don t have to worry about what is under the drawing, just draw l In the past used a lot where dynamics needed l May not be justified on current HW (back) 36

How to undraw l 4) Simulate independent bit-planes using CLUT tricks l Won t consider details, but can use tricks with CLUT to simulate set of transparent layers l Probably don t want to use this solution, but sometimes used for special cases like cursors (back) 37

Higher level imaging models l Simple pixel/raster model is somewhat impoverished l Integer coordinate system l No rotation (or good scaling) l Not very device independent 38

Higher level imaging models l Would like: l Real valued coordinate system l oriented as Descarte intended? l Support for full transformations l real scale and rotate l Richer primitives l curves 39

Stencil-and-Paint 40

Higher level imaging models l Would like: l Real valued coordinate system l oriented as Descarte intended? l Support for full transformations l real scale and rotate l Richer primitives l curves 41

Stencil and paint model l All drawing modeled as placing paint on a surface through a stencil l Stencil modeled as closed curves (e.g., splines) l Issue: how do we draw lines? 42

Stencil and paint model l All drawing modeled as placing paint on a surface through a stencil l Modeled as closed curves (splines) l Issue: how do we draw lines? l (Conceptually) very thin stencil along direction of line l Actually special case & use line alg. 43

Stencil and paint model l Original model used only opaque paint l Modeled hardcopy devices this was developed for (at Xerox PARC) l Current systems now support paint that combines with paint already under it l e.g., translucent paint ( alpha values) 44

Stencil and paint examples l In most cases, implemented at a much higher layer than the raw hardware (e.g., in the Window System or Toolkit, which we ll talk about soon...) l Postscript is based on this approach l Implemented in printer s hardware (often) l NeXTstep: Display Postscript l Brought same imaging model used for hardcopy output to interactive graphics l Mac OS X l Derived from NeXTstep, uses DisplayPDF as its imaging model l Windows, starting with Vista l Aero l New Java drawing model (Java2D) provides a stencil-and-paint imaging model, implemented completely in the Toolkit 45

Stencil and paint pros and cons l Advantages l Resolution & device independent l does best job possible on avail HW l Don t need to know size of pixels l Can support full transformations l rotate & scale 46

Stencil and paint pros and cons l Disadvantages l Slower l Less and less of an issue l But interactive response tends to be dominated by redraw time l Much harder to implement 47

Stencil and paint pros and cons l Stencil and paint type models generally the way to go l But have been slow to catch on l Market forces tend to keep us with old models l Much harder to implement l Finally became mainstream around 2006 48