|
![](/i/fill.gif) |
Eitan Tal wrote:
> I have these two points. there's also Distance X, and an angle between
> the arch and
> the line. if this angle is 45, the radius will become infinite. if
> this angle is 90, the radius
> equals one. (shown above)
>
> a = that angle
>
> from here, it is possible that r = tan(1/2a) + sin(a)
> is that correct? anyone got the exact eqution? and what's the link
> between x and a?
You have an imaginary icosciles triangle with the
chord/secantintersecting the two points and two radii (everything that
follows is with the assumption you're using a 45-45-90 triangle (not the
imaginary one I just mentioned, the one in your figure) with two sides
of length 1)...
You know the three angles; two are 90-(a-45) == 135-a and the other is
180-2(135-a) == 2a-90. You also know the length of the chord/secant,
which is always sqrt(2). Now take law of sines:
a b c
----- = ----- = -----
sin A sin B sin C
and solve it for the radius:
r = sqrt(2)*sin(135-a)/sin(2a-90)
If you want the conversion x<->a...
Take the part of x that goes beyond the line connecting the two points,
the of that part is x-sqrt(2)/2. Then take the distance from either
point to x, which is always sqrt(2)/2. (Note sqrt(2)/2 is the same as
sqrt(.5).) These make two legs of a right triangle. So now you can use
arctangent on it; atan((x-sqrt(2)/2)/(sqrt(2)/2)) which can be
simplified as atan(x*sqrt(2)-1). This angle is half of the angle between
the circle and the chord/secant at either point. So simply double this
angle and add 45 (angle between chord/secant and the leg of your
45-45-90 triangle) and you have a:
a = 45+2*atan(x*sqrt(2)-1)
<->
x = (tan((a-45)/2)+1)/sqrt(2)
Answer your question?
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
![](/i/fill.gif) |