01-08-2013 10:22 AM
I have 3 column of data and I am plotting a surface plot where 1st and second column represents x and y coordinate of the graph and 3rd column is intensity. This works. I get a intensity plot (and also a 2d array).
What I want to do next is draw a circle of specified size and get the data (2d array) inside that circle. If 50% or more of any of the pixels are inside the circle, I would take it to be inside the circle.
Can I get some help how to do this?
01-08-2013 10:28 AM
@babu726 wrote:
I have 3 column of data and I am plotting a surface plot where 1st and second column represents x and y coordinate of the graph and 3rd column is intensity. This works. I get a intensity plot (and also a 2d array).
What I want to do next is draw a circle of specified size and get the data (2d array) inside that circle. If 50% or more of any of the pixels are inside the circle, I would take it to be inside the circle.
Can I get some help how to do this?
You're probably thinking of trying to do that in a graphical way, but maybe the easiest way is to plot the circle but use math to decide whether or not each point falls within the circle.
01-08-2013 02:23 PM
the math should be straight forward, sqrt(dx^2+dy^2)>r remove point else it is in the circle where dx and dy are the distances of the point from the center x,y.