Arc of impossibility?

MrAl

Joined Jun 17, 2014
13,711
I have some software which finds points along an arc.
The arc starts at (X1, Y1) and ends at (X2, Y2) and has radius R

The software evaluates the following expression and if it is true says that the arc is impossible.
How does this work, please?

4 * R ^ 2 < ((X2 - X1) ^ 2 + (Y2 - Y1) ^ 2)
Hi,

Just wondering if you tried to prove or disprove that.
 

MrAl

Joined Jun 17, 2014
13,711
All that is saying is that the distance between two points on a circular arc can't be greater than the diameter of the arc.
Hi,

Thanks for the reply.

What i meant though was is that formula actually proven?
In other words, given a radius and given two points is there ever a time when the formula indicates that the arc is impossible when it really is certainly possible, when the tolerance due to floating point is not an issue.
 

MrAl

Joined Jun 17, 2014
13,711
Alec_t pretty much did that with post #2
Hi,

Also see post just before this one. For example, what is the origin of that formula.

BTW tolerance in numerical calculations is almost never about a constant value like FPtol or whatever. That's because floats by their very nature change in stature. In one problem we might be dealing with R=1e6 while in another problem it might be 1e-6. Now i know you probably dont have a range that wide, but the better way to define a tolerance is to define it as a percentage of what is being compared.
So for example instead of tol=0.001 we would instead use:
tol=R/1000

and now 'tol' scales with R.

So to favor rejection, we would use:
4*(R-R/1000)^2

and to favor acceptance we would use:
4*(R+R/1000)^2

So what we are after is percentage error rather than absolute error.

You can look at various real life situations and see if you want to use 1000 or 10000 or whatever as the dividing value.
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,626
Hi,

Also see post just before this one. For example, what is the origin of that formula.

BTW tolerance in numerical calculations is almost never about a constant value like FPtol or whatever. That's because floats by their very nature change in stature. In one problem we might be dealing with R=1e6 while in another problem it might be 1e-6. Now i know you probably dont have a range that wide, but the better way to define a tolerance is to define it as a percentage of what is being compared.
So for example instead of tol=0.001 we would instead use:
tol=R/1000

and now 'tol' scales with R.

So to favor rejection, we would use:
4*(R-R/1000)^2

and to favor acceptance we would use:
4*(R+R/1000)^2

So what we are after is percentage error rather than absolute error.

You can look at various real life situations and see if you want to use 1000 or 10000 or whatever as the dividing value.
In this case, the resulting code is for controlling a CNC router. The smallest step that the router is capable of is 0.025mm. So there is no point in calculations being much more exact than that. This applies whether the movement is 0.1mm or 180mm therefore an absolute tolerance makes sense for this application.
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,626
What i meant though was is that formula actually proven?
What the formula does is to calculate the distance between the two given points and the diameter of the circle the arc must be part of (twice the radius). Obviously if the diameter is less than the distance between the two points then those two points cannot be on a circle of that diameter.
 

WBahn

Joined Mar 31, 2012
32,887
Hi,

Thanks for the reply.

What i meant though was is that formula actually proven?
In other words, given a radius and given two points is there ever a time when the formula indicates that the arc is impossible when it really is certainly possible, when the tolerance due to floating point is not an issue.
What kind of proof are you looking for?

What is the furthest apart that two points on a circular arc can possibly be? Diametrically opposed.

Thus if the distance between two points, d, is greater than the diameter, D, of the circular arc, it is impossible to draw a circular arc that passes through both points.

Therefore we have the requirement that the arc is impossible is

D < d

If R is the radius of the arc, the diameter is D = 2R.

What is the distance between the point <X1,Y2> and <X2,Y2>?

d = sqrt( (X2 - X1)² + (Y2 - Y1)² )

Substituting in we have

D < d
2R < sqrt( (X2 - X1)² + (Y2 - Y1)² )

Squaring both sides we have

(2R)² < sqrt²( (X2 - X1)² + (Y2 - Y1)² )

4·R² < (X2 - X1)² + (Y2 - Y1)²
 

