Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Center point of arc

Posted on 2001-08-17
5
Medium Priority
?
1,603 Views
Last Modified: 2006-11-17
I've one more question please.
 There is an arc having 11 x,y points. How to calculate coordinates of center of this arc?

Thanks.
 
0
Comment
Question by:mansan
5 Comments
 
LVL 6

Accepted Solution

by:
kotan earned 105 total points
ID: 6399780

centerX = sum(x1,x2,...,x11)/11;
centerY = sum(y1,y2,...,y11)/11;

centerpoint is (centerX, centerY)
0
 

Expert Comment

by:kartik
ID: 6399879
Suppose (x,y) are the co-ordinates of the centre of arc.
Let (x1,y1) and (x2,y2) be two of the points on arc.
Then :
(x-x1)^2+(y-y1)^2=r^2 where r is the radius.
(x-x2)^2+(y-y2)^2=r^2
So equate these two equations to get the centre of circle which (x,y)
With regards,
V.Kartik
0
 
LVL 7

Expert Comment

by:peterchen092700
ID: 6400022
..and you shouldmake sure all pairs result in the same centerpoint
0
 
LVL 1

Expert Comment

by:glebspy
ID: 6400233
Sorry, that ain't right.

Given any two points, there are an infinite number of different arcs that pass through both.

You can see this because if you do what kartik suggested, you get:

(x-x1)^2+(y-y1)^2=(x-x2)^2+(y-y2)^2

1 equation with 2 unknowns (x and y) has an infinite number of solutions.


So you need *three* points, from which you can get *two* equations:

(x-x1)^2+(y-y1)^2=(x-x2)^2+(y-y2)^2
and
(x-x1)^2+(y-y1)^2=(x-x3)^2+(y-y3)^2

and now you really can solve for x and y.



kotan answered the question `how do I find the center of mass of the arc' rather than `how do I find the center of the circle of which the arc belongs to' .. if that was what you intended, then his answer is correct.
0
 

Author Comment

by:mansan
ID: 6404986
Thanks you all for kind help.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question