Sunday, May 17, 2009

Wumpus

Copperbox revision 601.

I've added a module for colour conversion - following PiScript's example I made the CTM in Wumpus introspective, so it seems natural to make current colour introspective too (introspective here means you can query the value as well as set it). Conversion functions were the first step for this, as the current colour in PostScript's graphics state can be accessed either as HSB or RGB.

I found writing the conversion formulas quite tricky - perhaps PostScript has a different representation of HSB to the first algorithms I tried. Certainly converting the equations from Gonzalez and Woods 'Digital Image Processing' didn't work for me. The best reference I found in the end was Dr. Uwe Kern's manual for the xcolor LaTeX package.

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.