Solved

Center point of arc

Posted on 2001-08-17
5
1,589 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Arduino EDI - Programming language 3 115
Dialogbox API leak? 18 109
How to convert Structure to vector of byte and vice versa 5 31
Gaming Software 1 29
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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

756 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