0
$\begingroup$

I know that If I have 3 points I will have this center (I calculated this)

a=\left[\begin{matrix}x1^2+y1^2&y1&1\\x2^2+y2^2&y2&1\\x3^2+y3^2&y3&1\\\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\\end{matrix}\right] \right]

b=\left[\begin{matrix}x1&x1^2+y1^2&1\\x2&x2^2+y2^2&1\\x3&x3^2+y3^2&1\\\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\\end{matrix}\right] \right]

But I have no 3 point I have 100 points Now how will change this formula I think mtrice will be: a= \left[\begin{matrix}x1^2+y1^2&y1&1\\x2^2+y2^2&y2&1\\x3^2+y3^2&y3&1\\xn^2+yn^2&y&1\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\xn&yn&1\end{matrix}\right]\right]

and b=\left[\begin{matrix}x1&x1^2+y1^2&1\\x2&x2^2+y2^2&1\\x3&x3^2+y3^2&1\\xn&xn^2+yn^2&1\end{matrix}/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\xn&yn&1\end{matrix}\right]\right]
/ 2*\left[\begin{matrix}x1&y1&1\\x2&y2&1\\x3&+y3&1\\xn&yn&1\end{matrix}\right]

Is it true ?? I apologise for my bad syntax but I dont know how I can matrices syntax and I looked advanced help but I dont find it

$\endgroup$
7
  • 2
    $\begingroup$ Use mathjax please $\endgroup$
    – N.S.JOHN
    Commented May 22, 2016 at 1:23
  • $\begingroup$ Here is a nice tutorial on how to format using MathJax. $\endgroup$
    – Théophile
    Commented May 22, 2016 at 1:32
  • $\begingroup$ $\left[\begin{matrix}a&b\\c&d\end{matrix}\right]$. If you'd like to see how this was done, hover mouse over formula, right click, and select "Show math as / TeX commands." $\endgroup$
    – ForgotALot
    Commented May 22, 2016 at 2:48
  • $\begingroup$ Use any three points. If they're all exactly on circle boundary then the results will be the same every time. If the points are approximate then you'll have to resort to sampling various sets of 3 points and compare and aggregate the different centers they calculate to. $\endgroup$ Commented May 22, 2016 at 6:11
  • $\begingroup$ Thanks @ForgotALot How can I do matrix over? $\endgroup$
    – j.doe
    Commented May 22, 2016 at 12:35

1 Answer 1

1
$\begingroup$

For the problem of circular regression not using matrices, I suggest you have a look to JJacquelin's anwer to this post. The method is simple and accurate.

Using matrices, the method is fully described in JJacquelin's book (page 11). The book is in French but you will not have any problem.

Another possible method that I shall describe will show you the matrices to write.

Considering that you have $n$ data points $(x_i,y_i)$ more or less along a circle with center $(a,b)$ and radius $r$, you can write $n$ equations $$E_i=(x_i-a)^2+(y_i-b)^2-r^2=0$$ Consider now $$F_{ij}=E_i-E_j=2(x_j-x_i)a+2(y_j-y_i)b=(x_j^2+y_j^2)-(x_i^2+y_i^2)$$ To avoid the bias of selecting one point $i$ as the reference you can write all possible equations $F_{ij}$ using $(i=1,2,\cdots,n-1)$ and $j=(i+1,i+2,\cdots,n)$. This makes a large system of $\frac 12 n (n-1)$ linear equations for which the matrices are simple.

When you have computed $(a,b)$, just use any of the equations $E_i$ to get the radius.

$\endgroup$
1
  • $\begingroup$ Thank you so much :) This method is good and clear for me But I want to ask a question Is my method wrong? Because I will write a code for this problem and I can easily write a code for matrices but sum is not easy $\endgroup$
    – j.doe
    Commented May 22, 2016 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .