code: def __init__(self):
      app.Canvas.__init__(
          self, position=(300, 100), size=(800, 600), keys="interactive"
      )
  
      self.program = gloo.Program(vertex, fragment)
      self.program["a_position"] = [
          (-1.0, -1.0),
          (-1.0, +1.0),
          (+1.0, -1.0),
          (+1.0, +1.0),
      ]
      self.program["sphere_position_0"] = (0.75, 0.1, 1.0)
      self.program["sphere_radius_0"] = 0.6
      self.program["sphere_color_0"] = (0.0, 0.0, 1.0)
  
      self.program["sphere_position_1"] = (-0.75, 0.1, 2.25)
      self.program["sphere_radius_1"] = 0.6
      self.program["sphere_color_1"] = (0.5, 0.223, 0.5)
  
      self.program["plane_position"] = (0.0, -0.5, 0.0)
      self.program["plane_normal"] = (0.0, 1.0, 0.0)
  
      self.program["light_intensity"] = 1.0
      self.program["light_specular"] = (1.0, 50.0)
      self.program["light_position"] = (5.0, 5.0, -10.0)
      self.program["light_color"] = (1.0, 1.0, 1.0)
      self.program["ambient"] = 0.05
      self.program["O"] = (0.0, 0.0, -1.0)
  
      self.activate_zoom()
  
      self._timer = app.Timer("auto", connect=self.on_timer, start=True)
  
      self.show()
  
file_path: vispy/examples/demo/gloo/raytracing.py
imports: from math import cos
  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()