MrAl

Joined Jun 17, 2014
13,711
In this case, the resulting code is for controlling a CNC router. The smallest step that the router is capable of is 0.025mm. So there is no point in calculations being much more exact than that. This applies whether the movement is 0.1mm or 180mm therefore an absolute tolerance makes sense for this application.
Hi again,

I need to update my last reply, but first i realize that there is a MINIMUM size like 0.025mm. That seems to imply that using say 0.01 would be good enough. But you are dealing with a pass/fail test which depends highly on the assumed measurements i would think.
This is a problem similar to an ADC i think where we dont get accurate readings when the input voltage is very low. That is the percent error changes as the voltage gets lower. We can look at this.

For example, if the measurement is 100mm then 0.01 is probably fine. But if the measurement is 0.1mm then 0.01 is just one tenth of that so the percent error in the determination is 10 percent while before it was insignificant.

Now let's use an adaptive tolerance (and this is partly an update on my last reply).
With the 100mm measurement and a factor of 1000, we would accept anything between 100-0.1 and 100+0.1.
With the 0.1mm measurement we would accept anything between 0.1-0.0001 and 0.1+0.0001.
If we did not use an adaptive tolerance it would have been 0.1-0.01 and 0.1+0.01. Now if that's ok with you then fine, but you see how this works.

The overall idea with measurements is you try to make the most out of the measurement.

The update is that i believe you should apply a plus and minus tolerance, even if it is a constant like 0.01 and that is because measurements are plus and minus. Thus instead of 4*R^2 we would accept anything between 4*(R-tol)^2 and 4*(R+tol)^2.

Also, does the program see the center of the circle too (h,k) ?
 
Last edited:

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,626
The update is that i believe you should apply a plus and minus tolerance, even if it is a constant like 0.01 and that is because measurements are plus and minus. Thus instead of 4*R^2 we would accept anything between 4*(R-tol)^2 and 4*(R+tol)^2.
This test is just to determine if the arc is possible. R-tol could reject a valid arc. It is necessary to eliminate an impossible arc to avoid problems later in the calculations but it would not be good to reject a valid arc. This is what was happening and I was trying to understand why and hence I started this thread.

Also, does the program see the center of the circle too (h,k) ?
This part of the program is calculating the coordinates of the centre of the circle the arc is part of.
 

MrAl

Joined Jun 17, 2014
13,711
What kind of proof are you looking for?

What is the furthest apart that two points on a circular arc can possibly be? Diametrically opposed.

Thus if the distance between two points, d, is greater than the diameter, D, of the circular arc, it is impossible to draw a circular arc that passes through both points.

Therefore we have the requirement that the arc is impossible is

D < d

If R is the radius of the arc, the diameter is D = 2R.

What is the distance between the point <X1,Y2> and <X2,Y2>?

d = sqrt( (X2 - X1)² + (Y2 - Y1)² )

Substituting in we have

D < d
2R < sqrt( (X2 - X1)² + (Y2 - Y1)² )

Squaring both sides we have

(2R)² < sqrt²( (X2 - X1)² + (Y2 - Y1)² )

4·R² < (X2 - X1)² + (Y2 - Y1)²
Hello again,

Thanks for the reply.

I suppose the limiting case for the two points is the solutions to the intersection of a straight line and circle where the straight line passes through the center of the circle. That comes about for example when we have two points that can have the given radius, but then when we move one point say to the right away from the other point it still works, but once we move so far away 2 times the radius will not stretch across the two points so it cant be a circle with radius R. However, it can still be on a circle of radius R+dr. I think that was what was bothering me, but then we could not stick to that R constraint and without that constraint two points can be said to always be on a circle except in the other limiting case where both points are the same.

I was hoping for a geometrical solution where say we find the center of the circle (or should i say two centers). We might be able to derive the solution that way too and that would be a secondary way to derive the given solution. If the two points were too far away from each other we'd get no solution or just an imaginary solution. If i get a chance i'll see if i can come up with something here unless someone else wants to.
 

MrAl

