I have a crescent defined by two offset circles with different radii: a small one (let's call it
outer circle) centered at (0,0) with radius
r and a larger one (
inner circle) centered at (0,-d) with radius
R. The circles are positioned such that they create a lune (rather than a lens) and are separated on the y-axis by distance
d. If I draw a ray out from (0,0) to some point on
outer circle between its intersection points with
inner circle (that is, on the outside edge of the lune), how can I find the point on that ray where it intersects with the perimeter of
I need to sort this out because I'm trying to create a function in
Python that will return random points within a crescent-shaped field by arbitrarily choosing an angle off of (0,0) toward a point in the outer arc, then picking a valid distance along that arc within the lune. I've worked out a way to select that angle, but I need to figure out what the minimum distance is along that random angle (which is, the point on
inner circle's perimeter the ray crosses it at). I know that the range on the radical line (
x = 0) is
[(R-d)...r], and that there is only one valid point for the cusps where the circles cross, but that isn't super useful to me mathematically.
I've worked out a number of bits of information I need for it using this resource, but I can't quite get my head around this specific problem. I've taken a look around, but I'm not a mathematician and my nomenclature is probably a bit off...