def __init__(self, master, width, height):
        "Initializes process and starts simulation loops."
        super().__init__(master)
        canvas = tkinter.Canvas(self, width=width, height=height,
                                background='white', highlightthickness=0)
        canvas.bind('<1>', self.mouse_pressed)
        canvas.grid()
        graphics = Graphics(canvas)
        self.setup(graphics.fill)
        render = 1 / self.RENDER_EACH_SECOND
        update = 1 / self.UPDATE_EACH_SECOND
        self.__loop(lambda: self.render(graphics), render, time.clock(), 0)
        self.__loop(lambda: self.update(update), update, time.clock(), 0)
Initializes process and starts simulation loops.
recipes/Python/578004_processing/recipe-578004.py