Computes an interpolated value for the given penetration in the segment.paramp the segment penetration. Should be in the [0, 1] range.paramw array where the computed value should be stored.