{"id":19443724,"url":"https://github.com/automata/basquiat","last_synced_at":"2026-06-19T07:31:44.196Z","repository":{"id":199402209,"uuid":"702802971","full_name":"automata/basquiat","owner":"automata","description":"Simple creative coding Mojo 🔥 and Python lib","archived":false,"fork":false,"pushed_at":"2023-10-20T17:21:43.000Z","size":3584,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T08:16:21.200Z","etag":null,"topics":["art","cairo","creative-coding","generative-art","mojo","procedural-art","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/automata.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":"2023-10-10T03:40:54.000Z","updated_at":"2023-12-01T02:15:33.000Z","dependencies_parsed_at":"2024-11-10T15:45:17.124Z","dependency_job_id":"7a3fb429-4e6e-4c43-a496-3615b91ea564","html_url":"https://github.com/automata/basquiat","commit_stats":null,"previous_names":["automata/basquiat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/automata/basquiat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata%2Fbasquiat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata%2Fbasquiat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata%2Fbasquiat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata%2Fbasquiat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/automata","download_url":"https://codeload.github.com/automata/basquiat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automata%2Fbasquiat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34522034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":["art","cairo","creative-coding","generative-art","mojo","procedural-art","python"],"created_at":"2024-11-10T15:43:59.729Z","updated_at":"2026-06-19T07:31:44.181Z","avatar_url":"https://github.com/automata.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basquiat\n\n\u003cimg src=\"./docs/rw2.jpg\" width=\"512px\" /\u003e\n\nSmall Mojo :fire: and Python library for creative coding powered by\n[Cairo](https://www.cairographics.org/) (through [pycairo](https://pycairo.readthedocs.io/en/latest/)).\nThe name is a humble homage to the artist [Jean-Michel Basquiat](https://en.wikipedia.org/wiki/Jean-Michel_Basquiat).\n\nBoth Mojo and Python implementations depend on `pycairo`. I'm planning to migrate\nto cffi `libcairo` directly from Mojo when possible, but we already have the\nMojo implementation running almost 3x faster than Python:\n\n```\n% time mojo rw.mojo\nmojo rw.mojo  3.14s user 0.09s system 92% cpu 3.493 total\n% time python rw.py\npython rw.py  8.69s user 0.15s system 126% cpu 6.990 total\n```\n\n*Note:* only a few drawing primitives are exposed from Cairo right now, but\nmore to come pretty soon!\n\n## Setup\n\nFor the Python version, create a virtual env and install the requirements.\n\n```\npython3 -m venv venv\nsource venv/bin/activate\npip install --upgrade pip\npip install -r requirements.txt\n```\n\nFor the Mojo version, please follow the instructions on Modular's website\nto get Mojo up and running. Make sure you have `pycairo` installed as well.\n\n## Using\n\nBasquiat keeps the same API between Python and Mojo. The idea is to\nexpose a simple `Renderer` object that keeps the state of the canvas\nand implements drawing operations.\n\nIn Python:\n\n```python\nfrom basquiat.render import Renderer\n\nr = Renderer(1024, 1024)\nr.line(0, 512, 512, 512)\nr.stroke()\n```\n\nIn Mojo:\n\n```python\nfrom basquiat.render import Renderer\n\nlet r = Renderer(1024, 1024)\nr.line(0, 512, 512, 512)\nr.stroke()\n```\n\nPlease check the examples (`rw.{mojo,py}`, `lines.{mojo,py}`) and\nalso the Mojo and Python implementations in `basquiat/`.\n\n## Studies\n\n### Random walk\n\nA couple of random walkers with 100k steps.\n\n![](./docs/rw5.jpg)\n![](./docs/rw3.jpg)\n![](./docs/rw6.jpg)\n\n### Lines\n\nInspired by Joy Division's [Unknown Pleasure](https://en.wikipedia.org/wiki/Unknown_Pleasures) album cover.\n\n![](./docs/lines.jpg)\n\n### Noise\n\nSome experiments with uniform and Perlin noise.\n\n![](./docs/perlin.jpg)\n![](./docs/perlin2.jpg)\n![](./docs/noise.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomata%2Fbasquiat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomata%2Fbasquiat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomata%2Fbasquiat/lists"}