piece wise path simulation