swap order of startx and starty in create_theta_arr_sub