1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-21 07:51:49 +02:00

Update content.en-GB.md

This commit is contained in:
Pomax
2021-08-30 14:56:09 -07:00
committed by GitHub
parent 926d10a7b0
commit 272af23fe4

View File

@@ -73,12 +73,19 @@ Which now leaves us with some powerful tools: given three points (start, end, an
A = B - \frac{C - B}{\textit{ratio}(t)} = B + \frac{B - C}{\textit{ratio}(t)} A = B - \frac{C - B}{\textit{ratio}(t)} = B + \frac{B - C}{\textit{ratio}(t)}
\] \]
With `A` found, finding `e1` and `e2` for quadratic curves is a matter of running the linear interpolation with `t` between start and `A` to yield `e1`, and between `A` and end to yield `e2`. For cubic curves, there is no single pair of points that can act as `e1` and `e2`: as long as the distance ratio between `e1` to `B` and `B` to `e2` is the Bézier ratio `(1-t):t`, we can reverse engineer `v1` and `v2`: With `A` found, finding `e1` and `e2` for quadratic curves is a matter of running the linear interpolation with `t` between start and `A` to yield `e1`, and between `A` and end to yield `e2`. For cubic curves, there is no single pair of points that can act as `e1` and `e2` (there are infinitely many, because the tangent at B is a free parameter for cubic curves) so as long as the distance ratio between `e1` to `B` and `B` to `e2` is the Bézier ratio `(1-t):t`, we are free to pick any pair, after which we can reverse engineer `v1` and `v2`:
\[ \[
\left \{ \begin{aligned} \left \{ \begin{aligned}
v_1 &= A - \frac{A - e_1}{1 - t} \\ e_1 &= (1-t) \cdot v_1 + t \cdot A \\
v_2 &= A - \frac{A - e_2}{t} e_2 &= (1-t) \cdot A + t \cdot v_2
\end{aligned} \right .
\Rightarrow
\left \{ \begin{aligned}
v_1 &= \frac{e_1 - t \cdot A}{1-t} \\
v_2 &= \frac{e_2 - (1-t) \cdot A}{t}
\end{aligned} \right . \end{aligned} \right .
\] \]
@@ -86,8 +93,15 @@ And then reverse engineer the curve's control points:
\[ \[
\left \{ \begin{aligned} \left \{ \begin{aligned}
C_1 &= \textit{start} + \frac{v_1 - \textit{start}}{t} \\ v_1 &= (1-t) \cdot \textit{start} + t \cdot C_1 \\
C_2 &= \textit{end} + \frac{v_2 - \textit{end}}{1 - t} v_2 &= (1-t) \cdot C_2 + t \cdot \textit{end}
\end{aligned} \right .
\Rightarrow
\left \{ \begin{aligned}
C_1 &= \frac{v_1 - (1-t) \cdot \textit{start}}{t} \\
C_2 &= \frac{v_2 - t \cdot \textit{end}}{1-t}
\end{aligned} \right . \end{aligned} \right .
\] \]