Simulating G-code for polar and cylindrical interpolation