for the FPS classicists... skew matrix constructor

db4
Joe Groff 2009-07-04 19:13:31 -05:00
parent ad2bffd4da
commit 96ec54106b
1 changed files with 10 additions and 0 deletions

View File

@ -77,6 +77,16 @@ IN: math.matrices
{ 0.0 0.0 -1.0 0.0 }
} ;
:: skew-matrix4 ( theta -- matrix )
theta tan :> zf
{
{ 1.0 0.0 0.0 0.0 }
{ 0.0 1.0 0.0 0.0 }
{ 0.0 zf 1.0 0.0 }
{ 0.0 0.0 0.0 1.0 }
} ;
! Matrix operations
: mneg ( m -- m ) [ vneg ] map ;