{"id":20757285,"url":"https://github.com/piebro/substitution-system","last_synced_at":"2026-03-16T13:03:40.737Z","repository":{"id":220309744,"uuid":"751295728","full_name":"piebro/substitution-system","owner":"piebro","description":"Interactive generative art implementation using a substitution system, along with commands for plotting the artwork with a pen plotter.","archived":false,"fork":false,"pushed_at":"2024-02-01T10:35:00.000Z","size":380,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-18T04:43:32.456Z","etag":null,"topics":["generative-art","plotter-art","substitution-system"],"latest_commit_sha":null,"homepage":"https://piebro.github.io/substitution-system/","language":"HTML","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/piebro.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}},"created_at":"2024-02-01T10:23:18.000Z","updated_at":"2024-04-29T19:13:07.000Z","dependencies_parsed_at":"2024-02-01T12:03:09.957Z","dependency_job_id":null,"html_url":"https://github.com/piebro/substitution-system","commit_stats":null,"previous_names":["piebro/substitution-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piebro%2Fsubstitution-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piebro%2Fsubstitution-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piebro%2Fsubstitution-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piebro%2Fsubstitution-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piebro","download_url":"https://codeload.github.com/piebro/substitution-system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243066953,"owners_count":20230832,"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","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":["generative-art","plotter-art","substitution-system"],"created_at":"2024-11-17T09:41:19.194Z","updated_at":"2025-12-24T13:18:11.505Z","avatar_url":"https://github.com/piebro.png","language":"HTML","readme":"# Substitution System\n\n[Substitution System](https://piebro.github.io/substitution-system) is a simple website to generate generative art using a substitution system. This works by using a random color palette and generating random replacement rules for each color. The replacement rules are a 2x2 grid of random colors from the color palette. A starting 2x2 grid is created, and the replacement rules are applied multiple times to transform the starting grid, doubling the size of the grid in each iteration. Here are two examples:\n\n![example images](images/merged_01_09.png)\n\n## Plotting Pixel Art\n\n![plotting example image](images/plotting_1.jpg)\n\nThese images also look good when drawn with a pen plotter using [vpype](https://github.com/abey79/vpype) and the [vpype pixelart](https://github.com/abey79/vpype-pixelart) plugin.\n\nTo plot the images yourself, install [vpype](https://github.com/abey79/vpype) with the [vpype pixelart](https://github.com/abey79/vpype-pixelart) plugin.\n\nThe following example command can be used to create a plot using a small substitution image (not the one with 1024x1024 pixels).\n\n```bash\nvpype pixelart \\\n    --mode line \\\n    --pen-width 0.6mm \\\n    --overdraw 0.1 \\\n    --upscale 5 \\\n    \u003cpath-to-pixelart-image.png\u003e \\\n    linesort --no-flip \\\n    write \\\n    --page-size 10.0x10.0cm \\\n    --center \\\n    pixelart.svg\n\n# save the layers of the pixelart.svg in separate files\nvpype read pixelart.svg forlayer write \"plot%_name or _lid%.svg\" end\n```\n\nUse `vpype pixelart --help` to get more information about the arguments.\n\nNext, I use the [AxiCLI](https://axidraw.com/doc/cli_api/#introduction) to plot the image with the following commands.\n\n```bash\n# get a preview with the timings\naxicli plot.svg --model 2 -vg3 --speed_pendown 15 --report_time -o preview.svg\n\n# plot the image\naxicli plot.svg --model 2 --speed_pendown 15 --pen_pos_down 40\n```\n\nHere are two examples I plotted.\n\n![plotting example image](images/plotting_2.jpg)\n\nSometimes, it might also look good if the layers are not perfectly aligned.\n\n![plotting example image](images/plotting_3.jpg)\n\n## Contributing\n\nContributions to this project are welcome. Feel free to report bugs, suggest ideas, or create merge requests.\n\n## Developing\n\nThe project uses [Prettier](https://prettier.io/playground/) for linting JavaScript with a `print-width` of 120, `tab-width` of 4, and using single quotes.\n\n## Website Statistics\n\nThere is lightweight tracking for the website using Plausible. Anyone interested can view these [statistics](https://plausible.io/piebro.github.io%2Fsubstitution-system). It's worth noting that these statistics might be an underestimate as many users, including myself, use AdBlockers.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiebro%2Fsubstitution-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiebro%2Fsubstitution-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiebro%2Fsubstitution-system/lists"}