Joined Jun 17, 2014
13,711
This test is just to determine if the arc is possible. R-tol could reject a valid arc. It is necessary to eliminate an impossible arc to avoid problems later in the calculations but it would not be good to reject a valid arc. This is what was happening and I was trying to understand why and hence I started this thread.


This part of the program is calculating the coordinates of the centre of the circle the arc is part of.
Hello,

I think you misunderstood the meaning of R-tol and R+tol.

The main idea is that you calculate a distance:
D=sqrt((x2-x1)^2+(y2-y1)^2)

and then want to know if that is greater than R:
D>R

and if it is then the two points can not be on a circle with the given radius.

Now in comparing D>R we might see:
2>1

which is not a problem, or we might see:
2>1.98

and if we have tol=0.01 then we have two cases:
2>1.99
2>0.97

and it passes both tests so D is bigger.

Now if we have:
2>1.99

we have two cases:
2>1.98
2>2.00

so it failed one test and so D is not bigger.

I say this because the tolerance on the measurements 1.98 and 1.99 are PLUS and MINUS not just one or the other.
Of course if you are happy with just doing the one test then you dont have to worry about it.

[LATER]
What the plus and minus 'tol' really means geometrically is that we have what we think is an arc of a true circle, and what we do is draw another circle inside that one, then another circle outside the first one. So the test circle is inside the outer circle and outside the inner circle. The inner circle has radius R-tol and the outer circle has radius R+tol, so we give the test circle a little leeway to be off in any direction, but just off by a small amount otherwise it will still fail.
 
Last edited:

WBahn

Joined Mar 31, 2012
32,887
Hello again,

Thanks for the reply.

I suppose the limiting case for the two points is the solutions to the intersection of a straight line and circle where the straight line passes through the center of the circle. That comes about for example when we have two points that can have the given radius, but then when we move one point say to the right away from the other point it still works, but once we move so far away 2 times the radius will not stretch across the two points so it cant be a circle with radius R. However, it can still be on a circle of radius R+dr. I think that was what was bothering me, but then we could not stick to that R constraint and without that constraint two points can be said to always be on a circle except in the other limiting case where both points are the same.

I was hoping for a geometrical solution where say we find the center of the circle (or should i say two centers). We might be able to derive the solution that way too and that would be a secondary way to derive the given solution. If the two points were too far away from each other we'd get no solution or just an imaginary solution. If i get a chance i'll see if i can come up with something here unless someone else wants to.
Sounds like a very complicated way to get a conceptually simple answer, but okay.

Would you agree that we can do a coordinate transformation such that we shift the two points to locations on the x-axis such that one is at <+p, 0> and the other is at <-p, 0> where the distance between the two points is d = 2p?

Now, how much detail is needed to support the construction involved?

Draw a circle of radius R around each point. Either those circles intersect or they don't.

What is the bounding case whereby they intersect at a single point?

What is the relationship between the distance between the two points and the radius of the circle at that bounding case?
 

MrAl

Joined Jun 17, 2014
13,711
Sounds like a very complicated way to get a conceptually simple answer, but okay.

Would you agree that we can do a coordinate transformation such that we shift the two points to locations on the x-axis such that one is at <+p, 0> and the other is at <-p, 0> where the distance between the two points is d = 2p?

Now, how much detail is needed to support the construction involved?

Draw a circle of radius R around each point. Either those circles intersect or they don't.

What is the bounding case whereby they intersect at a single point?

What is the relationship between the distance between the two points and the radius of the circle at that bounding case?
Hello,

Thanks for the reply.

Actually i was thinking more of a mathematical proof, where the result is either the same equation or another equation.
 

WBahn

Joined Mar 31, 2012
32,887
Hello,

Thanks for the reply.

Actually i was thinking more of a mathematical proof, where the result is either the same equation or another equation.
I gave you a mathematical derivation of the equation and you said you wanted a geometric proof. I then described a geometric construction that results in the same conclusion and you say you want a mathematical proof.

Please make up your mind.

Any proof has to start with a declaration of what the constraints are.

