Finding the length of a beam on a ramp