IT- 601: Computer Graphics Lecture-03 Scan Conversion

Slides:



Advertisements
Similar presentations
5.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 5 – Drawing A Line.
Advertisements

CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
Basic Raster Graphics Algorithms for Drawing 2D Primitives
CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE.
+ CPCS 391 Computer Graphics 1 Instructor: Dr. Sahar Shabanah Lecture 3.
Line Drawing Algorithms. Rasterization-Process of determining which pixels give the best approximation to a desired line on the screen. Scan Conversion-Digitizing.
Computer Graphics Lecture 3 Line & Circle Drawing.
30/9/2008Lecture 21 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD3107 University of Palestine.
Lecture 2 Line & Circle Drawing
Computer Graphics Tz-Huan Huang National Taiwan University (Slides are based on Prof. Chen’s)
Komputer Grafik 2 (AK045206) Scan Conversion 1/31 Scan Conversion.
Output Primitives Computer Graphics.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
Graphics Output Primitives Pixel Addressing and Fill Area Dr. M. Al-Mulhem Feb. 1, 2008.
Line Drawing by Algorithm. Line Drawing Algorithms Line drawn as pixels Graphics system –Projects the endpoints to their pixel locations in the frame.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Scan Conversion CS123 1 of 44Scan Conversion - 10/14/2014.
CSI 421: Computer Graphics
Rasterization Foley, Ch: 3. Pixels are represented as disjoint circles centered on uniform grid Each (x,y) of the grid has a pixel Y X (1,1) (1,2) (0,0)
CS 450: COMPUTER GRAPHICS DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE.
Circle Drawing algo..
Vector Graphics Making custom images. Raster vs. Vector Graphics In computer graphics, a raster graphics image, or bitmap, is a dot matrix data structure.
IT- 601: Computer Graphics Lecture-04 Scan Conversion Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh 9/3/2015.
March Shape Drawing Algorithms Shmuel Wimer Bar Ilan Univ., Engineering Faculty.
Dr. Scott Schaefer Scan Conversion of Lines. 2/78 Displays – Cathode Ray Tube.
1/1/20001 Topic >>>> Scan Conversion CSE Computer Graphics.
College of Computer and Information Science, Northeastern UniversitySeptember 12, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture.
Dr. S.M. Malaek Assistant: M. Younesi
Jehee Lee Seoul National University
1 CPE 333 : Computer Graphics มหาวิทยาลัยเทคโนโลยีพระจอม เกล้าธนบุรี Dr. Natasha Dejdumrong.
WHERE TO DRAW A LINE?? Line drawing is accomplished by calculating intermediate positions along the line path between specified end points. Precise definition.
CS 450: COMPUTER GRAPHICS REVIEW: DRAWING ELLIPSES AND OTHER CURVES SPRING 2015 DR. MICHAEL J. REALE.
Computer Graphics Computer Graphics is everywhere: Visual system is most important sense: High bandwidth Natural communication Fast developments in Hardware.
Objectives Differentiate between raster scan display and random scan display.
College of Computer and Information Science, Northeastern UniversityOctober 12, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2006.
1Computer Graphics Implementation III Lecture 17 John Shearer Culture Lab – space 2
1 Introduction Line attribute Color and gray scale Area filled attribute Anti-aliasing.
Line Drawing and Generalization. Outline  overview  line drawing  circle drawing  curve drawing.
CGMB214: Introduction to Computer Graphics
2D Output Primitives Points Lines Circles Ellipses Other curves Filling areas Text Patterns Polymarkers.
1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
10/15/02 (c) 2002 University of Wisconsin, CS559 Who Am I? Prof Stephen Chenney These notes will be online after the lecture – in fact they’re online already.
Midpoint Circle Algorithm
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
2D Output Primitives Points Lines Circles Ellipses Other curves Filling areas Text Patterns Polymarkers.
Scan Conversion.
CS552: Computer Graphics Lecture 17: Scan Conversion (Special Cases)
Lecture 2: 19/4/1435 Graphical algorithms Lecturer/ Kawther Abas CS- 375 Graphics and Human Computer Interaction.
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Graphics Basic Concepts 1.  A graphic is an image or visual representation of an object.  A visual representation such as a photo, illustration or diagram.
Computer Graphic. Raster graphics In computer graphics, a raster graphics image, digital image, or bitmap, is a data structure representing a generally.
Computer Graphics Inf4/MSc Computer Graphics Lecture 4 Line & Circle Drawing.
10/10/2006TCSS458A Isabelle Bichindaritz1 Line and Circle Drawing Algorithms.
Computer Graphics Lecture 07 Ellipse and Other Curves Taqdees A. Siddiqi
IT- 601: Computer Graphics Lecture-00 Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh 9/30/2016.
Rasterization, or “What is glBegin(GL_LINES) really doing?” Course web page: February 23, 2012  Lecture 4.
Scan Conversion or Rasterization
Computer Graphics Lecture 3 Computer Graphics Hardware
CS G140 Graduate Computer Graphics
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1
Scan Conversion or Rasterization
IT- 601: Computer Graphics Lecture-03 Scan Conversion
Prof. Harriet Fell Spring 2007 Lecture 5 – January 17, 2006
Images and PowerPoint Scanners usually try to save an image as a TIF or Bitmap Don’t use .bmp, or .tif files in PowerPoint They are too big They will make.
Digital Media Objective
Rasterization and Antialiasing
Rasterization and Antialiasing
Chapter 3 Graphics Output Primitives
Visuals are analog signals...
Presentation transcript:

