for the FPS classicists... skew matrix constructor

Joe Groff 2009-07-04 19:13:31 -05:00
parent 7377f5e2eb
commit 5c25c4ff81
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 ;