Discretize the friction so that the new nodes/images are not created at every step, see #47