Simple visualisation with tkinter canvas, optimization fix