1 / 1

H askell G raphics L ibrary

Aim To create a graphics library for Haskell which produces attractive graphics and provides a flexible array of manipulation functions whilst keeping into consideration the library will be used for learning and therefore must be understandable by people who are not experienced at using Haskell.

Télécharger la présentation

H askell G raphics L ibrary

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Aim To create a graphics library for Haskell which produces attractive graphics and provides a flexible array of manipulation functions whilst keeping into consideration the library will be used for learning and therefore must be understandable by people who are not experienced at using Haskell. HaskellGraphicsLibrary Example The Current Situation First year computer science students at UKC are required to take a module in Haskell, a functional programming language. In this module students are taught how to use this language in various ways, one of which is in the form of manipulating an image. However the term ‘image’ here is meant as lists of strings of ASCII characters ‘#’ or ‘.’ which made up a fairly simple image. The ‘horse’ example shown below: , This graphics library is the work of Matthew Forrest for a third year research project. Created using HEAT ( Haskell Educational Advancement Tool ). Supervised by Olaf Chitil. Example input used to construct image shown right A simple scene constructed with the input, left .......##... .....##..#.. ...##.....#. ..#.......#. ..#...#...#. ..#...###.#. .#....#..##. ..#...#..... ...#...#.... ....#..#.... .....#.#.... ......##.... • Features • Utilises PDF as its output type to produce rendered vector graphics • Functionality for the creation of lines, rectangles, ellipses and polygons • Uses RGB colour model to specify ranges of colours to objects • Functionality for transformations such as translation, scaling and rotation. • Input checking to avoid errors It is clearly apparent here that the old version (left) is less attractive than even a very simple implementation of it in HGL (right).

More Related