Added intersection check to PiecewiseCurve. Filled in the simulation's determineAllowedTranslation function, but it has a cyclomatic complexity of 17 (and the threshold is 10), so I have to break it down now.