1. Read radii rx and ry

2. Initialize starting point x=0

y=ry

3. Calculate initial value of decision parameter in region 1:

d1=ry²-rx²ry + (1/4) rx²

4. Initialize dx and dy

dx= 2 ry²x

dy= 2 rx²y

5. do

{

Plot (x,y)

If (d1<0)

{

x=x+1

y=y

dx= dx+ 2ry²

d1= d1+ dx+ ry²

[ d1= d1+ 2 ry²x + 2ry² + ry²]\

}

else

{

x=x+1

y=y-1

dx= dx+ 2 ry²

dy=dy- 2 rx²

d1= d1+ dx-dy + ry²

[ d1= d1+ d1+ 2 ry²x + 2ry² – (2 rx²y -2 rx²) + ry²]

}

While (dx<dy)

6. Calculate initial value of decision parameter in region 2:

d2= ry² ( x+ (1/2)) + rx² (y-1)² – rx² ry²

7. do

{

Plot (x,y)

If (d2>0)

{

x=x

y=y-1

dy=dy-2 rx²

d2=d2-dy+ rx²

[d2= d2- (2 rx²y – 2rx²) + rx²]

}

else

{

x=x+1

y=y-1

dy=dy-2 rx²

dx= dx+ ry²

d2= d2+dx-dy+ rx²

[d2= d2+ 2 ry²x + 2 ry² – (2 rx²y – 2rx²) + ry²]

}

While (y>0)

8. Determine symmetrical points in other 3 quadrants.

9. Stop.

## Leave a Reply