title: Finding all the points within a circle in 2D space
body: <p>I am representing my 2D space (consider a window), where each pixel is shown as a cell in a 2D array. i.e. a 100x100 window is represented by the array of same dimensions. </p>
  
  <p>Now given a point in the window, if I draw a circle of radius <code>r</code>, I want to find all the points lying in that circle.</p>
  
  <p>I was thinking I'd check for the each point in the square region around the radius, with <code>side = 2*r</code>, if it lies in the circle or not. I'll use the normal distance formula maybe?</p>
  
  <p>Hence, maybe the following:</p>
  
  <pre><code>for (x=center-radius ; x&lt;center+radius ; x++){
      for (y=center-radius ; y&lt;center+radius; y++) {
          if (inside) {
              // Do something
          }
      }
  }
  </code></pre>
  
  <p>Will it serve my purpose? Can I make it faster?</p>