function compute_bezier(t, start_x, start_y, control_1_x, control_1_y, control_2_x, control_2_y, end_x, end_y) {
	// adapted from https://github.com/Pomax/bezierjs
	const mt = 1 - t;
	const mt2 = mt * mt;
	const t2 = t * t;
	let a, b, c, d = 0;

	a = mt2 * mt;
	b = mt2 * t * 3;
	c = mt * t2 * 3;
	d = t * t2;

	return {
		x: a * start_x + b * control_1_x + c * control_2_x + d * end_x,
		y: a * start_y + b * control_1_y + c * control_2_y + d * end_y,
	};
}
Computes the position on a cubic Bezier curve at a given parameter `t`.
@param {number} t - The parameter value between 0 and 1.
@param {number} start_x - The x-coordinate of the starting point.
@param {number} start_y - The y-coordinate of the starting point.
@param {number} control_1_x - The x-coordinate of the first control point.
@param {number} control_1_y - The y-coordinate of the first control point.
@param {number} control_2_x - The x-coordinate of the second control point.
@param {number} control_2_y - The y-coordinate of the second control point.
@param {number} end_x - The x-coordinate of the ending point.
@param {number} end_y - The y-coordinate of the ending point.
@returns {{x: number, y: number}} The position on the Bezier curve at parameter `t`.