What is so hard to understand about the notion that the furthest apart that any two points can be if they lie on the same circle is 2·R ?

What is so hard to understand about the notion that the distance between two points is sqrt[(x2-x1)² + (y2-y1)²] ?

What is so hard to understand about the notion that if these two points lie on the same circle of radius R then the distance between them must satisfy the constraint

sqrt[(x2-x1)² + (y2-y1)²] ≤ 2·R

What is so hard to understand about the contrapositive of this, namely that if

sqrt[(x2-x1)² + (y2-y1)²] > 2·R

is true then the two points cannot lie on the same circle of radius R.

What is so hard to understand that, since both sides are nonnegative, that squaring both sides does not effect the inequality

(x2-x1)² + (y2-y1)² > (2·R)²

(x2-x1)² + (y2-y1)² > 4·R²

If it will make you happier, use analytic geometry.

Define three points

P1 = <X1,Y1>
P2 = <X2,Y2>
Pr = <Xr,Yr>

Define the following vectors:

P12 = vector from P1 to P2
P1r = vector from P1 to Pr
Pr2 = vector from Pr to P2

Clearly

P12 = P1r + Pr2

Now find the net distance of both sides

|P12| = |P1r + Pr2|

Now place the constraint that distance from each of the first two points to the third is the same, namely R.

|P1r| = Pr2| = R

Now plug and chug to find the constraints of |P12|.
 

MrAl

Joined Jun 17, 2014
13,711
I gave you a mathematical derivation of the equation and you said you wanted a geometric proof. I then described a geometric construction that results in the same conclusion and you say you want a mathematical proof.

Please make up your mind.

Any proof has to start with a declaration of what the constraints are.

What is so hard to understand about the notion that the furthest apart that any two points can be if they lie on the same circle is 2·R ?

What is so hard to understand about the notion that the distance between two points is sqrt[(x2-x1)² + (y2-y1)²] ?

What is so hard to understand about the notion that if these two points lie on the same circle of radius R then the distance between them must satisfy the constraint

sqrt[(x2-x1)² + (y2-y1)²] ≤ 2·R

What is so hard to understand about the contrapositive of this, namely that if

sqrt[(x2-x1)² + (y2-y1)²] > 2·R

is true then the two points cannot lie on the same circle of radius R.

What is so hard to understand that, since both sides are nonnegative, that squaring both sides does not effect the inequality

(x2-x1)² + (y2-y1)² > (2·R)²

(x2-x1)² + (y2-y1)² > 4·R²

If it will make you happier, use analytic geometry.

Define three points

P1 = <X1,Y1>
P2 = <X2,Y2>
Pr = <Xr,Yr>

Define the following vectors:

P12 = vector from P1 to P2
P1r = vector from P1 to Pr
Pr2 = vector from Pr to P2

Clearly

P12 = P1r + Pr2

Now find the net distance of both sides

|P12| = |P1r + Pr2|

Now place the constraint that distance from each of the first two points to the third is the same, namely R.

|P1r| = Pr2| = R

Now plug and chug to find the constraints of |P12|.

Hello again,

Thanks for the reply.

Well, you keep telling me how to do it but you dont actually do it yourself, and i dont see why not if it's so easy.

A mathematical proof is not a list of language statements except for short descriptions perhaps of what the next operation is.
For example, prove that if a=b and c=d, then a+c=b+d.
Proof 1: Replace a and c with their equivalents and get:
b+d=b+d
Proof 2: Replace b and d with their equivalents and get:
a+c=a+c

Note there was always a result that shows exactly what we want to see.
I chose this simple example but of course it's never that simple, but we always end up with a result that is simple enough and it is a mathematical statement that includes the original variables.

So what i am saying here is that in the proof we should see at the very end the SAME equation as we thought was true.

It's ok if you dont want to perform the intermediate math steps i guess, but i just thought you would.
I'll show my proof later.
 

WBahn

Joined Mar 31, 2012
32,887
So what i am saying here is that in the proof we should see at the very end the SAME equation as we thought was true.
At least twice I ended up with

(x2-x1)² + (y2-y1)² > 4·R²

