def compute_trajectory(x0, y0, set_boundary = 2, n_iters = 100):
  """Take the fragment and compute a further n_iters iterations for each element
  that has not exceeded the bound. Also indicate if we are inside or outside the
  mandelbrot set"""
  
  set = True
  C = complex(x0, y0)
  Z = pylab.ones(n_iters,'complex')*C
  for n in range(n_iters-1):
    if abs(Z[n]) > set_boundary:
      Z[n+1:] = Z[n]
      set = False
      break
    Z[n+1] = Z[n]*Z[n] + C 
        
  return Z, set
Take the fragment and compute a further n_iters iterations for each element
  that has not exceeded the bound. Also indicate if we are inside or outside the
  mandelbrot set
recipes/Python/577642_Mandelbrot_trajectories/recipe-577642.py