I would really love to perform arbitrary affine (matrix) transformations on SB objects.
Matrix looks like this:
In OpenGL at least, applying the affine matrix is as easy as multiplying by the expanded matrix:
I'm sure something similar can be done using DirectX.
How is this useful? One can shear, pinch, scale, and rotate at once with one command. Paired with flux interpolation some very interesting effects can be created (read: primitive 3D!). If more convincing is needed I can provide mockups (though they may take a while to create).
The storyboard script should accept four parameters in this order: xdx, xdy, ydx, ydy.
Matrix looks like this:
= [ xdx xdy ]And the math:
Affine = [ ydx ydy ]
[ xdx xdy ] * ([ x ] - [ offsetx ]) + [ offsetx ] = [ newy ]
[ ydx ydy ] * ([ y ] - [ offsetx ]) + [ offsety ] = [ newx ]
In OpenGL at least, applying the affine matrix is as easy as multiplying by the expanded matrix:
([ xdx xdy 0 0 ])
([ ydx ydy 0 0 ])
([ 0 0 1 0 ])
glMultMatrix([ 0 0 0 1 ])
// i.e.
glMultMatrix({ xdx, xdy, 0, 0,
ydx, ydy, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1 });
I'm sure something similar can be done using DirectX.
How is this useful? One can shear, pinch, scale, and rotate at once with one command. Paired with flux interpolation some very interesting effects can be created (read: primitive 3D!). If more convincing is needed I can provide mockups (though they may take a while to create).
The storyboard script should accept four parameters in this order: xdx, xdy, ydx, ydy.