{"id":16012735,"url":"https://github.com/siraben/functional-images","last_synced_at":"2026-05-02T03:32:01.374Z","repository":{"id":111747706,"uuid":"277500501","full_name":"siraben/functional-images","owner":"siraben","description":"Replicating the Functional Images paper by Conal Elliott using Haskell, C and SDL2.","archived":false,"fork":false,"pushed_at":"2020-07-06T09:59:05.000Z","size":7256,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-04T11:08:28.556Z","etag":null,"topics":["c","functional-reactive-programming","haskell","sdl2"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siraben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-06T09:35:10.000Z","updated_at":"2022-07-26T05:07:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d6f9303-fe50-4bf7-a545-eba8b8f87a4a","html_url":"https://github.com/siraben/functional-images","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siraben/functional-images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Ffunctional-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Ffunctional-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Ffunctional-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Ffunctional-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siraben","download_url":"https://codeload.github.com/siraben/functional-images/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siraben%2Ffunctional-images/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32522245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","functional-reactive-programming","haskell","sdl2"],"created_at":"2024-10-08T14:20:51.253Z","updated_at":"2026-05-02T03:32:01.357Z","avatar_url":"https://github.com/siraben.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Replicating the Functional Images Paper\n![Figure 19](figures/fig19.png)\n\nIn _Functional Images_ Conal Elliott presents a refreshing take on\nwhat an image is, a _function_ from points to colors.  With this\nprecise semantic model we can take advantage of various laws and\ntypeclasses related to functions, and experiment with different kinds\nof images, for instance, regions, which are functions from points to\nbooleans.\n\nIt's a gem of a paper, however it's been almost 20 years since the\nrelease of the [Pan](http://conal.net/Pan/Releases/default.htm)\nfunctional image library.  This is my attempt at reproducing the paper\nusing more modern libraries such as SDL2.  The project is split in the\nfollowing parts;\n\n- `render.c` - C backend for rendering with SDL2\n- `Picture.hs` - the Haskell program implementing the code from\n  functional images (along with typo corrections)\n- `Timing.c` - helper program to report timing information\n\n## Requirements\n- `ghc` - GHC Haskell compiler\n- SDL2 library\n- `make`\n\n## Building and Running\nType `make run` to build the project and launch a window showing the\nanimation `mainAnim` (see `Picture.hs`).  For instance, to see Figure\n19, change `mainAnim` to `mainAnim = static fig19`.  For a figure that's an\nanimation, for instance Figure 32, change it to `mainAnim = fig32`.\n\nThe function `calculate` performs time and coordinate normalization so\nthat it can be adjusted as pleased to slow down or speed up time, or\nchange the duration of the animation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiraben%2Ffunctional-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiraben%2Ffunctional-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiraben%2Ffunctional-images/lists"}