{"id":15540232,"url":"https://github.com/rm-hull/turtle","last_synced_at":"2025-08-31T20:12:20.040Z","repository":{"id":7559914,"uuid":"8913426","full_name":"rm-hull/turtle","owner":"rm-hull","description":"A logo-style turtle graphics library for Clojure \u0026 ClojureScript (renders to SVG, bitmaps \u0026 HTML5 Canvas)","archived":false,"fork":false,"pushed_at":"2018-10-06T11:38:12.000Z","size":47,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T22:36:07.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/rm-hull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-20T20:15:33.000Z","updated_at":"2025-04-28T04:35:20.000Z","dependencies_parsed_at":"2022-09-05T18:11:44.181Z","dependency_job_id":null,"html_url":"https://github.com/rm-hull/turtle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rm-hull/turtle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fturtle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fturtle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fturtle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fturtle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm-hull","download_url":"https://codeload.github.com/rm-hull/turtle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fturtle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273032934,"owners_count":25034067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"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":[],"created_at":"2024-10-02T12:13:18.733Z","updated_at":"2025-08-31T20:12:20.018Z","avatar_url":"https://github.com/rm-hull.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turtle\n\n[![Build Status](https://secure.travis-ci.org/rm-hull/turtle.svg)](http://travis-ci.org/rm-hull/turtle)\n[![Coverage Status](https://coveralls.io/repos/rm-hull/turtle/badge.svg?branch=master)](https://coveralls.io/r/rm-hull/turtle?branch=master)\n[![Dependencies Status](https://versions.deps.co/rm-hull/turtle/status.svg)](https://versions.deps.co/rm-hull/turtle)\n[![Downloads](https://versions.deps.co/rm-hull/turtle/downloads.svg)](https://versions.deps.co/rm-hull/turtle)\n[![Clojars Project](https://img.shields.io/clojars/v/rm-hull/turtle.svg)](https://clojars.org/rm-hull/turtle)\n[![Maintenance](https://img.shields.io/maintenance/yes/2018.svg?maxAge=2592000)]()\n\nA lightweight turtle graphics library for Clojure \u0026amp; ClojureScript.\nIncludes renderers for SVG markup and bitmap images for Clojure, and a\nHTML5 canvas renderer for ClojureScript.\n\n## Examples\n\n### Clojure\n\n```clojure\n(ns example1\n  (:require\n    [turtle.core :refer [draw!]]\n    [turtle.renderer.bitmap :refer [-\u003eimg]]))\n\n(def triangle\n  (take 12\n    (cycle\n      [:fwd 20, :right 120])))\n\n(draw! -\u003eimg triangle [800 600])\n```\n\nWould return an AWT `BufferedImage` of size 800x600, with the triangle scaled\nto the full extent:\n\n     #\u003cBufferedImage BufferedImage@5d6b3f00: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0\n     IntegerInterleavedRaster: width = 800 height = 600 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0\u003e\n\nThis can then be rendered with `javax.imageio.ImageIO` into whatever graphics format.\n\nThe same triange rendered with the SVG renderer:\n\n```clojure\n(ns example2\n  (:require\n    [turtle.core :refer [draw!]]\n    [turtle.renderer.vector :refer [-\u003esvg]]))\n\n(def triangle\n  (take 12\n    (cycle\n      [:fwd 20, :right 120])))\n\n(draw! -\u003esvg triangle [800 600])\n```\n\nyields:\n\n```xml\n\u003csvg height=\"600\" overflow=\"visible\" preserveAspectRatio=\"xMidYMid meet\" version=\"1.0\" width=\"800\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" zoomAndPan=\"magnify\"\u003e\n  \u003cg transform=\"translate(100.0,500.0) scale(20.0,-20.0)\"\u003e\n    \u003cpath d=\"M0.0,0.0 L0.0,20.0 L17.32051,10.0 L0.0,0.0 \" style=\"fill:none;stroke-width:3;stroke:red;\"\u003e\u003c/path\u003e\n  \u003c/g\u003e\n\u003c/svg\u003e\n```\n\n## Pre-requisites\n\nYou will need [Leiningen][1] 2.7.1 or above installed.\n\n## Building\n\nTo build and install the library locally, run:\n\n     lein cljsbuild once\n     lein install\n\n## Including in your project\n\nThere is a version hosted at [Clojars][2]. For leiningen include a dependency:\n\n```clojure\n[rm-hull/turtle \"0.1.11\"]\n```\n\nFor maven-based projects, add the following to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003erm-hull\u003c/groupId\u003e\n  \u003cartifactId\u003eturtle\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.10\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n## TODO\n\n* Documentation\n* Examples\n* Add tests \u0026 improve code coverage\n* Investigate poor rendering quality on PNG renderer\n* Implement commands:\n    - :width _n_ - set the stroke width\n    - :fill - close the current path and fill with the selected color\n* Perform rounding to 'n' decimal places\n\n[1]: https://github.com/technomancy/leiningen\n[2]: https://clojars.org/rm-hull/turtle\n\n## License\n\n### The MIT License (MIT)\n\nCopyright (c) 2016 Richard Hull\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fturtle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm-hull%2Fturtle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fturtle/lists"}