Wednesday, June 10, 2009

Wumpus

Copperbox revision 624.

I've added a transformations module that wraps up the affine / matrix transformations.

This makes Wumpus feel somewhat more functional, for instance this function draws an asterisk dot:

asterisk (P2 x y) = zipWith fn (replicate 5 ls1) [0..4]
where
ls1 = vline origin 2
fn ln theta = translate x y $ rotate ((2*theta*pi)/5) ln


Of course, there is still some golfing to be done.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.