úÎF*DN      )Geometry helper functions and data types ch.howard@zoho.com Safe-Inferred*Interpreting circles as colorful pictures ch.howard@zoho.comNone All circles are white Takes a hue value (HSL) and returns a Gloss   =Provides a multi-colored interpretation which tends to scale . smoothly across the hues as the radius grows @Provides a multi-colored interpretation which gives a seemingly  random show of the hues     'Functions for bounding circle coverage ch.howard@zoho.com Safe-Inferred A   is a function which takes a  and determines if > it is inside some area. If the Point is outside the area, it  returns !1. Otherwise, it returns the distance to the edge  of the area. Any such  # need not be a simple, traditional A geometric shape. Though, it is often difficult to calculate the " distance for more exotic shapes.  Provides a  * for a circle of given origin and radius.  Provides a  0 for a rectangle of given origin and dimensions  origin radius %coordinate of the bottom left corner width height    Core packing functionality ch.howard@zoho.com Safe-InferredBThe initializing parameters for a particular packing image, minus . the actual display parameters such as color. "CAttempt to create a new Circle at specified Point. If the Point is B inside an existing circle, or does not fit a specified Boundary,  return Nothing ;Some sensible default parameters provided for convenience. #>Generates an infinite list of random points within some area. AGenerates an infinite list of circles, using a packing algorithm "+An optional maximum radius for new circles 4The point where we will attempt to place the circle ?the circles into which we are attempting to fit the new circle  An optional   for circle placement #width height  seed value of x-value generator  seed value of y-value generator initialization parameters  "#"Displaying packings on the screen ch.howard@zoho.comNoneHGenerating a packing from Packing parameters and convert into a Picture (Display a picture in a window on-screen &Display a picture in full-screen mode  graphical interpretation method initialization parameters #maximum number of circles to build width and height of window background color the Picture to display (width and height of actual display area background color the Picture to display !Re-exports the library functions ch.howard@zoho.comNone Examples to study ch.howard@zoho.comNone Packs a rectangle with circles.   example1 :: IO()  example1 =  do putStrLn "Packing. Please be patient." ' displayWindow (800, 600) black $ 9 buildPicture interpretation packing totalcircles 6 where packing = defaultPacking { boxWidth = 800.0, 7 boxHeight = 600.0, 0 seedX = 42, 0 seedY = 11, N boundary = Just (rectB (20, 20) 760 560), 6 startingCircles = B [Graphics.OscPacking.Circle N { position = (400, 300), radius = 10 }] }  totalcircles = 1500 + interpretation = cycling 0.05 200 Packs a circle with circles.   example2 :: IO()  example2 =  do putStrLn "Packing. Please be patient." ' displayWindow (800, 600) black $ 9 buildPicture interpretation packing totalcircles 6 where packing = defaultPacking { boxWidth = 600.0, 7 boxHeight = 600.0, 1 seedX = 331, 2 seedY = 2010, = boundary = Just (circleB < (600.0 / 2, 600.0 / 2) 250), 6 startingCircles = B [Graphics.OscPacking.Circle N { position = (300, 300), radius = 10 }] }  totalcircles = 1500 ' interpretation = colorful 270 $       !"#$%&'()*+,-.oscpacking-0.3.0.0Graphics.OscPacking.GeometryGraphics.OscPacking.InterpretGraphics.OscPacking.BoundaryGraphics.OscPacking.PackingGraphics.OscPacking.PaintGraphics.OscPacking.ExamplesGraphics.OscPackingMetricPointCirclepositionradius euclidean distToCircleInterpretation monoWhitehuecolorfulcyclingBoundarycircleBrectBPackingboxWidth boxHeight capRadiusboundarystartingCirclesseedXseedYdefaultPackingpack buildPicture displayWindowdisplayFullscreenexample1example2 gloss-1.7.8.3Graphics.Gloss.Data.ColorColorbase Data.MaybeNothingfit rndPoints