I thought this would be a nice example of a 5 minute exercise for beginners/intermediate Python coders as it tests several Python skills (looping, masking, axes...).
def Circles(r, dr): n = int(x*1E-2/dx) x = np.arange(0, r / dr) #Same reasoning as above y = np.arange(0, r / dr) arr = np.full((y.size, x.size), np.nan)
cx = int(x.size/2) #centre of the circle on x axis cy = int(y.size/2) #centre of the circle on y axis
for i in range(4): mask = (x[np.newaxis,:] - cx) ** 2 + (y[:,np.newaxis] - cy) ** 2 < r ** 2 #from standard equation of a circle arr[mask] = 0 if i % 2 == 0 else np.nan r -= r/4 #effective width of each circle