Given the Y-axis values of a set (n > 3) of 2D-points that are known to be on a circle with unknown radius and center, is it possible to find these points their corresponding X-axis values? For this particular problem:
- The y-values are strictly > 0
- The circle touches the Y-axis in 1 place: the first y-value (closest to the origin)
- The circle passes through the X-axis twice, but never through the origin (0,0)
- The center of the circle is above the X-axis
- The first (closest to the origin) x-value is always 0
Or simply put: for my problem, the circle always lies to the left of the vertical axis, touching it in 1 point above the origin, so more than half the circle lies slightly above the horizontal axis.
In the image below, -only- the green dots are initially known, all else must be calculated somehow. The points of which the green dots are the vertical coordinates, are known to be on a circle (the orange circle), and the lowest green dot is never on the origin (0,0): that is the only place where the orange circle touches the black, dotted, vertical Y-axis. The green dotted segments go from the (known) green dots to the (unknown) orange points on the (unknown) circle, and turn into orange segments to the corresponding (unknown) red dots (X-axis coordinates).
So what is required are the (X-axis) values of the red dots, if you only know the green dots. In this scenario, the orange dots on the circle happen to be spread out over the circle at a constant angle (9°), but this is not necessarily always the case.
For example: given the following y-values:
yval<-c(0.10000,0.19877,0.29388,0.38298,0.46388,0.53459,0.59337,0.63877,0.66967,0.68531)
The corresponding x-values would be:
xval<-c(0.00000,-0.01564,-0.04654,-0.09194,-0.15072,-0.22143,-0.30233,-0.39143,-0.48654,-0.58531)
The radius $r$: $0.63726$
The circle center at: $(-0.6353,0.05002)$
Given these data, the coordinates of the first (lowest) orange point on the circle will be (0,0.10000) (not so clear in the image because it obviously coincides with the first green dot).
It is known that a circle with center $(h,k)$ and radius $r$ can be expressed as: $(x-h)^2 + (y-k)^2 = r^2$ but this is ofcourse not solvable here. A potential solution could be 3D-rotation maybe? Or maybe it is related to solving a set of equations?
All help is much appreciated if this problem is possible to solve.
ps: I used this simple method to estimate a circle from 3 known points (x,y): small bit of R code included per illustration: I'm sure there are computationally cheaper ways to do it:
circleFromThreePoints<-function(x1,x2,x3,y1,y2,y3)
{
vara<-x1*(y2-y3)-y1*(x2-x3)+x2*y3-x3*y2;
varb<-(x1*x1+y1*y1)*(y3-y2)+(x2*x2+y2*y2)*(y1-y3)+(x3*x3+y3*y3)*(y2-y1);
varc<-(x1*x1+y1*y1)*(x2-x3)+(x2*x2+y2*y2)*(x3-x1)+(x3*x3+y3*y3)*(x1-x2);
vard<-(x1*x1+y1*y1)*(x3*y2-x2*y3)+(x2*x2+y2*y2)*(x1*y3-x3*y1)+(x3*x3+y3*y3)*(x2*y1-x1*y2)
varx<- -varb/(2*vara)
vary<- -varc/(2*vara)
varr<- (((varb*varb)+(varc*varc)-(4*vara*vard))/(4*vara*vara))^0.5
# x, y , r:
# (x-x1)^2+(y-y1)^2 = r^2
# h,k,r for equation: (x-h)^2+(y-k)^2 = r^2
# To plot: upp<-(((r^2)-((x-h)^2))^0.5)+k & dwn<--(((r^2)-((x-h)^2))^0.5)+k
return(c(round(varx,5),round(vary,5),round(varr,5)))
}