• Welcome to Valhalla Legends Archive.
 

Distance between 2 points

Started by Mr. Neo, October 17, 2004, 08:46 PM

Previous topic - Next topic

Mr. Neo

I seem to be having a bit of a problem on this math problem, perhaps one of you math wizards could shed some insight into my problem?

Let's say that I have a circle shaped figure and I have a list of points that are defined on the outer rim of this figure.  How would I go about taking two points and find the distance inbetween them?  This would be similar to how you use the Pythagorean Theorem to find the distance between two points on a right triangle.  Is there an equation similar to this that works with a circle?

Thanks,

Yoni

By "distance" you mean the length of the circle's circumference between the 2 points?

Mr. Neo


Yoni

#3
Aha. I will post the solution within 24 hours if someone else doesn't.

Edit: Actually it's simpler than I thought. Don't wait 24 hours. Here is a walkthrough:

1. Name the given 2 points "A" and "B", and name the center of the circle "O". The length of the radius is R.
2. Find the angle <AOB in RADIANS.
3. The solution is: R * <AOB

That's it :)

Justification: Think about it. The entire circumference is R * 2pi. 2pi is a central angle that covers the entire circle. So an angle that covers only "alpha" would be R * alpha.

Mr. Neo

Thank you very much Yoni, it works perfectly.  :)

TheMinistered

#5
Well, yoni's example seems a bit overcomplicated-- just use the distance formula.

Distance = SquareRoot( (x2 - x1)^2 + (y2 - y1)^2 )


However, I'm assuming you didn't mean a straight line, but rather the distance between the two points traveling along the edge of the circle.

j0k3r

If you're assuming he meant the distance around the edge, why did you leave your solution? Also, what if the circle doesn't lie on a cartesian plane? Your solution is relying on two points with values, while Yoni's requires only the radius and two points no matter what their value.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

dxoigmn

What about a formula for the distance between 2 points on a conic section with a given eccentricity?  (for a circle, eccentricity = 0)