def interpolate(curr_x, x_init, x_end, y_init, y_end):
	"""
	Compute an intermediate value between two points by
	linear interpolation
	"""
	m = (y_end - y_init)/(x_end - x_init)
	n = y_end - x_end * m
	return m * curr_x + n