IT- 601: Computer Graphics Lecture-03 Scan Conversion Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh 4/21/2017

Midpoint Ellipse Algorithm (x1,y1) (-x1,y1) (x1,-y1) (-x1,-y1) (-x2,y2) (-x2,-y2) (x2,y2) (x2,-y2) Implicit equation is: F(x,y) = b2x2 + a2y2 – a2b2 = 0 We have only 4-way symmetry There exists two regions In Region 1 dx > dy Increase x at each step y may decrease In Region 2 dx < dy Decrease y at each step x may increase Region 1 Region 2 S SE E

Midpoint Ellipse Algorithm Decision Parameter (Region 1) Midpoint of the vertical line connecting E and SE is used to define the following decision parameter: M E Previous Current Next SE Initial value with (0,b)

Midpoint Ellipse Algorithm Decision Parameter (Region 2) M S Previous Current Next SE

Self Study Pseudo code for midpoint ellipse algorithm Solved Problems: 3.1,3.2,3.6,3.7,3.10,3.11,3.12,3.20,3.21

Side Effects of Scan Conversion In computer graphics, a raster graphics image, or bitmap, is a dot matrix data structure representing a rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium The most common side effects when working with raster devices are: Aliasing Unequal intensity Overstrike

1. Aliasing Jagged appearance of curves or diagonal lines on a display screen, which is caused by low screen resolution. Refers to the plotting of a point in a location other than its true location in order to fit the point into the raster. Consider equation y = mx + b For m = 0.5, b = 1 and x = 3 : y = 2.5 So the point (3,2.5) is plotted at alias location (3,3) Remedy Apply anti-aliasing algorithms. Most of these algorithms introduce extra pixels and pixels are intensified proportional to the area of that pixel covered by the object.

2. Unequal Intensity Human perception of light is dependent on 1.44 1 Human perception of light is dependent on Density and Intensity of light source. Thus, on a raster display with perfect squareness, a diagonal line of pixels will appear dimmer that a horizontal or vertical line. Remedy By increasing the number of pixels on diagonal lines.

3. Overstrike The same pixel is written more than once. This results in intensified pixels in case of photographic media. Remedy Check each pixel to see whether it has already been written to prior to writing a new point.

Example rx = 8 , ry = 6 2ry2x = 0 (with increment 2ry2 = 72) 2rx2y = 2rx2ry (with increment -2rx2 = -128) Region 1 (x0, y0) = (0, 6) i pi xi+1, yi+1 2ry2xi+1 2rx2yi+1 -332 (1, 6) 72 768 1 -224 (2, 6) 144 2 -44 (3, 6) 216 3 208 (4, 5) 288 640 4 -108 (5, 5) 360 5 (6, 4) 432 512 6 244 (7, 3) 504 384 Move out of region 1 since 2ry2x > 2rx2y

Example Region 2 (x0, y0) = (7, 3) (Last position in region 1) i pi xi+1, yi+1 2ry2xi+1 2rx2yi+1 -151 (8, 2) 576 256 1 233 (8, 1) 128 2 745 (8, 0) - Stop at y = 0 6  5 4 3 2 1 7 8

Exercises Draw the ellipse with rx = 6, ry = 8. Draw the ellipse with rx = 14, ry = 10 and center at (15, 10).