A simulation of the billiards trajectory geometry problem