Wednesday, August 12, 2009

Wumpus

Copperbox revision 734.

Big changes. I've made the geometric objects - polygon, curve, line, bounding box - parametric on point type. Previously they were parametric on unit type - i.e. the point type was fixed at Point2 a where the a was some unit - usually Double. This means it's possible to create geometric objects with polar coordinates. Maybe this isn't a massive advantage in practice but it does seem conceptually better for polygon etc. to be parametric on point rather than unit.

Unfortunately the code is now pretty messy - Picture has had the minimum changes just to get some examples working again, and transformations have stopped working. There is still quite a bit of design needs to be done on the geometric objects (deciding what can be written once and what needs type classes to accommodate different point types). More positively I'm getting the hang of type families, so some of the type signatures have been simplified.

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.