0% found this document useful (0 votes)
51 views4 pages

Aligned Ellipses: B A y A X B

This document discusses algorithms for drawing aligned ellipses in computer graphics. It explains the equation for an ellipse and how to incrementally compute the changes in x and y coordinates when stepping along the ellipse. It also describes the direction changing criterion - when to switch from moving horizontally to vertically based on whether the slope of the ellipse is greater than 1. Finally, it notes a problem that can occur with aliasing when drawing ellipses.

Uploaded by

Albert Nass
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views4 pages

Aligned Ellipses: B A y A X B

This document discusses algorithms for drawing aligned ellipses in computer graphics. It explains the equation for an ellipse and how to incrementally compute the changes in x and y coordinates when stepping along the ellipse. It also describes the direction changing criterion - when to switch from moving horizontally to vertically based on whether the slope of the ellipse is greater than 1. Finally, it notes a problem that can occur with aliasing when drawing ellipses.

Uploaded by

Albert Nass
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

INTRODUCTION TO COMPUTER GRAPHICS

Aligned Ellipses
• Equation is

x2 y2
2
+ 2 =1
a b
i.e,

b 2 x 2 + a 2 y 2 = a 2b 2

• Computation of ∆ E and ∆ SE is similar


• Only 4-fold symmetry
• When do we stop stepping horizontally and switch to
vertical?

Scan Conversion 2 17/27


INTRODUCTION TO COMPUTER GRAPHICS

Direction Changing Criterion (1/2)


• When the absolute value of the slope of the ellipse is
more than 1, viz:

• How do you check this? At a point (x,y) for which


F(x,y) = 0, a vector perpendicular to the level set is
∇ F(x,y) which is

⎡ ∂F ∂F ⎤
⎢ ∂x ( x, y ), ∂y ( x, y )⎥
⎣ ⎦
• This vector points more right than up when

∂F ∂F
( x, y ) − ( x, y ) > 0
∂x ∂y

Scan Conversion 2 18/27


INTRODUCTION TO COMPUTER GRAPHICS

Direction Changing Criterion (2/2)


• In our case,
∂F
( x, y ) = 2 a 2 x
∂x
and

∂F
( x, y ) = 2b 2 y
∂y
so we check for

2a 2 x − 2b 2 y > 0
i.e.

a2 x − b2 y > 0

• This, too, can be computed incrementally

Scan Conversion 2 19/27


INTRODUCTION TO COMPUTER GRAPHICS

Problems with Aligned Ellipses

• Now in ENE octant, not ESE octant


• This problem is due to aliasing – much more on this
later

Scan Conversion 2 20/27

You might also like