Abomination #1 perhaps You could put the calculations and the drawing commands in seperate functions and call the calculate-function a couple of times per frame, before calling the drawing-function?