ELLIPSE GENERATING ALGORITHMS 1. DEFINITION Ellipse is an elongated circle. Elliptical curves can be generated by modifying circle-drawing procedures.

Slides:



Advertisements
Similar presentations
CS 450: COMPUTER GRAPHICS DRAWING ELLIPSES AND OTHER CURVES SPRING 2015 DR. MICHAEL J. REALE.
Advertisements

10.4 Ellipses p An ellipse is a set of points such that the distance between that point and two fixed points called Foci remains constant d1 d2.
Mathematics.
Lesson 10-1: Distance and Midpoint
Ellipse An ellipse is the set of points in a plane for which the sum of the distances from two fixed points is a given constant. The two fixed points.
Section 11.6 – Conic Sections
Section 9.1 The Ellipse.
Chapter 3 Graphics Output Primitives
Circle Drawing algo..
Ellipses Unit 7.2. Description Locus of points in a plane such that the sum of the distances from two fixed points, called foci is constant. P Q d 1 +
Conic Sections. (1) Circle A circle is formed when i.e. when the plane  is perpendicular to the axis of the cones.
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.
WHERE TO DRAW A LINE?? Line drawing is accomplished by calculating intermediate positions along the line path between specified end points. Precise definition.
Scan Conversion Line and Circle
CS 450: COMPUTER GRAPHICS REVIEW: DRAWING ELLIPSES AND OTHER CURVES SPRING 2015 DR. MICHAEL J. REALE.
9.1.1 – Conic Sections; The Ellipse
CHAPTER 9 CONIC SECTIONS.
Unit #4 Conics. An ellipse is the set of all points in a plane whose distances from two fixed points in the plane, the foci, is constant. Major Axis Minor.
1 Circle Drawing Algorithms Pictures snagged from
Introduction Computer Graphics & Its application Types of computer graphics Graphic display : random Scan & Raster Scan display Frame buffer and video.
Graphics Output Primitives
Chapter 9: Quadratic Relations and Systems Section 9-3: Ellipses.
Review Day! Hyperbolas, Parabolas, and Conics. What conic is represented by this definition: The set of all points in a plane such that the difference.
MIDPOINT CIRCLE & ELLIPSE GENERARTING ALGORITHMS
11.3 Ellipses Objective: By the end of the lesson, you should be able to write an equation of an ellipse and sketch its graph.
Section 7.3 – The Ellipse Ellipse – a set of points in a plane whose distances from two fixed points is a constant.
Copyright © Cengage Learning. All rights reserved. 9.3 Hyperbolas and Rotation of Conics.
Midpoint Circle Algorithm
CS 325 Introduction to Computer Graphics 02 / 03 / 2010 Instructor: Michael Eckmann.
Ellipses Topic 7.4. Definitions Ellipse: set of all points where the sum of the distances from the foci is constant Major Axis: axis on which the foci.
Conics Review Study Hard!. Name the Conic without graphing and write it in standard form X 2 + Y 2 -4Y-12=0.
SECTION: 10-2 ELLIPSES WARM-UP
Conic Sections.
 You probably know the ellipse by its more well-known name: the oval.  An ellipse looks like a circle that has been stretched out.
The Ellipse.
Warm up Write the standard form of the equation: Then find the radius and the coordinates of the center. Graph the equation.
Hyperbolas. Hyperbola: a set of all points (x, y) the difference of whose distances from two distinct fixed points (foci) is a positive constant. Similar.
MTH 253 Calculus (Other Topics) Chapter 10 – Conic Sections and Polar Coordinates Section 10.1 – Conic Sections and Quadratic Equations Copyright © 2009.
Warm-Up Write the standard equation of the circle with the given radius and center. 1) 9; (0,0) 2) 1; (0,5) 3) 4; (-8,-1) 4) 5; (4,2)
Making graphs and using equations of ellipses. An ellipse is the set of all points P in a plane such that the sum of the distance from P to 2 fixed points.
Ellipses Objectives: Write the standard equation for an ellipse given sufficient information Given an equation of an ellipse, graph it and label the center,
Conics. Conic Sections - Definition A conic section is a curve formed by intersecting cone with a plane There are four types of Conic sections.
Hyperbolas Objective: graph hyperbolas from standard form.
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Write Bresenham’s algorithm for generation of line also indicate which raster locations would be chosen by Bresenham’s algorithm when scan converting.
10.2 Ellipses. Ellipse – a set of points P in a plane such that the sum of the distances from P to 2 fixed points (F 1 and F 2 ) is a given constant K.
Computer Graphics Lecture 07 Ellipse and Other Curves Taqdees A. Siddiqi
Computer Graphics Lecture 06 Circle Drawing Techniques Taqdees A. Siddiqi
Objectives Understand Bresenhams line drawing algorithm. Apply the algorithm to plot a line with the end points specified.
MID-POINT CIRCLE ALGORITHM
Lecture 05: Mid-point Ellipse algorithm Dr. Manal Helal – Fall 2014
Chapter Three Part I Output Primitives CS 380.
6-3 Conic Sections: Ellipses
Conic Sections College Algebra
10.2 Ellipses.
Scan Conversion of Circles
6-3 Conic Sections: Ellipses
MATH 1330 Section 8.2b.
Chapter 9 Conic Sections.
Section 10.2 – The Ellipse Ellipse – a set of points in a plane whose distances from two fixed points is a constant.
Ellipses Ellipse: set of all points in a plane such that the sum of the distances from two given points in a plane, called the foci, is constant. Sum.
Chapter 10 Conic Sections
Ellipses Objectives: Write the standard equation for an ellipse given sufficient information Given an equation of an ellipse, graph it and label the center,
9.4 Graph & Write Equations of Ellipses
4 minutes Warm-Up Write the standard equation of the circle with the given radius and center. 1) 9; (0,0) 2) 1; (0,5) 3) 4; (-8,-1) 4) 5; (4,2)
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 11.6 – Conic Sections
L10-4 Obj: Students will find equations for ellipses and graph ellipses. Ellipse Definition: Each fixed point F is a focus of an ellipse (plural: foci).
Presentation transcript:

