It may help to solve for coincident roots ( equate quantity under
radical to zero). Or use three osculating circles result, where one
radius is infinity.
It may surely help if it were clearer !
What is the radius of a ray ???
What is the sign of the radius to be clockwise ???
etc...
I didn't understand a word in that problem...
Regards.
--
Philippe C., mail : chephi...@free.fr
site : http://chephip.free.fr/ (recreational mathematics)
> What is the radius of a ray ???
The problem mentions no "radius of a ray". Er is the radius of the
circle tangent to the given ray and circle.
> What is the sign of the radius to be clockwise ???
A negative radius implies a clockwise circle and a positive radius
implies a counter-clockwise circle. The ray is directional by
definition.
OK, I misunderstood the 1st sentence...
>> What is the sign of the radius to be clockwise ???
> A negative radius implies a clockwise circle and a positive radius
> implies a counter-clockwise circle. The ray is directional by
> definition.
OK, its your convention.
If I understand correctly :
http://cjoint.com/?ewvMROItEZ
However the definition of 'angle Ra' is may be else, but
without changing a lot of things.
It seems also easier to get E rather than contact points :
E is intersect of a circle with radius Rc - Re (considering your
sign conventions) with a translated Ray in suitable direction.
A few trigonometry gives the result.
see below
> How do you handle/detect the degenerate case where the point E is
> inside the circle C?
this case just can't happen : E is *allways* outside (C)
> Or, as is my hope, is it possible to ignore that case and have it
> fall out correctly from the calculations of the external circle?
So, how to know "which direction to translate the ray" and how
"correct case fall out from calculation".
I will discard the convention for "negative radius" and just
keep the problem simpler as :
Given a circle (C), centered in C with radius rC,
A point R on this circle and a ray (R) from R with angle Ra
with horizontal.
To connect the circle and the ray by a circle (E) with given
radius rE so that the path can be walked continuously starting
from (C) anticlockwise, then (E) clockwise, then on the ray,
in direction of the ray.
Without the orientation and ray constraints, the problem is
easy, and has at most 8 solutions.
With the given orientation, there is only one.
The problem is then to find (construct, calculate) directly
this correct solution, without the need to "choose" among the 8.
Consider what happens at contact point between (C) and (E).
We change direction from clockwise to anticlockwise, this just
implies that the circles touch externally.
Hence center E lies on a circle (C'), centered in C with radius
|rC| + |rE|.
(hence E is allways outside circle (C), as |rC| + |rE| > |rC|)
Now, at contact point between (E) and ray (R), anticlockwise
to ray direction just means that circle (E) lies "on the left"
of the ray, looking from R in direction of the ray.
Center E lies then on a parallel ray (R'), with the same
direction as (R), and starting at a point K with |RK| = |rE|,
and oriented angle ((R), RK) = +90°.
As K is inside circle (C'), except when the ray is tangent (in R)
to (C), this implies there is allways one and only solution :
Ray (R') allways intersects (C') in just one point E.
Now if you want calculations ...
Define K as :
x_K = x_R + rE*cos(Ra + 90°),
y_K = y_R + rE*sin(Ra + 90°)
Then the ray from K can be parametric defined as :
x = x_K + t*cos(Ra)
y = y_K + t*sin(Ra)
t > 0 (just ray and not line)
Intersecting this line (solving the quadratic in t)
with circle x^2 + y^2 = (|rC| + |rE|)^2 gives two solutions,
but the only one we want is for t > 0 (on the *ray* from K)
so in the quadratic, we choose the + sqrt.
Details let to reader...
I've put this on my (new) web site at
http://mathafou.free.fr/pbw_en/pb401.html
with a dynamic construction using JavaSketchpad (so patience with Java
on first load).
Don't try to navigate far in this web site : "design in progress".
(there are up to now only three topics !)