úΨ2 KF      !"#$%&'()*+,-./0123456789:;<=>?@ABCDE FThe OpenGL library doesn'%t seem to provide a nice way convert ' a Float to a GLfloat, even though they're the same thing  under the covers. )Using realToFrac is too slow, as it doesn't get fused in at  least GHC 6.12.1 FF G)Render a circle with the given thickness H:Decide how many line segments to use to render the circle I Render a circle with as a line. JK;Render a circle with a given thickness as a triangle strip LGHIJKLGHIJKL M-The commands suported by the view controller NOPQRSTUVWXMNOPQRSTUVWXYZ M XWVUTSRQPONNOPQRSTUVWX [Simulation state \]The iteration number we' re up to. ^7Whether the animation is free-running (or single step) _ASignals to callbackIdle to take a single step of the automation. `;Signals to callbackIdle to roll-back to the initial world. a?How many simulation setps to take for each second of real time b'How many seconds worth of simulation we've done so far cRecord how many steps we've been taking per frame [\]^_`abcd [\]^_`abc\]^_`abc e Dump the internal state of GLUT f.Dump internal state of the OpenGL framebuffer g.Dump internal state of the fragment renderer. efgefghHolds callback functions. ijklmhijklmhmlkjiijklm nAnimation State op"Whether the animation is running. q2Whether this is the first frame of the animation. r2Number of msec the animation has been running for sEThe time when we entered the display callback for the current frame. tu>Clamp the minimum time between frames to this value (in msec) 5 Most LCD monitors refresh at around 50Hz so setting  this to < 20msec probably isn't worthwhile. vCThe time when the last call to the users render function finished. wKThe time when displayInWindow last finished (after sleeping to clamp fps). x$How long it took to draw this frame nopqrstuvwxy n opqrstuvwxopqrstuvwxz$State for controlling the viewport. 3 These are used by the viewport control component. {|.The command list for the viewport controller. 9 These can be safely overwridden at any time by deleting / adding entries to the list. 3 Entries at the front of the list take precedence. }AHow much to scale the world by for each step of the mouse wheel. ~DHow many degrees to rotate the world by for each pixel of x motion. During viewport translation, , where the mouse was clicked on the window. €During viewport rotation, + where the mouse was clicked on the window The initial view state. z{|}~€z{|}~€{|}~€‚Render options settings ƒ„Whether to use color …%Whether to force wireframe mode only †Whether to use alpha blending ‡Whether to use line smoothing ‚ƒ„…†‡ˆ‚ƒ„…†‡ƒ„…†‡‰"Handles animation timing details. 0 Call this function at the start of each frame. Š"Handles animation timing details. . Call this function at the end of each frame. ‰Š‰Š‹4Callback to handle keyboard and mouse button events  for controlling the viewport. ‹‹ŒConvert degrees to radians Convert radians to degrees 4Normalise an angle to be between 0 and 2*pi radians Global translation. Global rotation (in degrees). .Global scaling (of both x and y coordinates). #The initial state of the viewport. ;Perform a rendering action whilst using the given viewport The viewport to use. !The rendering action to perform. Ž8The graphics library calls back on this function when it's finished drawing  and it's time to do some computation. the simulation state the animation statea the viewport state the current world the initial world fn to advance the world #how much time to advance world by  in single step mode ŽŽ An abstract color value. A We keep the type abstract so we can be sure that the components 7 are in the required range. To make a custom color use  . ‘CHolds the color components. All components lie in the range [0..1. CMake a custom color. All components are clamped to the range [0..1]. Red component. Green component. Blue component. Alpha component. DMake a custom color. All components are clamped to the range [0..255]. Red component. Green component. Blue component. Alpha component. %Take the RGBA components of a color. ’5Clamp components of a color into the required range. “=Normalise a color to the value of its largest RGB component. &Mix two colors with the given ratios. Ratio of first color. Ratio of second color.  First color. Second color. Resulting color. =Add RGB components of a color component-wise, then normalise G them to the highest resulting one. The alpha components are averaged. 9Make a dimmer version of a color, scaling towards black. ;Make a brighter version of a color, scaling towards white. Lighten a color, adding white. Darken a color, adding black. !A greyness of a given magnitude. "Range is 0 = black, to 1 = white.  !  !  !  !”#Convert one of our Colors to OpenGL's representation. ””•FOpen a window and use the supplied callbacks to handle window events. Name of the window. 'Initial size of the window, in pixels. 7Initial position of the window, in pixels relative to $ the top left corner of the screen. Color to use when clearing. Callbacks to use ••"A 2D picture. #(A picture consisting of several others. $/A picture scaled by the given x and y factors. %3A picture rotated by the given angle (in degrees). &7A picture translated by the given x and y coordinates. '!A picture drawn with this color. (&Some text to draw with a vector font. )_A circle with the given thickness and radius. If the thickness is 0 then this is equivalent to *. * A circle with the given radius. + A line along an arbitrary path. ,%A polygon filled with a solid color. -%A blank picture, with nothing in it. .A path through the x-y plane. /3A vector can be treated as a point, and vis-versa. 0A point on the x-y plane. "#$%&'()*+,-./00/."-,+*)('&%$#" -,+*)('&%$##$%&'()*+,-./0 1The magnitude of a vector. 26The angle of this vector, relative to the +ve x-axis. 3 The dot product of two vectors. 4 The determinant of two vectors. 5Multiply a vector by a scalar. 6JRotate a vector by an angle (in radians). +ve angle is counter-clockwise. 7:Compute the inner angle (in radians) between two vectors. 80Normalise a vector, so it has a magnitude of 1. 9CProduce a unit vector at a given angle relative to the +ve x-axis. # The provided angle is in radians. –Pretend a vector is a number.  Vectors aren'4t real numbes according to Haskell, because they don't F support the multiply and divide field operators. We can pretend they A are though, and use the (+) and (-) operators as component-wise  addition and subtraction. 123456789 123456789 123456789—4Callback to handle keyboard and mouse button events  for controlling the viewport. ref to ViewPort state ref to ViewPort Control state ——˜4Callback to handle keyboard and mouse button events  for controlling the viewport. ref to ViewPort state ref to ViewPort Control state ˜˜:(Given an infinite line which intersects P1 and P1, 2 return the point on that line that is closest to P3 P1 P2 P3 /the point on the line P1-P2 that is closest to P3 ;3Given an infinite line which intersects P1 and P2, 8 let P4 be the point on the line that is closest to P3. GReturn an indication of where on the line P4 is relative to P1 and P2.   if P4 == P1 return 0  if P4 == P2 return 1 4 if P4 is halfway between P1 and P2 then return 0.5 P1 P2 P3 :;:;:;123456789:;<A closed loop along this path. =1A wireframe rectangle centered about the origin. width height >-A solid rectangle centered about the origin. width height ?;A path representing a rectangle centered about the origin. width height @:A wireframe rectangle in the y > 0 half of the x-y plane. width height A5A sold rectangle in the y > 0 half of the x-y plane. width height BDA path representing a rectangle in the y > 0 half of the x-y plane. width height <=>?@AB<=>?@AB<=>?@AB™>Render a picture using the given render options and viewport. The render options to use The current viewport. The picture to render. šTurn alpha blending on or off Turn line smoothing on or off ™™C1Open a new window and display the given picture. 4Use the following commands once the window is open:  Quit - esc-key. . Move Viewport - left-click drag, arrow keys. E Rotate Viewport - right-click drag, control-left-click drag, or home/ end-keys. ( Zoom Viewport - mouse wheel, or page up/ down-keys. Name of the window. 'Initial size of the window, in pixels. +Initial position of the window, in pixels. Background color. The picture to draw. CCD3Open a new window and display the given animation. >Once the window is open you can use the same commands as with displayInWindow. Name of the window. 'Initial size of the window, in pixels. +Initial position of the window, in pixels. Background color. 2Function to produce the next frame of animation. = It is passed the time in seconds since the program started. DDEXRun a finite-time-step simulation in a window. You decide how the world is represented, ] how to convert the world to a picture, and how to advance the world for each unit of time.  This function does the rest. >Once the window is open you can use the same commands as with displayInWindow. Name of the window. 'Initial size of the window, in pixels. +Initial position of the window, in pixels. Background color. ANumber of simulation steps to take for each second of real time. The initial world. +A function to convert the world a picture. >A function to step the world one iteration. It is passed the = current viewport and the amount of time for this simulation  step (in seconds). EE1  !"#$%&'()*+,-./0CDECDE› !"##$%&'()*+,-./0123456789:;<=>?@ABCDE(FGHIJKLMNOPQRSTUVWXYZ[\]^_`abc d e f g h i j k l m n o p q r s t u v w x y y z { | } ~  € ‚ ƒ „…†‡ˆ‰Šyy‹ŒŽ‘’“yy”•–—˜™™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°± gloss-1.0.0.2Graphics.Gloss.Geometry.AngleGraphics.Gloss.ViewPortGraphics.Gloss.ColorGraphics.Gloss.PictureGraphics.Gloss.Geometry.VectorGraphics.Gloss.Geometry.LineGraphics.Gloss.ShapesGraphics.Gloss&Graphics.Gloss.Internals.Render.Common&Graphics.Gloss.Internals.Render.Circle3Graphics.Gloss.Internals.Interface.ViewPort.Command1Graphics.Gloss.Internals.Interface.Simulate.State(Graphics.Gloss.Internals.Interface.Debug+Graphics.Gloss.Internals.Interface.Callback0Graphics.Gloss.Internals.Interface.Animate.State8Graphics.Gloss.Internals.Interface.ViewPort.ControlState'Graphics.Gloss.Internals.Render.Options1Graphics.Gloss.Internals.Interface.Animate.Timing3Graphics.Gloss.Internals.Interface.ViewPort.Reshape.Graphics.Gloss.Internals.Interface.Common.Exit(Graphics.Gloss.Internals.Render.ViewPort0Graphics.Gloss.Internals.Interface.Simulate.IdleGraphics.Gloss.Internals.Color)Graphics.Gloss.Internals.Interface.Window4Graphics.Gloss.Internals.Interface.ViewPort.KeyMouse2Graphics.Gloss.Internals.Interface.ViewPort.MotionGraphics.Gloss.Geometry'Graphics.Gloss.Internals.Render.Picture*Graphics.Gloss.Internals.Interface.Display*Graphics.Gloss.Internals.Interface.Animate+Graphics.Gloss.Internals.Interface.SimulatedegToRadradToDegnormaliseAngleViewPortviewPortTranslateviewPortRotate viewPortScale viewPortInitColor makeColor makeColor8 rgbaOfColor mixColors addColorsdimbrightlightdarkgreyNblackwhiteredgreenblueyellowcyanmagentarosevioletazure aquamarine chartreuseorangePicturePicturesScaleRotate TranslateText ThickCircleCircleLinePolygonBlankPathVectorPointmagVargVdotVdetVmulSVrotateVangleVV normaliseVunitVectorAtAngleclosestPointOnLineclosestPointOnLine_paramlineLoop rectangleWirerectangleSolid rectanglePathrectangleUpperWirerectangleUpperSolidrectangleUpperPathdisplayInWindowanimateInWindowsimulateInWindowgf renderCircle circleStepsrenderCircleLinerenderCircleLine_steprenderCircleStriprenderCircleStrip_stepCommandCBumpCClockwiseCBumpClockwise CBumpDownCBumpUp CBumpRight CBumpLeft CBumpZoomIn CBumpZoomOutCRotate CTranslateCRestoredefaultCommandConfig isCommandStatestateIterationstateRun stateStep stateResetstateResolution stateSimTimestateStepsPerFrame stateInit dumpGlutStatedumpFramebufferStatedumpFragmentStateCallbackReshapeMotionIdleKeyMouseDisplay stateAnimatestateAnimateStartstateAnimateTimestateDisplayTimestateDisplayTimeLaststateDisplayTimeClampstateGateTimeStartstateGateTimeEndstateGateTimeElapsed stateCommandsstateScaleStepstateRotateFactorstateTranslateMarkstateRotateMarkOptions optionsColoroptionsWireframeoptionsBlendAlphaoptionsLineSmooth optionsInit animateBegin animateEndcallback_viewPort_reshape callback_exit withViewPortcallback_simulate_idle simulate_run simulate_stepRGBA clampColornormaliseColorglColor4OfColor createWindow$fNum(,)callback_viewPort_keyMousecallback_viewPort_motion renderPicture vertexPFs