Solved

Center point of arc

Posted on 2001-08-17
5
1,588 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

829 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