How can I fill in the area between two intersecting circles?
Show older comments
I have two circles, one of radius = 2.5 centered at (0, -1), and the other of radius = 3 centered at (0, 1):
x = 0:0.01:2*pi;
y1 = plot(2.5*cos(x), 2.5*sin(x)-1, 'r');
hold on
y2 = plot(3*cos(x), 3*sin(x)+1, 'r');
I need to shade the intersection between them gray, but there's a catch; I can't use any toolboxes. So no patch or fill or area. Please help! Thanks.
3 Comments
Walter Roberson
on 9 Oct 2015
patch(), fill() and area() are all part of basic MATLAB, not part of a toolbox. If you cannot use them, we have to ask whether you are allowed to use anything other than plot() in constructing your graphics.
Justin D.
on 9 Oct 2015
Justin D.
on 9 Oct 2015
Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!