UNIT-1 Bresenham’s Circle Algorithm

Slides:



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

Chapter Four Numbers: Everyone’s language.
Unit-iv.
The Graphs of Quadratic equations in completed square form Quadratic Equations.
Slide 1 Insert your own content. Slide 2 Insert your own content.
Contents In today’s lecture we’ll have a look at:
Chapters 1 & 2 Theorem & Postulate Review Answers
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Graphics Primitives: line
2 pt 3 pt 4 pt 5pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2pt 3 pt 4pt 5 pt 1pt 2pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4pt 5 pt 1pt Integer Addition Integer Subtraction.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
CS4026 Formal Models of Computation Running Haskell Programs – power.
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
BALANCING 2 AIM: To solve equations with variables on both sides.
Photo Composition Study Guide Label each photo with the category that applies to that image.
EE, NCKU Tien-Hao Chang (Darby Chang)
1 Structures. 2 Structure Basics A structure is a collection of data values, called data members, that form a single unit. Unlike arrays, the data members.
Slide 6-1 COMPLEX NUMBERS AND POLAR COORDINATES 8.1 Complex Numbers 8.2 Trigonometric Form for Complex Numbers Chapter 8.
© 2010 Pearson Education, Inc. All rights reserved
Pre-Calculus Chapter 6 Additional Topics in Trigonometry.
O X Click on Number next to person for a question.
© S Haughton more than 3?
5.9 + = 10 a)3.6 b)4.1 c)5.3 Question 1: Good Answer!! Well Done!! = 10 Question 1:
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Take from Ten First Subtraction Strategy -9 Click on a number below to go directly to that type of subtraction problems
Squares and Square Root WALK. Solve each problem REVIEW:
Created by Susan Neal $100 Fractions Addition Fractions Subtraction Fractions Multiplication Fractions Division General $200 $300 $400 $500 $100 $200.
Drawing Graphs of Quadratic Functions
2 nd Semester Final Review VI Practice and MiniQuiz.
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
Solving Equations A Solution
Lesson 10.4: Mathematical Induction
Number Line Task On your own paper:
Addition 1’s to 20.
25 seconds left…...
Subtraction: Adding UP
Test B, 100 Subtraction Facts
= 2 = 4 = 5 = 10 = 12. Estimating Non-Perfect Squares For Integers that are NOT perfect squares, you can estimate a square root = 2.83.
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
Solving Addition and Subtraction Inequalities
O X Click on Number next to person for a question.
Distributed Computing 9. Sorting - a lower bound on bit complexity Shmuel Zaks ©
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.
Larry F. Hodges (modified by Amos Johnson) 1 Design of Line, Circle & Ellipse Algorithms.
Raster conversion algorithms for line and circle
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
Chapter 3 Graphics Output Primitives
Circle Drawing algo..
CGMB214: Introduction to Computer Graphics
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.
Scan Conversion Line and Circle
Larry F. Hodges 1 Design of Line and Circle Algorithms.
MIDPOINT CIRCLE & ELLIPSE GENERARTING ALGORITHMS
CS 325 Introduction to Computer Graphics 02 / 03 / 2010 Instructor: Michael Eckmann.
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.
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.
Computer Graphics Lecture 06 Circle Drawing Techniques Taqdees A. Siddiqi
Chapter Three Part I Output Primitives CS 380.
Scan Conversion of Circles
Presentation transcript:

UNIT-1 Bresenham’s Circle Algorithm Computer Graphics By www.nskinfo.com & www.nsksofttech.com UNIT-1 Bresenham’s Circle Algorithm

Bresenham’s Circle Algorithm Consider only 45° ≤  ≤ 90° General Principle The circle function: and

Bresenham’s Circle Algorithm p1 p3 yi D(si) D(ti) yi - 1 p2 r xi xi + 1 After point p1, do we choose p2 or p3?

Bresenham’s Circle Algorithm Define: D(si) = distance of p3 from circle D(ti) = distance of p2 from circle i.e. D(si) = (xi + 1)2 + yi2 – r2 [always +ve] D(ti) = (xi + 1)2 + (yi – 1)2 – r2 [always -ve] Decision Parameter pi = D(si) + D(ti) so if pi < 0 then the circle is closer to p3 (point above) if pi ≥ 0 then the circle is closer to p2 (point below)

The Algorithm x0 = 0 y0 = r p0 = [12 + r2 – r2] + [12 + (r-1)2 – r2] = 3 – 2r if pi < 0 then yi+1 = yi pi+1 = pi + 4xi + 6 else if pi ≥ 0 then yi+1 = yi – 1 pi+1 = pi + 4(xi – yi) + 10 Stop when xi ≥ yi and determine symmetry points in the other octants xi+1 = xi + 1

Example r = 10 p0 = 3 – 2r = -17 Initial point (x0, y0) = (0, 10) i pi  9 8 7 6 5 4 3 2 1 i pi xi, yi -17 (0, 10) 1 -11 (1, 10) 2 -1 (2, 10) 3 13 (3, 10) 4 -5 (4, 9) 5 15 (5, 9) 6 9 (6, 8) 7 (7,7)

Exercises Draw the circle with r = 12 using the Bresenham algorithm. Draw the circle with r = 14 and center at (15, 10).

Decision Parameters Prove that if pi < 0 and yi+1 = yi then pi+1 = pi + 4xi + 6 Prove that if pi ≥ 0 and yi+1 = yi – 1 then pi+1 = pi + 4(xi – yi) + 10

Advantages of Bresenham circle Only involves integer addition, subtraction and multiplication There is no need for squares, square roots and trigonometric functions