ELLIPSE GENERATING ALGORITHMS 1

DEFINITION Ellipse is an elongated circle. Elliptical curves can be generated by modifying circle-drawing procedures to take into account the different dimensions of an ellipse along the major and minor axes. 2

P ROPERTIES OF ELLIPSES Distances from any point on the ellipse to two fixed positions called the foci of the ellipse. Sum of these two distances is the same values for all points on the ellipse. d1+d2=constant 3

Expressing distances d1 and d2 in terms of the focal coordinates F1=(x 1,y 2 ) and F 2 =(x 2,y 2 ) sqrt((x-x 1 ) 2 +(y-y 1 ) 2 )+sqrt((x-x 2 ) 2 +(y-y 2 ) 2 )=constant The general ellipse equation in the form Ax2+By2+Cxy+Dx+Ey+F=0 Coefficients A,B,C,D,E, and F are evaluated in terms of the focal coordinates and the dimensions of the major and minor axes of the ellipse. 4

The major axis is the straight line segment extending from one side of the ellipse to the other through the foci. The minor axis spans the shorter dimension of the ellipse, perpendicularly bisecting the major axis at the halfway position (ellipse center) between the two foci. 5

((x-x c )/r x ) 2 +((y-y c )/r y ) 2 =1 Polar coordinates r and θ x=xc+rxcos θ y=yc+rxsin θ 6

M IDPOINT ELLIPSE A LGORITHM The Ellipse function is f ellipse (x,y)=r y 2 x 2 +r x 2 y 2 –r x 2 r y 2 which has the following properties: f ellipse (x,y)  <0, if (x,y) is inside the ellipse boundary  =0, if(x,y) is on ellipse boundary  >0, if(x,y) is outside the ellipse boundary 7

R EGION 1 AND 2 CAN BE PROCESSED IN VARIOUS WAYS STEP 1 : Start at position (0,ry) and step clockwise along the elliptical path in the first quadrant shifting from unit steps in x to unit steps in y when the slope becomes less than -1 STEP2 : Start at (rx,0) and select points in a counter clockwise order. Shifting from unit steps in y to unit steps in x when the slope becomes greater than Using parallel processors calculate pixel positions in the two regions simultaneously STEP 3: Start at (0,ry) step along the ellipse path in clockwise order throughout the first quadrant ellipse function (xc,yc)=(0,0) f ellipse (x,y)=r y 2 x 2 +r x 2 y 2 –r x 2 r y 2 8

STEP 4: Check the properties Ellipse function f ellipse (x,y) serves as the decision parameter in the midpoint algorithm. Starting at (0,ry) The ellipse slope is calculated dy/dx= -(2r y 2 x/2r x 2 y) At the boundary between region 1 and region 2 dy/dx = r y 2 x=2r x 2 y Move out of region 1 ; 2r y 2 x>=2r x 2 y 9

To determine the next position along the ellipse path by evaluating the decision parameter at this mid point P1 k = f ellipse (x k+1,y k - 1/2) = r y 2 (x k+1 ) 2 + r x 2 (y k -1/2) 2 – r x 2 r y 2 if P1 k <0, Midpoint is inside the ellipse Otherwise the midpoint is outside Next sampling position (xk+1+1=xk+2) the decision parameter for region 1 is calculated as p1 k+1 = f ellipse (x k+1 +1,y k+1 -½ ) =r y 2 [(x k +1 ) + 1] 2 + r x 2 (y k+1 -½) 2 - r x 2 r y 2 OR p1 k+1 = p1 k +2 r y 2 (x k +1 ) + r y 2 + r x 2 [(y k+1 -½) 2 - (y k -½) 2 ] Where y k+1 is y k or y k-1 depending on the sign of P1 k. 10

Decision parameters are incremented by the following amounts increment = { 2 r y 2 (x k +1 ) + r y 2 if p1 k <0 } { 2 r y 2 (x k +1 ) + r y 2 - 2r x 2 y k+1 if p1 k ≥ 0 } Increments for the decision parameters can be calculated using only addition and subtraction as in the circle algorithm. The terms 2ry 2 x and 2rx 2 y can be obtained incrementally. At the initial position (0,ry) these two terms evaluate to 2 r y 2 x = 0 2r x 2 y =2r x 2 r y 11

Decision parameter is evaluated as p1 0 = f ellipse (1,r y -½ ) = r y 2 + r x 2 (r y -½) 2 - r x 2 r y 2 Or p1 0 = r y 2 - r x 2 r y + ¼ r x 2 12

REGION 2 For this region, the decision parameter is evaluated as p2 k = f ellipse (x k +½,y k - 1) = r y 2 (x k +½ ) 2 + r x 2 (y k - 1) 2 - r x 2 r y 2 P2 k+1 = f ellipse (x k+1 +½,y k+1 -1 ) = r y 2 (x k +½) 2 + r x 2 [(y k+1 -1) -1] 2 - r x 2 r y 2 or p2 k+1 = p2 k -2 r x 2 (y k -1 ) + r x 2 + r y 2 [(x k+1 +½) 2 - (x k +½) 2 ] Decision parameter for region 2 p2 0 = f ellipse (x 0 +½,y 0 - 1) = r y 2 (x 0 +½ ) 2 + r x 2 (y 0 - 1) 2 - r x 2 r y 2 13

ALGORITHM 14