Ejemplo n.º 1
0
def init():
    julia = julia_set(xmin,
                      xmax,
                      ymin,
                      ymax,
                      width,
                      height,
                      maxiter,
                      c=c0,
                      method=method)
    im.set_array(julia)
    return [im]
Ejemplo n.º 2
0
def init():
    julia = julia_set(xmin,
                      xmax,
                      ymin,
                      ymax,
                      width,
                      height,
                      maxiter,
                      c=c,
                      method=method)
    im.set_array(getattr(cm, colormap)(julia))
    return [im]
Ejemplo n.º 3
0
def animate(i):
    theta = 2 * np.pi * i / frames
    c = c0 * np.exp(theta * 1j)
    if verbose:
        print('{}/{}'.format(i, frames))
    julia = julia_set(xmin,
                      xmax,
                      ymin,
                      ymax,
                      width,
                      height,
                      maxiter,
                      c=c,
                      method=method)
    im.set_array(getattr(cm, colormap)(julia))
    return [im]
Ejemplo n.º 4
0
def animate(i):
    xmini = (xmin - xtarget) * zoom**i + xtarget
    xmaxi = (xmax - xtarget) * zoom**i + xtarget
    ymini = (ymin - ytarget) * zoom**i + ytarget
    ymaxi = (ymax - ytarget) * zoom**i + ytarget
    julia = julia_set(xmini,
                      xmaxi,
                      ymini,
                      ymaxi,
                      width,
                      height,
                      maxiter,
                      c=c,
                      method=method)
    im.set_array(getattr(cm, colormap)(julia))
    return [im]
Ejemplo n.º 5
0
height = args.height
frames = args.frames
maxiter = args.maxiter
interval = args.interval
method = args.method
c0 = args.c0
filename = args.filename
fps = args.fps
verbose = args.verbose
colormap = args.colormap

julia = julia_set(xmin,
                  xmax,
                  ymin,
                  ymax,
                  width,
                  height,
                  maxiter,
                  c=c0,
                  method=method)

fig = plt.figure()
im = plt.imshow(getattr(cm, colormap)(julia),
                interpolation='none',
                animated=True)


def init():
    julia = julia_set(xmin,
                      xmax,
                      ymin,