gridpoint=0; for x=-25:45; for y=-25:45; if ((x-10)^2+(y-10)^2)<35 || ((x-10)^2+((y-10)^2/4))<50 gridpoint=gridpoint+1; end end end gridpoint