How is it possible to find the minimum X coordinate on the circle between the two lines?
Y1, Y2, R are known. The centre of the circle is at (0, 0)
In the picture the MinX would be –R, but the boundary lines can be placed anywhere in the circle, they are always parallel with the X axis.
Thanks
Robert
Last edited by THEROB; Jan 16th, 2007 at 07:26 AM.
Reason: Resolved
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]
How is it possible to find the minimum X coordinate on the circle between the two lines?
Y1, Y2, R are known. The centre of the circle is at (0, 0)
In the picture the MinX would be –R, but the boundary lines can be placed anywhere in the circle, they are always parallel with the X axis.
Thanks
Robert
Well, if (Y1 - R)*(Y2 - R) <= 0 then the 2 lines are on opposite sides with rerspect to the x axis, so the min. x coordinate is -R as in your example.
Otherwise, let H = Min[Abs(Y1),Abs(Y2)], i.e. make H the distance between the origin and the closest of those lines. Then you find the negative x coordinate of the intercept with the circle.
Equation of the circle:
X2 + y2 = R2
Substitute y by H:
X2 + H2 = R2
so that the required minimum x is:
Xmin = -Sqr(R2 - H2)
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]