diff --git a/docs/chapters/moulding/content.en-GB.md b/docs/chapters/moulding/content.en-GB.md
index 01e8f446..8f52339d 100644
--- a/docs/chapters/moulding/content.en-GB.md
+++ b/docs/chapters/moulding/content.en-GB.md
@@ -24,8 +24,8 @@ In addition to the `A`, `B`, and `C` values, we also see the points `e1` and `e2
\[
\left \{ \begin{aligned}
- v1 &= A' - \frac{A' - e1}{1 - t} \\
- v2 &= A' - \frac{A' - e2}{t}
+ v_1 &= A' - \frac{A' - e_1}{1 - t} \\
+ v_2 &= A' - \frac{A' - e_2}{t}
\end{aligned} \right .
\]
@@ -33,8 +33,8 @@ After which computing the new control points is straight-forward:
\[
\left \{ \begin{aligned}
- C1' &= start + \frac{v1 - start}{t} \\
- C2' &= end + \frac{v2 - end}{1 - t}
+ C_1' &= start + \frac{v_1 - start}{t} \\
+ C_2' &= end + \frac{v_2 - end}{1 - t}
\end{aligned} \right .
\]
@@ -42,7 +42,42 @@ So let's put that into practice:
Armed with knowledge of the "ABC" relation, we can now update a curve interactively, by letting people click anywhere on the curve, find the t-value matching that coordinate, and then letting them drag that point around. With every drag update we'll have a new point "B", which we can combine with the fixed point "C" to find our new point A. Once we have those, we can reconstruct the de Casteljau skeleton and thus construct a new curve with the same start/end points as the original curve, passing through the user-selected point B, with correct new control points.
In addition to the A
, B
, and C
values, we also see the points e1
and e2
, without which constructing our de Casteljau "strut lines" becomes very difficult indeed; as well as the points v1
and v2
, which we can construct when we know our ABC values enriched with e1
and e2
:
After which computing the new control points is straight-forward:
-So let's put that into practice:
So that looks pretty good, but you may not like having e1
and e2
stay the same distances away from B'
while moving the point around. An alternative is to scale the distances of e1
and e2
to B'
to match the scaling that A
--C
undergoes as A'
--C
' - whether this looks better or not depends somewhat on your intention as programmer or user, of course, so the following graphic applies this scaling, but it's up to you to decide whether or not that looks better (or, more appropriately, under which circumstances you might want to apply this scaling vs. when you might not):
So that looks pretty good, but you may not like having e1
and e2
stay the same distances away from B'
while moving the point around, and want to rearrange those to lead to "cleaner looking" curve manipulation. Unfortunately, there are so many differen ways in which we can do this that figuring out "good looking" alternatives, given what the curve is being manipulated for, could be an entire book on its own... so we're only going to look at one way that you might effect alternative e1
and e2
points, based on the idea of rotating a vector.
If we treat point B
as a "a vector originating at C
" then we can treat the points e1
and e2
as offets (let's call these d1
and d2
) of that vector, where:
Which means that:
+Now, if we now B
to some new coordinate B'
we can treat that "moving of the coordinate" as a rotation and scaling of the vector for B
instead. If the new point B'
is the same distance away from C
as B
was, this is a pure rotation, but otherwise the length of the vector has decreased or increased by some factor.
We can use both those values to change where e1
and e2
end up, and thus how our curve moulding "feels", by placing new e1'
and e2'
where:
Here, the rotate()
function rotates a vector (in this case d1
or d2
) around some point (in this case, B'
), by some angle (in this case, the angle by which we rotated our original B
to become B'
). So what does that look like?
As you can see, this is both better, and worse, depending on what you're trying to do with the curve, and there are many different ways in which you can try to change e1
and e2
such that they behave "as users would expect them to" based on the context in which you're implementing curve moulding. You might want to add reflections when B'
crosses the baseline, or even some kind of weight-swapping when B'
crosses the midline (perpendicular to the baseline, at its mid point), and instead of scaling both points with respects to C
, you might want to scale them to coordinates 1/2rd and 2/3rd along the baseline, etc. etc.
There are too many options to go over here, so: the best behaviour is, of course, the behaviour you think is best, and it might be a lot of work to find that and/or implement that!
Armed with knowledge of the "ABC" relation, we can now update a curve interactively, by letting people click anywhere on the curve, find the t-value matching that coordinate, and then letting them drag that point around. With every drag update we'll have a new point "B", which we can combine with the fixed point "C" to find our new point A. Once we have those, we can reconstruct the de Casteljau skeleton and thus construct a new curve with the same start/end points as the original curve, passing through the user-selected point B, with correct new control points.
In addition to the A
, B
, and C
values, we also see the points e1
and e2
, without which constructing our de Casteljau "strut lines" becomes very difficult indeed; as well as the points v1
and v2
, which we can construct when we know our ABC values enriched with e1
and e2
:
After which computing the new control points is straight-forward:
-So let's put that into practice:
So that looks pretty good, but you may not like having e1
and e2
stay the same distances away from B'
while moving the point around. An alternative is to scale the distances of e1
and e2
to B'
to match the scaling that A
--C
undergoes as A'
--C
' - whether this looks better or not depends somewhat on your intention as programmer or user, of course, so the following graphic applies this scaling, but it's up to you to decide whether or not that looks better (or, more appropriately, under which circumstances you might want to apply this scaling vs. when you might not):
So that looks pretty good, but you may not like having e1
and e2
stay the same distances away from B'
while moving the point around, and want to rearrange those to lead to "cleaner looking" curve manipulation. Unfortunately, there are so many differen ways in which we can do this that figuring out "good looking" alternatives, given what the curve is being manipulated for, could be an entire book on its own... so we're only going to look at one way that you might effect alternative e1
and e2
points, based on the idea of rotating a vector.
If we treat point B
as a "a vector originating at C
" then we can treat the points e1
and e2
as offets (let's call these d1
and d2
) of that vector, where:
Which means that:
+Now, if we now B
to some new coordinate B'
we can treat that "moving of the coordinate" as a rotation and scaling of the vector for B
instead. If the new point B'
is the same distance away from C
as B
was, this is a pure rotation, but otherwise the length of the vector has decreased or increased by some factor.
We can use both those values to change where e1
and e2
end up, and thus how our curve moulding "feels", by placing new e1'
and e2'
where:
Here, the rotate()
function rotates a vector (in this case d1
or d2
) around some point (in this case, B'
), by some angle (in this case, the angle by which we rotated our original B
to become B'
). So what does that look like?
As you can see, this is both better, and worse, depending on what you're trying to do with the curve, and there are many different ways in which you can try to change e1
and e2
such that they behave "as users would expect them to" based on the context in which you're implementing curve moulding. You might want to add reflections when B'
crosses the baseline, or even some kind of weight-swapping when B'
crosses the midline (perpendicular to the baseline, at its mid point), and instead of scaling both points with respects to C
, you might want to scale them to coordinates 1/2rd and 2/3rd along the baseline, etc. etc.
There are too many options to go over here, so: the best behaviour is, of course, the behaviour you think is best, and it might be a lot of work to find that and/or implement that!
Armed with knowledge of the "ABC" relation, we can now update a curve interactively, by letting people click anywhere on the curve, find the t-value matching that coordinate, and then letting them drag that point around. With every drag update we'll have a new point "B", which we can combine with the fixed point "C" to find our new point A. Once we have those, we can reconstruct the de Casteljau skeleton and thus construct a new curve with the same start/end points as the original curve, passing through the user-selected point B, with correct new control points.
In addition to the A
, B
, and C
values, we also see the points e1
and e2
, without which constructing our de Casteljau "strut lines" becomes very difficult indeed; as well as the points v1
and v2
, which we can construct when we know our ABC values enriched with e1
and e2
:
After which computing the new control points is straight-forward:
-So let's put that into practice:
So that looks pretty good, but you may not like having e1
and e2
stay the same distances away from B'
while moving the point around. An alternative is to scale the distances of e1
and e2
to B'
to match the scaling that A
--C
undergoes as A'
--C
' - whether this looks better or not depends somewhat on your intention as programmer or user, of course, so the following graphic applies this scaling, but it's up to you to decide whether or not that looks better (or, more appropriately, under which circumstances you might want to apply this scaling vs. when you might not):
So that looks pretty good, but you may not like having e1
and e2
stay the same distances away from B'
while moving the point around, and want to rearrange those to lead to "cleaner looking" curve manipulation. Unfortunately, there are so many differen ways in which we can do this that figuring out "good looking" alternatives, given what the curve is being manipulated for, could be an entire book on its own... so we're only going to look at one way that you might effect alternative e1
and e2
points, based on the idea of rotating a vector.
If we treat point B
as a "a vector originating at C
" then we can treat the points e1
and e2
as offets (let's call these d1
and d2
) of that vector, where:
Which means that:
+Now, if we now B
to some new coordinate B'
we can treat that "moving of the coordinate" as a rotation and scaling of the vector for B
instead. If the new point B'
is the same distance away from C
as B
was, this is a pure rotation, but otherwise the length of the vector has decreased or increased by some factor.
We can use both those values to change where e1
and e2
end up, and thus how our curve moulding "feels", by placing new e1'
and e2'
where:
Here, the rotate()
function rotates a vector (in this case d1
or d2
) around some point (in this case, B'
), by some angle (in this case, the angle by which we rotated our original B
to become B'
). So what does that look like?
As you can see, this is both better, and worse, depending on what you're trying to do with the curve, and there are many different ways in which you can try to change e1
and e2
such that they behave "as users would expect them to" based on the context in which you're implementing curve moulding. You might want to add reflections when B'
crosses the baseline, or even some kind of weight-swapping when B'
crosses the midline (perpendicular to the baseline, at its mid point), and instead of scaling both points with respects to C
, you might want to scale them to coordinates 1/2rd and 2/3rd along the baseline, etc. etc.
There are too many options to go over here, so: the best behaviour is, of course, the behaviour you think is best, and it might be a lot of work to find that and/or implement that!