úÎYÍU Q      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP ghcunstableAndy Gill <andygill@ku.edu>QA Z buffer style Z value for a point, where lower numbers are nearer the viewer.  Assumes no transparency. +Channels with alpha component, the channel is pre-scaled.   C a set of values. weighting can be achived using multiple entries. &average is not defined for empty list )Linear interpolation between two values.  ; something by a value. scaling value can be bigger than 1. For placing a value literally over another value. The 2nd value might shine through.  The operation must be assocative.  Angle units A point in R2. 1Unit Interval: value between 0 and 1, inclusive. A real number. Close to zero; needed for Over (Alpha c) instance. E stacks a list of things over each other, where earlier elements are  later elements. H Requires non empty lists, which can be satisfied by using an explicity  transparent Board as one of the elements. G builds something that has an alpha channel, and is completely opaque. L builds something that has an alpha channel, and is completely transparent. 4 builds somethings that has a specific alpha value. > removes the alpha component, and returns the channel inside. Q  over pairs       ghcunstableAndy Gill <andygill@ku.edu>LinnerSteps takes n even steps from 0 .. 1, by not actually touching 0 or 1.  The first and last step are 1/62 the size of the others, so that repeated innerSteps  can be tiled neatly. OouterSteps takes n even steps from 0 .. 1, starting with 0, and ending with 1,  returning n+1 elements. "Extract the fractional part of an R. 1Covert a Bool (mask point) into a unit interval. 'sample a UI, giving a point of a mask. /Use a mask to create a Just value, or Nothing. !*With a default if you do not have a Just. "" between two values. #is a Point inside a region? $is a PointN inside a circle, where the first two arguments are the center of the circle,  and the radius. % What is the % between two points in R2? ' This is optimised for the normal form distance p1 p2 <= v, which avoids using sqrt. R&&P find the place on a line (between 0 and 1) that is closest to the given point. '()*OcircleOfDots generates a set of points between (-1..1,-1..1), inside a circle.  !"#$%&'()*'() !"#$%&* !"#$%&'()*ghcunstableAndy Gill <andygill@ku.edu> +,+7 is our color, with values between 0 and 1, inclusive. ,--- is just a value between 0 and 1, inclusive. 6 Be careful to consider if this is pre or post gamma. ./012345 +,-./012345 -+,./012345 +,,-./012345ghcunstableAndy Gill <andygill@ku.edu> 6 '''Board'''M is our primary data type, an infinite flat surface (or R2 field) of values.  Conceptually, Board a = Point -> a. S78"move a Board by specified vector. 9A non-overloaded version of / which takes a independent x and y coordinate. :rotate the Board. ;;* crops a Board, based on a masking Board. << field or 60, where each point is its own coordinate in R2. ="build a rectangle mask or region. >9build a circular mask or region, with a circle of radius R , and center Point. 6789:;<=>67<=>98:; 6789:;<=>ghcunstableAndy Gill <andygill@ku.edu>?&unit circle, radius 0.5, over origin. @(unit vertical bar, 1 wide over origin. A)unit horizontal bar, 1 high over origin. Bunit square, 1x1 over origin. C"cheacker board, with squares 1x1. D Given two Point4s, and a thickness, draw a line between the points. & line :: Line -> Double -> Board Bool E-A line generated by sampling a function from R to Points, D with a specific width. There needs to be at least 2 sample points. Flarrowhead is a triangle, pointing straight up, height 1, width 1, with the (0,0) at the center of the base. ?@ABCDEF?@ABCDEF?@ABCDEFghcunstableAndy Gill <andygill@ku.edu>GG/ turns a Board into a 2D Array (pixelization). Vthe x,y size of the image to be captured. We assume the bottom left hand size is 0,0. ^the square root of the amount of super-sampling to be done. I recommend 3, which is 9 points. the board to sample. the result array. HH? turns a 2D Array into a Board, using bi-linear inteprelation. TUIJJ2 quantized based on a simple, pointwise function. KK0 quantized using the Floyd Steinberg algorithm. GHIJKGHJKIGHIJKghcunstableAndy Gill <andygill@ku.edu> VWXYLL^ generates a board of ascii characters, where each char is two pixels, one wide and two high. MM^ generates a board of ascii characters, where each char is two pixels, one wide and two high. f we uses digits 1 .. 9, then 0 (highest) to represent intensity, adding the two pixels for each char. Z[\LMLMLMghcunstableAndy Gill <andygill@ku.edu>NN! reads a PPM file, and outputs a Board , and the x and y dimensions of the image. OreadBPM! reads a PPM file, and outputs a Board , and the x and y dimensions of the image. PP% writes a PPM file, based on a color Board., where bottom left corner of the image is as (0,0). NOPNOPNOP ghcunstableAndy Gill <andygill@ku.edu>Q  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP]     !"#$%&'()*+,-./01234556789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[?\]^_`abcdechalkboard-0.2Graphics.Chalkboard.BoardGraphics.Chalkboard.TypesGraphics.Chalkboard.UtilsGraphics.Chalkboard.ColorGraphics.Chalkboard.ShapesGraphics.Chalkboard.ArrayGraphics.Chalkboard.AsciiGraphics.Chalkboard.PPMGraphics.ChalkboardbaseControl.Applicative Applicative<**><*>pureZAlphaAverageaverageLerplerpScalescaleOveroverRadianPointUIRnearZerostackalpha transparent withAlphaunAlpha innerSteps outerStepsfracPart interpBoolsampleUIwithMask withDefaultchoose insideRegion insideCircledistanceintervalOnLine fromPolartoPolar angleOfLine circleOfDotsRGBGrayredgreenbluewhiteblackcyanpurpleyellowBoardlookupmovescaleXYrotatecropcoordmaskForcircularMaskForcirclevbarhbarsquarechecker straightline functionline arrowhead boardToArray arrayToBoard widthHeight thresholdfloydSteinbergtoAsciitoCountreadPPMreadPBMwritePPM $fLerp(,) distanceLe arrayToBoard'closeInkMostInkSomeInkNoInktoAsciiWithPensampleT sampleInk