|
|
back to boardWA10 help I have WA 10. I think I can't find coordinates center of circle very well. I think I have presision error. because in my solution I use numbers which maybe become larger than maxlongint; if we have points. x1,y1 and x2,y2 and they are located at circle. how we can find coordinates cenrte of circle ? sorry for my bad English Re: WA10 help Posted by Kit 1 Mar 2007 00:09 There are great number of ways to define circle by two points on it. One of these: (x1 + x2)/2, (y1 + y2)/2, isn't it :) Re: WA10 help One of these: (x1 + x2)/2, (y1 + y2)/2, isn't it :) yes of course. but I missed one thing. radius should be fixed. we have points at circle x1,y1,x2,y2 and r. find the centre point of cirle which radius is r. :) how can I do it? Re: WA10 help Posted by Kit 1 Mar 2007 01:43 For example, you can consider isosceles triangle (two original points and center). You can also solve two equations: dist(p, p1) = r and dist(p, p2) = r in coordinats (but I think first way is simpler). |
|
|