code: def __init__(self, *args, **kwargs):
      app.Canvas.__init__(self, *args, **kwargs)
      self.program = gloo.Program(vertex, fragment)
  
      # Draw a rectangle that takes up the whole screen. All of the work is
      # done in the shader.
      self.program["position"] = [
          (-1, -1),
          (-1, 1),
          (1, 1),
          (-1, -1),
          (1, 1),
          (1, -1),
      ]
  
      self.scale = 3
      self.program["scale"] = set_emulated_double(self.scale)
      self.center = [-0.5, 0]
      self.bounds = [-2, 2]
      self.translate_center(0, 0)
      self.iterations = self.program["iter"] = 300
  
      self.apply_zoom()
  
      self.min_scale = 1e-12
      self.max_scale = 4
  
      gloo.set_clear_color(color="black")
  
      self.show()
  
file_path: vispy/examples/demo/gloo/mandelbrot_double.py
imports: from __future__ import division
  import numpy
  from vispy import app, gloo
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()