I am writing a library for graphical LCDs and I want to incorporate a function to draw a circle on the screen. I have already succeeded in drawing simple circles, however, I want to be able to pass a list of radiuses to the functions and have something like a crude ellipse drawn whose radius changes according to the passed list.
For example, if I pass it the radiuses [20, 40, 20, 40], I want it to draw an ellipse where the radius changes from 20 to 40 during the first 90 degrees, then from 40 to 20 and so on. Note that I want to be able to pass any amount of radiuses, so that I could draw other crude circles as well.
I plot the points of the circle by interpolating between the given radiuses and calculating the exact radius for each of 360 steps.
My problem is that if I use linear interpolation, I get something like this.
It would be great if anyone could help me find a way to interpolate without getting those dents in the ellipse.