Type to enter a caption. Computer Graphics Week 2 Lecture 1.

Slides:



Advertisements
Similar presentations
Circle Drawing Asst. Prof. Dr. Ahmet Sayar Kocaeli University
Advertisements

CS 376 Introduction to Computer Graphics 02 / 02 / 2007 Instructor: Michael Eckmann.
Computer Graphics 4: Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling By:Kanwarjeet Singh.
Line clipping: Line clipping algorithm is method of eliminate lines of outside area of the object,so outside of object viewing is Removed. Typically, any.
1 Introduction to Computer Graphics with WebGL Prof. John Gauch CSCE Department Spring 2015 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley.
Komputer Grafik 2 (AK045206) Scan Conversion 1/31 Scan Conversion.
Clipping Lines Lecture 7 Wed, Sep 10, The Graphics Pipeline From time to time we will discuss the graphics pipeline. The graphics pipeline is the.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 2 1.
Raster conversion algorithms for line and circle
University College Dublin1 Clipping u Clipping is the removal of all objects or part of objects in a modelled scene that are outside the real-world window.
CGMB214: Introduction to Computer Graphics
Rasterizing primitives: know where to draw the line Dr Nicolas Holzschuch University of Cape Town Modified.
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
Chapter 3 Scan Conversion Lecture-02. Bresenham’s Line Algorithm Bresenham’s line algorithm – is a highly efficient incremental method for scan- converting.
Image Synthesis Rabie A. Ramadan, PhD 7. 2 Image Rasterization.
MIDPOINT CIRCLE & ELLIPSE GENERARTING ALGORITHMS
November 18, We could solve for y in terms of x ( x 0, y 0 ) are the origin points A Simple Circle Drawing Algorithm The equation for a circle.
EEL Introduction to Computer Graphics
13-4 The Sine Function Today’s Objective: I can graph the sine function.
1 Computer Graphics Clipping Fall FCC Line Clipping What happens when one or both endpoints of a line segment are not inside the specified drawing.
Midpoint Circle Algorithm
The 3 Great Trigonometric Properties. Draw 50 O in Standard Position X Y 50 O y r x P(x,y)
Graphics Graphics & Graphical Programming Lecture 23 - Viewing & Clipping.
1 Bresenham’s Circle Algorithm Define:D(s i ) = distance of p 3 from circle D(t i ) = distance of p 2 from circle i.e.D(s i ) = (x i + 1) 2 + y i 2 – r.
1 Module U08181: Computer Graphics graphics primitives part 1: scan conversion and filling.
Objective – Students will be able to investigate graphs with different viewing windows or viewing screens. Therefore learning how important it is to choose.
CS552: Computer Graphics Lecture 17: Scan Conversion (Special Cases)
Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
1 U08181 Computer Graphics Clipping Transformations –Transformations and matrices –Homogeneous matrices –Transformations in SVG.
Computer Graphics Lecture 06 Circle Drawing Techniques Taqdees A. Siddiqi
Scan Conversion or Rasterization
CENG 477 Introduction to Computer Graphics
MID-POINT CIRCLE ALGORITHM
Computer Graphics Lecture 14 CLIPPING I Taqdees A. Siddiqi
Lecture 31 – Conic Sections
Computer Graphics Filling.
CS G140 Graduate Computer Graphics
Trigonometric Functions Review
(c) 2002 University of Wisconsin, CS559
Basic Raster Graphics Algorithms for Drawing 2D Primitives
Polar Coordinates Graphs of Polar Equations
What is a Unit Circle? A unit circle is a circle with a radius of one
Scan Conversion or Rasterization
Computer Graphics Implementation I.
Lecture 05: Mid-point Ellipse algorithm Dr. Manal Helal – Fall 2014
Chapter Three Part I Output Primitives CS 380.
Anti Aliasing.
Graphics Pipeline Clipping
Image Processing, Leture #12
Scan Conversion of Circles
WINDOWING AND CLIPPING
Warmup NO CALCULATORS Convert into radians or degrees.
CSCE 441 Computer Graphics: Clipping Lines Jinxiang Chai
Introduction to Computer Graphics
CSCE 441 Computer Graphics: Clipping Lines Jinxiang Chai
WINDOWING AND CLIPPING
Segment Clipping Simple algorithm. For each segment compute the intersection with the four sides of the rectangle, and then determine which sub-segment.
Scan Conversion (From geometry to pixels)
Chapter 3 Graphics Output Primitives
Finding Basic Shapes Hough Transforms
Basic Raster Graphics Algorithms for Drawing 2D Primitives
Clipping Clipping Sutherland-Hodgman Clipping
Type to enter a caption. Computer Graphics Week 1 Lecture 2.
Type to enter a caption. Computer Graphics Week 4 Lecture 2.
Computer Graphics Implementation.
Type to enter a caption. Computer Graphics Week 3 Lecture 1.
Type to enter a caption. Computer Graphics Week 6 Lecture 1.
Presentation transcript:

Type to enter a caption. Computer Graphics Week 2 Lecture 1

Circle Drawing ALGORITHM

Basics Cartesian Equation: x2+y2=r2 or f(x,y)= x2+y2-r2 = 0 In terms of trigonometric functions: x=r sin θ y=r cos θ for 00<=θ<3600

Basics F(x1,y1) = x12+y12-r2 = 0 → Point lies on the circle F(x2,y2) = x22+y22-r2 > 0 → Point lies outside the circle F(x3,y3) = x32+y32-r2 < 0 → Point lies inside the circle

8 Way Symmetry In circle if we just draw points in one octant we can get points in rest of the octants by suitable reflections

8 Way Symmetry

Bresenham Algorithm We will calculate in just 2nd octant Assume starting pixel P is on y-axis To find next pixel , see if M is inside or outside of circle if d <=0 choose E , else choose SE deltaE = 2xp + 3 deltaSE =2(xp-yp)+5

dstart In start xp=0 and yp=R (radius) f(M) = f(xp+1, yp - 1/2) = f(0+1,R-1/2) = dstart dstart = 1-R

Pseudo Code

Filling Rectangles for (ymin to ymax) for (xmin to xmas) WritePixel(x,y,value) ymax ymin xmin xmax

Pattern Filling

Line Styles Define the line style as a 16-bit , bit string if(bitstring[i%16]) WritePixel(x,y,value);

Thickening Primitives 3 techniques are used: Replicating Pixels Moving Pen Filling area between 2 boundaries

Replicating Pixels

Moving Pen

Filling Area b/w Boundaries

The End

Slide 1

Text

TEXT [TEXT]

Text

Text –Johnny Appleseed