I need code to sketch circle with interfaces (interior arcs)

1 visualización (últimos 30 días)
Lawrence Tom
Lawrence Tom el 5 de Mayo de 2021
Editada: Image Analyst el 13 de Mayo de 2021
Hi all,
Can someone please help with code that can create the plot in the figure below?

Respuestas (2)

Image Analyst
Image Analyst el 5 de Mayo de 2021
See the FAQ to plot the circle:
For the other curves, you'd need their coordinates, which you can get if you have an equation for them.

Kartikay Sapra
Kartikay Sapra el 12 de Mayo de 2021
Editada: Image Analyst el 13 de Mayo de 2021
function plotcircle(r,x,y)
plot(r*exp(j*(0:pi/100:2*pi))+x+j*y);
end
Use this method to plot the main circle with radius 0.5.
There is a pattern for inner segments.
The centre becomes (0.5, 0) and the radius increments by 0.1
Then for the final circles the centre changes to (0.5, 1).
  1 comentario
Image Analyst
Image Analyst el 13 de Mayo de 2021
Editada: Image Analyst el 13 de Mayo de 2021
Certainly the radii of the arcs are different, but I'm not sure all those arcs have the same center. I'm pretty sure they aren't centered at the same two points. But the tricky part is how to get the inner circle segments to stop exactly at the outer circle. How do you do that? Hint: I'd use inpolygon().

Iniciar sesión para comentar.

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by