Relative tangents

O'kay, I know, the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle (x_{t1},y_{t1}), (x_{t2},y_{t2})}
defining absolute position of tangents, but in synfig we have their coordinates relative to vertex. Moreover, coordinates of yellow tangent are inverted.

Each line in matrix or column vector corresponding to particular vertex or it's tangent.

After solving system we will find column vector Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \alpha}
which have form: Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle (x^{[1]}_1,\Delta x^{[1]}_{t1},\Delta x^{[1]}_{t2},x^{[1]}_2, x^{[2]}_1,\Delta x^{[2]}_{t1},\Delta x^{[2]}_{t2},x^{[2]}_2, ... ,x^{[N]}_1,\Delta x^{[N]}_{t1},\Delta x^{[N]}_{t2},x^{[N]}_2)}
where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle x^{[i]}_j}
- point j of bline [i] and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \Delta x^{[i]}_tj}
tangent of point j of bline i. From this vector we could retrieve x coordinate of desired vertex or tangent.

So:

the first line of each matrix or column vector corresponding to first vertex of first bline,

second line - corresponding to tangent of first vertex of first bline,

third line - to tangent of second vertex of first bline,

fourth - second vertex of first bline,

fifth - first vertex of second bline,

sixth - tangent of first vertex of second bline,

...and so on...

NOTE: Talking about bline we are talking about single (!) segment of bline which engaged in loop. That's why I not specify which tangent (yellow or red) we using - it's always tangent for current segment.

Column vector Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \beta}
have following structure. If position of vertex/tangent corresponding to vector element is "static" (i.e. it's not linked any other bline segment of the loop) then vector element is Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \beta_i}
where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \beta_i}
is current x coordinate of this vector/tangent. If vertex/tangent is not "static" then corresponding vector element is zero.

NOTE: When we calling vertex position "static" it's not means what vertex not linked to anything. The vertex could be linked to bline and still considered as "static" if that bline is not engaged into loop what we processing.

B matrix is zero-filled 4Nx4N matrix which we modifying in folowing way (rows and columns in matrix are numbered from 1):

if first vertex of bline [i] is linked to bline [j] then element at ( (i-1)*4+1 , (i-1)*4+1 ) = 1

if tangent of first vertex of bline [i] is linked to bline [j] then element at ( (i-1)*4+2 , (i-1)*4+2 ) = 1

if tangent of second vertex of bline [i] is linked to bline [j] then element at ( (i-1)*4+3 , (i-1)*4+3 ) = 1

if second vertex of bline [i] is linked to bline [j] then element at ( (i-1)*4+4 , (i-1)*4+4 ) = 1

if first vertex of bline [i] is linked to bline [j] then element at position ( (i-1)*4+1, (i-1)*4+1 ) replaced with zero and elements in line (i-1)*4+1 at positions (j-1)*4+1, (j-1)*4+2, (j-1)*4+3, (j-1)*4+4 are replaced with Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle c^{[j]}_1(u^{[i]}_1), c^{[j]}_2(u^{[i]}_1), c^{[j]}_3(u^{[i]}_1), c^{[j]}_4(u^{[i]}_1)}

if tangent of first vertex of bline [i] is linked to bline [j] then element at position ( (i-1)*4+2, (i-1)*4+2 ) replaced with zero and elements in line (i-1)*4+2 at positions (j-1)*4+1, (j-1)*4+2, (j-1)*4+3, (j-1)*4+4 are replaced with Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle c^{[j]}_{t1}(u^{[i]}_1), c^{[j]}_{t2}(u^{[i]}_1), c^{[j]}_{t3}(u^{[i]}_1), c^{[j]}_{t4}(u^{[i]}_1)}

if tangent of second vertex of bline [i] is linked to bline [j] then element at position ( (i-1)*4+3, (i-1)*4+3 ) replaced with zero and elements in line (i-1)*4+3 at positions (j-1)*4+1, (j-1)*4+2, (j-1)*4+3, (j-1)*4+4 are replaced with Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle c^{[j]}_{t1}(u^{[i]}_2), c^{[j]}_{t2}(u^{[i]}_2), c^{[j]}_{t3}(u^{[i]}_2), c^{[j]}_{t4}(u^{[i]}_2)}

if second vertex of bline [i] is linked to bline [j] then element at position ( (i-1)*4+4, (i-1)*4+4 ) replaced with zero and elements in line (i-1)*4+4 at positions (j-1)*4+1, (j-1)*4+2, (j-1)*4+3, (j-1)*4+4 are replaced with Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle c^{[j]}_1(u^{[i]}_2), c^{[j]}_2(u^{[i]}_2), c^{[j]}_3(u^{[i]}_2), c^{[j]}_4(u^{[i]}_2)}

where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle u^{[i]}_k}
is a position of vertex/tangent k of bline [i] on bline which it's linked to.

Examples

Ok, I sure you guys are wondering how is this work. (I personally wondering IF this works or not :D).
Let's view some examples.

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle X^{[i]}_j}
is a constant value of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle x^{[i]}_j}
and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \Delta X^{[i]}_{j}}
is a constant value of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \Delta x^{[i]}_{j}}
.
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle u^{[2]}_2}
is a position of vertex 2 of bline [2] on the bline which it's linked to (i.e. bline [1]).
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle u^{[1]}_1}
is a position of vertex 1 of bline [1] on the bline which it's linked to (i.e. bline [2]).

Conclusion

Maybe formulas are not correct, but I think you've got the idea:
For N Bline segments in loop we have 4N equations. If vertex is linked then we got appropriate equation, depending on what is linked. If vertex is not linked - just assigning constants.

Search

Tools

Content of this Synfig Studio Documentation Wiki is available under the terms of Creative Commons Attribution-Share Alike 3.0 license.
By contributing here you agree that the same license will be applied to your writing. If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it to this wiki. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!