Difference between revisions of "Dev:Linking to Blines - Equations"

From Synfig Studio :: Documentation
Jump to: navigation, search
(One spline: calculations and typos)
(Main equations)
Line 8: Line 8:
  
 
* <math>(x,y) = (1-u)^3 (x_1,y_1) + 3 u(1-u)^2  (x^t_1,y^t_1) + 3 u^2 (1-u)  (x^t_2,y^t_2) + u^3 (x_2,y_2)</math> - bline point
 
* <math>(x,y) = (1-u)^3 (x_1,y_1) + 3 u(1-u)^2  (x^t_1,y^t_1) + 3 u^2 (1-u)  (x^t_2,y^t_2) + u^3 (x_2,y_2)</math> - bline point
 +
 +
Finding tangents:
 +
 +
* put a point on each line, some percentage of the way along each
 +
** M on (A,B): <math>(x_1,y_1)(1-u) + (x^t_1,y^t_1)u</math>
 +
** N on (B,C): <math>(x^t_1,y^t_1)(1-u) + (x^t_2,y^t_2)u</math>
 +
** K on (C,D): <math>(x^t_2,y^t_2)(1-u) + (x^2,y^2)u</math>
 +
* then draw new lines from the point on A-B to the point on B-C, and from the point on B-C to the point on C-D; and put new points on those 2, the same percentage of the way along each
 +
** T1 on (M,N): <math>M(1-u) + N u = ((x_1,y_1)(1-u) + (x^t_1,y^t_1)u)(1-u) + ((x^t_1,y^t_1)(1-u) + (x^t_2,y^t_2)u)u</math>
 +
** T2 on (N,K): <math>N(1-u) + K u = ((x^t_1,y^t_1)(1-u) + (x^t_2,y^t_2)u)(1-u) + ((x^t_2,y^t_2)(1-u) + (x^2,y^2)u) u</math>
 +
 +
Then:
 +
 
* <math>(x^t_L,y^t_L) = (1-u)^2 (x_1,y_1) + 2u(1-u)(x^t_1,y^t_1) + u^2(x^t_2,y^t_2)</math> - yellow tangent of bline point
 
* <math>(x^t_L,y^t_L) = (1-u)^2 (x_1,y_1) + 2u(1-u)(x^t_1,y^t_1) + u^2(x^t_2,y^t_2)</math> - yellow tangent of bline point
 
* <math>(x^t_N,y^t_N) = (1-u)^2 (x^t_1,y^t_1) + 2u(1-u)(x^t_2,y^t_2) + u^2(x_2,y_2)</math> - red tangent of bline point
 
* <math>(x^t_N,y^t_N) = (1-u)^2 (x^t_1,y^t_1) + 2u(1-u)(x^t_2,y^t_2) + u^2(x_2,y_2)</math> - red tangent of bline point

Revision as of 21:05, 7 March 2008

Main equations

  • 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,y_1), (x_2,y_2)} - points of bline vertex
  • 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^t_1,y^t_1), (x^t_2,y^t_2)} - tangent points
  • 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,y) } - current bline point
  • 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^t_L,y^t_L), (x^t_N,y^t_N)} - tangents of current point
  • u - Amount of current segment, [0,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 (x,y) = (1-u)^3 (x_1,y_1) + 3 u(1-u)^2 (x^t_1,y^t_1) + 3 u^2 (1-u) (x^t_2,y^t_2) + u^3 (x_2,y_2)} - bline point

Finding tangents:

  • put a point on each line, some percentage of the way along each
    • M on (A,B): 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,y_1)(1-u) + (x^t_1,y^t_1)u}
    • N on (B,C): 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^t_1,y^t_1)(1-u) + (x^t_2,y^t_2)u}
    • K on (C,D): 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^t_2,y^t_2)(1-u) + (x^2,y^2)u}
  • then draw new lines from the point on A-B to the point on B-C, and from the point on B-C to the point on C-D; and put new points on those 2, the same percentage of the way along each
    • T1 on (M,N): 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 M(1-u) + N u = ((x_1,y_1)(1-u) + (x^t_1,y^t_1)u)(1-u) + ((x^t_1,y^t_1)(1-u) + (x^t_2,y^t_2)u)u}
    • T2 on (N,K): 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 N(1-u) + K u = ((x^t_1,y^t_1)(1-u) + (x^t_2,y^t_2)u)(1-u) + ((x^t_2,y^t_2)(1-u) + (x^2,y^2)u) u}

Then:

  • 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^t_L,y^t_L) = (1-u)^2 (x_1,y_1) + 2u(1-u)(x^t_1,y^t_1) + u^2(x^t_2,y^t_2)} - yellow tangent of bline point
  • 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^t_N,y^t_N) = (1-u)^2 (x^t_1,y^t_1) + 2u(1-u)(x^t_2,y^t_2) + u^2(x_2,y_2)} - red tangent of bline point

One spline

Case: Bline A. A2 linked to A (with tangent).

A2 with its tangent belongs to A, so:

  • 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_{A2} = (1-u)^3 x_{A1} + 3u(1-u)^2 x^t_{A1} + 3u^2(1-u) x^t_{A2} + u^3 x_{A2}}
  • 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^t_{A2} = (1-u)^2 x_{A1} + 2u(1-u) x^t_{A1} + t^2 x^t_{A2}}

Let's find 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_{A2}} 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 x^t_{A2}} :

  • 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_{A2} = \frac{(1-u)^3 x_{A1} + 3u(1-u)^2 x^t_{A1} + 3u^2(1-u) x^t_{A2} }{1 - u^3}}
  • 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^t_{A2} = \frac{(1-u)^2 x_{A1} + 2u(1-u) x^t_{A1}} {1- t^2 }}

Two splines

...