def point_on_cubic_bezier(p1,p2,c1,c2,t):
	"""Find a point on a cubic bezier curve, i.e. a bezier curve with two control points.
	
	@type p1: Vector
	@param p1: Start point of the curve
	
	@type p2: Vector
	@param p2: Stop point of the curve

	@type c1: Vector
	@param c1: Control point for point A

	@type c2: Vector
	@param c2: Control point for point B

	@type t: float
	@param t: Relative position on the bezier curve between 0 and 1
	"""

	one_minus_t = 1.0 - t
	one_minus_t_2 = one_minus_t * one_minus_t
	one_minus_t_3 = one_minus_t_2 * one_minus_t

	t_2 = t * t
	t_3 = t_2 * t

	return p1 * one_minus_t_3 + c1 * (3 * one_minus_t_2 * t) + c2 * (3 * one_minus_t * t_2) + p2 * t_3