How is that different than the equation as we thought was true?

A mathematical proof is not a list of language statements except for short descriptions perhaps of what the next operation is.
Perhaps it would help if you showed what YOU consider an acceptable proof of one of my base claims.

For instance, prove that the furthest distance apart that two points located on a circle of radius R can be is 2·R.
 

MrAl

Joined Jun 17, 2014
13,711
At least twice I ended up with

(x2-x1)² + (y2-y1)² > 4·R²

How is that different than the equation as we thought was true?



Perhaps it would help if you showed what YOU consider an acceptable proof of one of my base claims.

For instance, prove that the furthest distance apart that two points located on a circle of radius R can be is 2·R.
Hi,

Thanks again for the reply.

I am not sure how you could think that posting the same equation that has be presented as the equation to be proved could be considered as a proof. For example, if someone posted E=2*sin(2*pi*4+pi/8) as a voltage in some circuit, it would make little sense to post a proof that only consisted of E=2*sin(2*pi*4+pi/8).
I realize that you had stated some other things before that, but i thought you would be willing to show those steps too. That is, the steps that led up to your conclusion which is your last equation in your most recent post. That is mainly so that others can see how you worked it out. Dont you think that would be of interest to others?

Let me give one more example which pertains to this thread directly. That is, my own 'proof'.
Is it enough to say that i used the calculation of the center of two circles to prove the equation we had been referring too? Then that would be my proof:
"I used the center of two circles to prove the target relationship".

Yes, that is sort of a proof if you believe it, but there's no way to follow the work for some people because they might not understand all that is involved, or at least what is involved with the way i did it.

Some things dont need to be proved though i think, such as the distance between two points d=sqrt((x2-x1)^2+(y2-y1)^2). Most people know that is true i think.

So really i guess this is all about showing all or most of the work. I realize not everyone wants to do this, but i think it helps other readers. It's also nice to see other methods. Just doing the work myself i ran into another interesting solution that automatically turned the problem into a binary one, where the outcome was either 1 or 0. I never expected to see that without actually trying to force that. Of course since the end game is to make a decision, it has to be that way anyway one way or another.
That's great that you came up with the same solution, so if you want to show more work that would be good i think for everyone, and i will follow along too.
 

WBahn

Joined Mar 31, 2012
32,887
I am not sure how you could think that posting the same equation that has be presented as the equation to be proved could be considered as a proof. For example, if someone posted E=2*sin(2*pi*4+pi/8) as a voltage in some circuit, it would make little sense to post a proof that only consisted of E=2*sin(2*pi*4+pi/8).
I realize that you had stated some other things before that, but i thought you would be willing to show those steps too.
Which of the following steps do you believe needs more proof in order to be satisfactory:

Claim #1: What is the furthest apart that two points on a circular arc can possibly be? Diametrically opposed.

Claim #2: Thus if the distance between two points, d, is greater than the diameter, D, of the circular arc, it is impossible to draw a circular arc that passes through both points.

Claim #3: Therefore we have the requirement that the arc is impossible is

D < d

Claim #4: If R is the radius of the arc, the diameter is D = 2R.

Claim #5: What is the distance between the point <X1,Y2> and <X2,Y2>?

d = sqrt( (X2 - X1)² + (Y2 - Y1)² )

Claim #6: Substituting in we have

D < d
2R < sqrt( (X2 - X1)² + (Y2 - Y1)² )

Claim #7: Squaring both sides we have

(2R)² < sqrt²( (X2 - X1)² + (Y2 - Y1)² )

4·R² < (X2 - X1)² + (Y2 - Y1)²

What specific problem do you have with which specific step?

How, in your mind, does this qualify as just posting the same equation and claiming that doing so is a proof?

The only possible claim that I can imagine you taking issue with is Claim #1. Fine. I asked you to show what YOU would consider an adequate proof of that claim and you've declined to do so. Yet you are saying that it is perfectly reasonable to accept Claim #5 without an substantiation.
 
Thread starter Similar threads Forum Replies Date
S Homework Help 15
Top