INNER CODE UNIT · Python

dt

tuangauss/DataScienceProjects · Python/fireworks.py:122

        t, dt = tnew, tnew - t
        for point in explode_points:
            for item in point:
                item.update(dt)
        cv.update()
        total_time += dt
    # recursive call to continue adding new explosion on canvas
    root.after(wait_time, simulate, cv)

def close(*ignore):
    """Stops simulation loop and closes the window."""
    global root
    root.quit()
    
if __name__ == '__main__':
    root = tk.Tk()
    cv = tk.Canvas(root, height=600, width=600)
    # use a nice background image

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…