Solved

Center point of arc

Posted on 2001-08-17
5
1,579 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 35 total points
Comment Utility

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

centerpoint is (centerX, centerY)
0
 

Expert Comment

by:kartik
Comment Utility
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
Comment Utility
..and you shouldmake sure all pairs result in the same centerpoint
0
 
LVL 1

Expert Comment

by:glebspy
Comment Utility
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
Comment Utility
Thanks you all for kind help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now