Skip to main content
edited body; added 2 characters in body
Source Link

A cubic bezier defined by $p_1, p_2, p_3, p_4$ has parametric equation $$B(t) = (1-t)^3p_1 + 3(1-t)^2tp_2 + 3(1-t)t^2p_3 + t^3p_4.$$

The setup here also defines $A(t) = (1-t) p_2 + tp_3$.

The way $C$ is defined, there are some real $s(t)$ and $u(t)$, both possibly depending on $p_1,\ldots,p_4$ such that $C = sA + (1-s)B = up_1 + (1-u)p_4$.

So $B - C = B - sA - (1-s)B = s(B-A)$. Hence $\frac{|B - C|}{|A - B|} = |s|$.

On the other hand, we want $sA + (1-s)B - up_1 - (1-u)p_4 = 0$. That comes out to

$$((1-s)(1-t)^3 - u)p_1 + (s(1-t) + 3(1-s)t(1-t)^2)p_2 + (st + 3(1-s)t^2(1-t))p_3 + ((1-s)t^3 - (1-u))p_4 = 0.$$

Set $$s = \frac{1-t^3-(1-t)^3}{t^3 + (1-t)^3}$$$$s = \frac{t^3+(1-t)^3-1}{t^3 + (1-t)^3}$$ and $$u = \frac{(1-t)^3}{t^3 + (1-t)^3}.$$

Then the coefficents of $p_1,\ldots,p_4$ in the above expression become identically 0. Note that the denominators of these expressions are never 0 for $t \in [0,1]$, so the divisions are ok.

So your ratio is given by the $s$$|s|$ above (or its reciprocal, depending on how you're taking the ratio).

A cubic bezier defined by $p_1, p_2, p_3, p_4$ has parametric equation $$B(t) = (1-t)^3p_1 + 3(1-t)^2tp_2 + 3(1-t)t^2p_3 + t^3p_4.$$

The setup here also defines $A(t) = (1-t) p_2 + tp_3$.

The way $C$ is defined, there are some real $s(t)$ and $u(t)$, both possibly depending on $p_1,\ldots,p_4$ such that $C = sA + (1-s)B = up_1 + (1-u)p_4$.

So $B - C = B - sA - (1-s)B = s(B-A)$. Hence $\frac{|B - C|}{|A - B|} = |s|$.

On the other hand, we want $sA + (1-s)B - up_1 - (1-u)p_4 = 0$. That comes out to

$$((1-s)(1-t)^3 - u)p_1 + (s(1-t) + 3(1-s)t(1-t)^2)p_2 + (st + 3(1-s)t^2(1-t))p_3 + ((1-s)t^3 - (1-u))p_4 = 0.$$

Set $$s = \frac{1-t^3-(1-t)^3}{t^3 + (1-t)^3}$$ and $$u = \frac{(1-t)^3}{t^3 + (1-t)^3}.$$

Then the coefficents of $p_1,\ldots,p_4$ in the above expression become identically 0. Note that the denominators of these expressions are never 0 for $t \in [0,1]$, so the divisions are ok.

So your ratio is given by the $s$ above (or its reciprocal, depending on how you're taking the ratio).

A cubic bezier defined by $p_1, p_2, p_3, p_4$ has parametric equation $$B(t) = (1-t)^3p_1 + 3(1-t)^2tp_2 + 3(1-t)t^2p_3 + t^3p_4.$$

The setup here also defines $A(t) = (1-t) p_2 + tp_3$.

The way $C$ is defined, there are some real $s(t)$ and $u(t)$, both possibly depending on $p_1,\ldots,p_4$ such that $C = sA + (1-s)B = up_1 + (1-u)p_4$.

So $B - C = B - sA - (1-s)B = s(B-A)$. Hence $\frac{|B - C|}{|A - B|} = |s|$.

On the other hand, we want $sA + (1-s)B - up_1 - (1-u)p_4 = 0$. That comes out to

$$((1-s)(1-t)^3 - u)p_1 + (s(1-t) + 3(1-s)t(1-t)^2)p_2 + (st + 3(1-s)t^2(1-t))p_3 + ((1-s)t^3 - (1-u))p_4 = 0.$$

Set $$s = \frac{t^3+(1-t)^3-1}{t^3 + (1-t)^3}$$ and $$u = \frac{(1-t)^3}{t^3 + (1-t)^3}.$$

Then the coefficents of $p_1,\ldots,p_4$ in the above expression become identically 0. Note that the denominators of these expressions are never 0 for $t \in [0,1]$, so the divisions are ok.

So your ratio is given by the $|s|$ above (or its reciprocal, depending on how you're taking the ratio).

Source Link

A cubic bezier defined by $p_1, p_2, p_3, p_4$ has parametric equation $$B(t) = (1-t)^3p_1 + 3(1-t)^2tp_2 + 3(1-t)t^2p_3 + t^3p_4.$$

The setup here also defines $A(t) = (1-t) p_2 + tp_3$.

The way $C$ is defined, there are some real $s(t)$ and $u(t)$, both possibly depending on $p_1,\ldots,p_4$ such that $C = sA + (1-s)B = up_1 + (1-u)p_4$.

So $B - C = B - sA - (1-s)B = s(B-A)$. Hence $\frac{|B - C|}{|A - B|} = |s|$.

On the other hand, we want $sA + (1-s)B - up_1 - (1-u)p_4 = 0$. That comes out to

$$((1-s)(1-t)^3 - u)p_1 + (s(1-t) + 3(1-s)t(1-t)^2)p_2 + (st + 3(1-s)t^2(1-t))p_3 + ((1-s)t^3 - (1-u))p_4 = 0.$$

Set $$s = \frac{1-t^3-(1-t)^3}{t^3 + (1-t)^3}$$ and $$u = \frac{(1-t)^3}{t^3 + (1-t)^3}.$$

Then the coefficents of $p_1,\ldots,p_4$ in the above expression become identically 0. Note that the denominators of these expressions are never 0 for $t \in [0,1]$, so the divisions are ok.

So your ratio is given by the $s$ above (or its reciprocal, depending on how you're taking the ratio).