To draw an ellipse
To calculate an ellipse
To program an ellipse
When a point moves so that the sum of its distances from two fixed points is a constant, then the locus of the point is an ellipse.

The lengths a plus b always equal the Major Axis no matter where point A is on the ellipse.
Draw the major and minor axes as circles.

Draw radial lines out from the centre at regular intervals. (The number of lines will affect the accuracy of the ellipse)

Draw lines across from the points where the radial lines cross the minor axis circle.
Draw lines up or down from the points where the radial lines cross the major axis circle.

Join the points where these lines cross with a smooth curve to draw the ellipse.

For any given angle the x and y values can be calculated by the following method.
a = given angle to point
maj = major axis
min = minor axis
x = cos(a) * maj / 2
y = sin(a) * min / 2

In the following example 12 points on an ellipse are calculated.

Major axis = 400
Minor axis = 200
Angle will start at 0 and go up to 330 in 30 degree steps
Point 1 is at the end of the major axis and so does not need to be calculated.
x = 200 y = 0
Point 2

Point 3

Points 4 - 12 are the same calculations but with different signs.
The calculated positions are in the following table.
| a angle | x value | y value |
| 0 | 200 | 0 |
| 30 | 173.2 | 50 |
| 60 | 100 | 86.6 |
| 90 | 0 | 100 |
| 120 | -100 | 86.6 |
| 150 | -173.2 | 50 |
| 180 | -200 | 0 |
| 210 | -173.2 | -50 |
| 240 | -100 | -86.6 |
| 270 | 0 | -100 |
| 300 | 100 | -86.6 |
| 330 | 173.2 | -50 |
If plotted the points look like this.

And joined up with a smooth curve.

Bosch CC100M Controller
(START ANGLE)BWO 900 Series Controller
(P500 = Current Angle)