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.
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.
Scan conversion of Line , circle & ellipse
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
Komputer Grafik 2 (AK045206) Scan Conversion 1/31 Scan Conversion.
2D Output Primitives Graphics packages provide basic operations (called primitive operations) to describe a scene in terms of geometric structures. The.
Raster conversion algorithms for line and circle
Output Primitives Computer Graphics.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
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)
Chapter 3 Graphics Output Primitives
Circle Drawing algo..
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.
CGMB214: Introduction to Computer Graphics
1/1/20001 Topic >>>> Scan Conversion CSE Computer Graphics.
IT- 601: Computer Graphics Lecture-03 Scan Conversion
1 CS 430/536 Computer Graphics I Circle Drawing and Clipping Week 3, Lecture 6 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent.
Dr. S.M. Malaek Assistant: M. Younesi
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.
Gradient of a Curve: this is given by the gradient of the tangent
Line Drawing and Generalization. Outline  overview  line drawing  circle drawing  curve drawing.
ELLIPSE GENERATING ALGORITHMS 1. DEFINITION Ellipse is an elongated circle. Elliptical curves can be generated by modifying circle-drawing procedures.
Image Synthesis Rabie A. Ramadan, PhD 7. 2 Image Rasterization.
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
Scan Conversion.
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Computer Graphics Inf4/MSc Computer Graphics Lecture 4 Line & Circle Drawing.
10/10/2006TCSS458A Isabelle Bichindaritz1 Line and Circle Drawing Algorithms.
Copyright © 2011 Pearson Education, Inc. Conic Sections CHAPTER 13.1Parabolas and Circles 13.2Ellipses and Hyperbolas 13.3Nonlinear Systems of Equations.
Computer Graphics Lecture 07 Ellipse and Other Curves Taqdees A. Siddiqi
Computer Graphics Lecture 06 Circle Drawing Techniques Taqdees A. Siddiqi
Scan Conversion of Line Segments. What is Scan conversion? Final step of rasterization (the process of taking geometric shapes and converting them into.
Computer Graphics : output primitives.. 2 of 32 T1 – pp. 103–123, 137–145, 147–150, 164–171 Points and LinesPoints Line Drawing AlgorithmsLine Mid–Point.
Rasterization, or “What is glBegin(GL_LINES) really doing?” Course web page: February 23, 2012  Lecture 4.
Line Drawing Algorithms 1. A line in Computer graphics is a portion of straight line that extends indefinitely in opposite direction. 2. It is defined.
Objectives Understand Bresenhams line drawing algorithm. Apply the algorithm to plot a line with the end points specified.
CS552: Computer Graphics Lecture 16: Polygon Filling.
Primitive graphic objects
Scan Conversion or Rasterization
Computer Graphics Drawing Line.
CSCE 441 Lecture 2: Scan Conversion of Lines
CS G140 Graduate Computer Graphics
(c) 2002 University of Wisconsin, CS559
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1
Scan Conversion or Rasterization
Computer Graphics Implementation I.
Lecture 05: Mid-point Ellipse algorithm Dr. Manal Helal – Fall 2014
Prof. Harriet Fell Spring 2007 Lecture 5 – January 17, 2006
Scan Conversion of Lines
Anti Aliasing.
CSCE 441 Lecture 2: Scan Conversion of Lines
Scan Conversion of Circles
Objectives Graph a line and write a linear equation using point-slope form. Write a linear equation given two points.
Digital Media Dr. Jim Rowan ITEC 2110.
Rasterizing Lines 1 Lecture 32 Mon, Nov 12, 2007.
Allah says Say, "Allah created cattle for you. In them you find warmth and benefit and from them you eat. In them there is beauty for you when you bring.
Scan Conversion (From geometry to pixels)
Chapter 10 Conic Sections.
Chapter 3 Graphics Output Primitives
OUTPUT PRIMITIVES / DISPLAY TECHNIQUES
Presentation transcript:

IT- 601: Computer Graphics Lecture-03 Scan Conversion Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh 7/28/2018

Midpoint Ellipse Algorithm 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 At region boundary: (x1,y1) (-x1,y1) (x1,-y1) (-x1,-y1) (-x2,y2) (-x2,-y2) (x2,y2) (x2,-y2) Region 1 Region 2 S SE E Gradient Vector Tangent Slope = -1

Decision Parameter (Region 1) At the next position [xi+1 + 1 = xi + 2] OR where yi+1 = yi or yi+1 = yi – 1

Decision Parameter (Region 1) Decision parameters are incremented by: Use only addition and subtraction by obtaining At initial position (0, ry)

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

Midpoint Ellipse Algorithm In 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 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. [dithering.]

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 If speed of scan conversion main then ignore By increasing the number of pixels in diagonal lines 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, such as slide or transparency 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).