Functions to flatten path, move along path a specified dist.
Draw ticks.