Matrix.Compute.Transformation.FollowPath

This node generates a 4 x 4 transformation matrix by following a 2D path.

The position input slot allows choosing the location on the shape's path in the range 0.0 to 1.0, where 0.0 refers to the beginning of the shape's path and 1.0 to the end of the path. By slowing increasing the position input from 0.0 to 1.0 over time, the transformation is following the shape's path over time.

If the rotate flag is not set, the generated transformation contains only positional change (translation). If the rotate flag is set, the generated transformation contains translation and rotation.

The 2D path can be defined via the path data text input slot. Each command in the path data consist of a command character followed by several numeric parameter values:

Command characterNumber of numeric valuesExampleExample semantic
M2M 30 40Move to absolute position $x=30$, $y=40$
m2m 10 20Move to relative position $x=\tilde{x}+20$, $y=\tilde{y}+10$, where $\tilde{x}$ and $\tilde{y}$ define the position after execution of the previous command
L2L 50 60Line to absolute position $x=50$, $y=60$
l2l 20 10Line to relative position $x=\tilde{x}+20$, $y=\tilde{y}+10$
H1H 50 Horizontal line to absolute $x$-position $x=50$, $y=\tilde{y}$
h1h 20 Horizontal line to relative $x$-position $x=\tilde{x}+20$, $y=\tilde{y}$
V1V 10 Vertical line to absolute $y$-position $x=\tilde{x}$, $y=10$
v1v 10 Vertical line to relative $y$-position $x=\tilde{x}$, $y=\tilde{y}+10$
C6C 10 20 30 40 50 60Cubic Bézier curve to absolute position
$x=50$, $y=60$, where $x_1=10$, $y_1=20$ and $x_2=30$, $y_2=40$ define the absolute positions of the curve's control points
c6c 10 20 30 40 50 60Cubic Bézier curve to relative position
$x=\tilde{x}+50$, $y=\tilde{y}+60$, where $x_1=\tilde{x}+10$, $y_1=\tilde{y}+20$ and $x_2=\tilde{x}+30$, $y_2=\tilde{y}+40$ define the positions of the curve's control points
S4C 30 40 50 60Cubic Bézier curve to absolute position
$x=50$, $y=60$, where $x_1=2\tilde{x}-\tilde{x}_2$, $y_1=2\tilde{y}-\tilde{y}_2$ and $x_2=30$, $y_2=40$ define the positions of the curve's control points
s4c 30 40 50 60Cubic Bézier curve to relative position
$x=\tilde{x}+50$, $y=\tilde{y}+60$, where $x_1=2\tilde{x}-\tilde{x}_2$, $y_1=2\tilde{y}-\tilde{y}_2$ and $x_2=\tilde{x}+30$, $y_2=\tilde{y}+40$ define the positions of the curve's control points
Q4Q 10 20 50 60Quadratic Bézier curve to absolute position
$x=50$, $y=60$, where $x_1=10$, $y_1=20$ define the absolute position of the curve's control point
q4c 10 20 50 60Quadratic Bézier curve to relative position
$x=\tilde{x}+50$, $y=\tilde{y}+60$, where $x_1=\tilde{x}+10$, $y_1=\tilde{y}+20$ define the position of the curve's control point
T2T 50 60Quadratic Bézier curve to absolute position
$x=50$, $y=60$, where $x_1=2\tilde{x}-\tilde{x}_1$, $y_1=2\tilde{y}-\tilde{y}_1$ define the position of the curve's control point
t2t 50 60Quadratic Bézier curve to relative position
$x=\tilde{x}+50$, $y=\tilde{y}+60$, where $x_1=2\tilde{x}-\tilde{x}_1$, $y_1=2\tilde{y}-\tilde{y}_1$ define the position of the curve's control point
Z0Zcloses the current path
z0zcloses the current path

Detailed explanation of the SVG path data format can be found in the SVG specification. The elliptical arc commands "A" and "a" are currently not fully supported.