Hello,
I've got a uniformly spaced grid and I have a shape overlapping the bottom right side of the grid. I'd like that shape to act as a boundary and as such, not contain any grid points within the shape. See the example code:
[X,Y]=meshgrid(-1:0.1:1,-1:0.1:1); %Grid of XY coordinates
theta=pi/2:0.01:pi; %Angular arc of circle
R=1.0; %Radius of circle
Xcirc=R*cos(theta)+1; %Cartesian coordinates for X of circle
Ycirc=R*sin(theta)-1; %Cartesian coordinates for Y of circle
hold onplot(X,Y,'+')plot(Xcirc,Ycirc)
How do I cut out the grid points which lie within the circle?
Thank you for any help or suggestions.
Best Answer