I need to calculate the square roots of numbers in a custom circle drawing algorithm. I use this formula: $x_0 = \sqrt{(r^2 - y_0^2)}$.
I wonder if it's possible to avoid the square root calculation for the neighbors of $y_0$ by approximating the result using the already calculated $x_0$. So the question is how to approximate $x_n = \sqrt{(r^2 - (y_0+n)^2)}$ where $n$ is small. A Taylor series might work but I don't have enough mathematical background to calculate it.
Another option would be to calculate e.g. $x_0$ and $x_3$ and interpolate between them. However, it's important to keep the characteristic of the circle so a simple linear interpolation is not enough. In this case, what kind of interpolation do you suggest?
Write $x(d)=\sqrt{r^2-(y_0+d)^2}$.
The Taylor series for $x$ around $d=0$ is given by
$x(d)=x(0)+x'(0)\frac{d}{1!}+x''(0)\frac{d^2}{2!}+...$
In this case, $x'(d)=-\frac{-(y_0+d)}{\sqrt{r^2-(y_0+d)^2}}$ and so $x'(0)=\frac{y_0}{x_0}$.
So $x(d)= x_0-\frac{y_0}{x_0}d+O(d^2)$.