I would like to only show the part of Black
circles within the Red
circle.
Can I do that with Graphics
, Circle
and/or some sort of Region Constraint?
step = 2 Degree;
\[Alpha] = Range[2 Degree, 80 Degree, step];
x = ConstantArray[0, Length@\[Alpha]];
y = Sec@\[Alpha];
radius = Tan@\[Alpha];
range = 1.01;
Graphics[{Red, Circle[{0, 0}, 1], Black,
MapThread[Circle[{#1, #2}, #3] &, {x, y, radius}]},
PlotRange -> {{-range, range}, {-range, range}}]
At the moment, I use ContourPlot
with RegionFunction
option. However, my plot contains a large number of these circles (The amount of the circles shown here is only a quarter for the current step
), which makes ContourPlot
approach very slow. Moreover, when I zoom in, quite often I find the circles drawn by ContourPlot
are not circular, presumably due to PlotPoints
and MaxRecursion
etc. I tried to play with these two options, but did not succeed in terms of quality (being a circle) and speed.
Thank you!