{"id":27055105,"url":"https://github.com/cadin/generative-noodles","last_synced_at":"2025-04-05T09:18:57.268Z","repository":{"id":210162632,"uuid":"339621650","full_name":"cadin/generative-noodles","owner":"cadin","description":"A generative art sketch for creating plotter art in Processing","archived":false,"fork":false,"pushed_at":"2024-12-19T00:12:01.000Z","size":418,"stargazers_count":62,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-19T01:21:08.777Z","etag":null,"topics":["creative-coding","generative-art","plotter-art","processing"],"latest_commit_sha":null,"homepage":"","language":"Processing","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cadin.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":"2021-02-17T05:32:49.000Z","updated_at":"2024-12-19T00:12:04.000Z","dependencies_parsed_at":"2024-01-17T23:58:44.182Z","dependency_job_id":"3f1b7411-5ae7-468e-b5bd-80e112eadd22","html_url":"https://github.com/cadin/generative-noodles","commit_stats":null,"previous_names":["cadin/generative-noodles"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadin%2Fgenerative-noodles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadin%2Fgenerative-noodles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadin%2Fgenerative-noodles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadin%2Fgenerative-noodles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cadin","download_url":"https://codeload.github.com/cadin/generative-noodles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312260,"owners_count":20918400,"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":["creative-coding","generative-art","plotter-art","processing"],"created_at":"2025-04-05T09:18:56.836Z","updated_at":"2025-04-05T09:18:57.258Z","avatar_url":"https://github.com/cadin.png","language":"Processing","readme":"# generative-noodles\n\nCreate generative art for pen plotters in Processing.\n\n![Example image](banner.png)\n\nThis software squirts bendy noodle segments into a predefined grid. SVG output is ready for printing or plotting.\n\n## Getting Started\n\n### Requirements\n\n-   [Processing 4](https://processing.org)\n-   [ControlP5](https://sojamo.de/libraries/controlP5/) UI library\n\nInstall the required Processing libraries using the [Library Manager](https://processing.org/environment/#adding-libraries-tools-and-modes).\n\n### Config\n\nThe `sketch.pde` sketch loads configuration data from the `data/config/config.json` file.  \nThis is the minimum required info in the config file:\n\n```\n{\n  \"graphics\": [\n    {\n      \"head\": \"graphics/roundEnd.svg\"\n    }\n  ]\n}\n```\n\nYour config will list an array of one or more graphic set objects for which you must specify at minimum the `head` svg graphic. You can optionally include graphics for `tail` and `joiners`.\n\nThis config file can also be used to set the size of your output canvas, grid dimensions, and sizing options for the generated noodles.\n\nSee the [included config file](sketch/data/config/config.json) as an example or see the [Config Options](#config-options) section for details.\n\n### Head, Tail \u0026 Joiner Graphics\n\nYou can include pre-made SVGs for noodle ends (head and tail) or to randomly appear in straight sections (I call these \"joiners\" for some reason).\n\nThese SVGs should be drawn vertically and sized so they will intercept noodle edges drawn 100px apart. See the [roundEnd.svg](sketch/data/graphics/roundEnd.svg) graphic for reference.\n\n![SVG Diagram](svgDiagram.png)\n\n## Usage\n\n### [Video Walkthrough](https://www.youtube.com/watch?v=1q7dORuGe6I)\n\n### Key Commands\n\n**`G`**: Toggle grid visibility\n\n**`R`**: Randomize noodles and redraw\n\n**`T`**: Increase the size of each individual grid cell\n\n**`E`**: Toggle [Editor View](#editor-view)\n\n**`X`**: Toggle [Blackout Mode](#blackout-mode)\n\n**`P`**: Toggle [Path Edit Mode](#path-edit-mode)\n\n**`I`**: Import a [Mask Image](#mask-images)\n\n**`SHIFT + I`**: Reprocess a [Mask Image](#mask-images)\n\n**`L`**: Load a [Config File](#config)\n\n**`S`**: Save a plot-ready SVG with associated data to the `output` folder.\n\n**`BACKSPACE`**: Delete the selected noodle\n\n### Editor View\n\nPress **`E`** to toggle the graphical Editor View. This control panel lets you change some of the config options without needing to restart the sketch.\n\nYou may need to regenerate your noodles (**`R`**) to see the changes reflected.\n\n### Blackout Mode\n\nIn Blackout Mode (**`X`**) you can block specific grid cells from being occupied by noodles. Click a cell to toggle its blackout state.\n\nRegenerate your noodles (**`R`**) to see the changes reflected.\n\n### Path Edit Mode\n\nManually edit the path of any noodle on your canvas.\n\nToggle Path Edit Mode with **`P`**. Shift-click any noodle to select it. The cells of the selected noodle appear green.\n\nClick the cell at either end the selected noodle to delete it. Click a cell adjacent to either end to extend the noodle into that cell.\n\nClick any straight section of the selected noodle to cycle through the available joiner and twist graphics.\n\n### Mask Images\n\nInstead of manually blacking out cells in the grid, you can load a black and white mask image that represents the areas to be blacked out. When loaded, the mask image will be scaled to fit the size of your grid. Cells appearing over black areas will be blacked out. Cells appearing over white areas will remain available for noodles to be drawn in.\n\nIf the aspect ratio of your mask image doesn't match the grid, the extra space will be filled with black.\n\nPress **`I`** to load a mask image.\n\nIf you change the grid size with a mask image loaded, you'll need reprocess the mask at the new size (**`SHIFT + I`**) to continue using it.\n\n### Saving Graphics\n\nPress **`S`** to save a plot-ready SVG of your current canvas.\n\nA json data file will be saved alongside your SVG. This contains the config used to create the image. You can load this configuration back into your sketch by pressing **`L`** and selecting the file. This allows you to return to the configuration for a specific image if you want to generate more images in that style.\n\n## Config Options\n\n**`printHeightInches`** (float)  \nThe height of your output image in inches.\n\n**`printWidthInches`** (float)  \nThe width of your output image in inches.\n\n**`gridWidth`** (integer)  \nThe number of horizontal cells in the grid.\n\n**`gridHeight`** (integer)  \nThe number of vertical cells in the grid.\n\n**`marginInches`** (float)  \nThe minimum width of the margin between the grid and the edge of your paper. In configurations with a large number of grid cells, this won't apply.\n\n**`useTwists`** (boolean)  \nWhether or not to add twist graphics randomly to some straight sections.\n\n**`useJoiners`** (boolean)  \nWhether or not to add joiner graphics randomly to some straight sections. If true, graphics will be chosen from the `joiners` array in the graphic set.\n\n**`useCurves`** (boolean)  \nWhether to draw curved or square noodles.\n\n**`penSizeMM`** (float)  \nThe size (in mm) of the pen stroke.\n\n**`noodleThicknessPct`** (float)  \nA value between 0 and 1 that defines the width of the noodle, expressed as a percentage of the width of a grid cell.\n\nA value of 0.5 will draw a noodle that is half the width (50%) of the cells in the grid.\n\n**`numNoodles`** (integer)  \nThe maximum number of noodles to attempt to draw. The actual number of noodles may be lower if the grid fills before the maximum number is reached.\n\n**`minLength`** (integer)  \n**`maxLength`** (integer)  \nNoodles are created with target lengths chosen from a random value between `minLength` and `maxLength`. A noodle will grow, filling space until it either runs out of space, or reaches its target length.\n\n`minLength` just defines the lower bounds for the target length, not an actual threshold for noodle length. For this reason, noodles will often be drawn shorter than the `minLength` setting.\n\n**`allowOverlaps`** (number)  \nWhether or not to allow noodles to overlap.\n\n**`graphics`** (array of objects)\nEach object in this array defines a set of graphics to be used for one noodle type. This lets you have multiple types of noodles with graphics that are consistent per noodle.\n\n-   **`head`** (string)\n    Path to the graphic that represents a noodle end. Required.\n\n-   **`tail`** (string)\n    Optional path to the graphic that represents the opposite end of the noodle. If this is omitted, the head graphic will be used for both ends. If `randomized` ends is set to true, then head graphics from a random graphic set will be used instead of the tail.\n\n-   **`joiners`** (array of strings)\n    Array of paths to joiner graphics (a straight section that connects to other segments). Your noodle will randomly choose graphics from this array. Optional.\n\n**`randomizeEnds`** (boolean)\nWhen set to `true`, noodles will choose random end caps from the `head` graphics in the `graphics` array.\n\nWhen set to `false`, each noodle will use the associated `head` and `tail` graphics (or two of the same `head` graphic if no `tail` is defined).\n\n**`blackoutCells`** (2D arrays of integers)\nAn array of cell columns indicating which cells should be blocked from noodles appearing in them. Open cells are marked with a `0` and blacked out cells are marked with a `12`.\n\nYou probably don't want to create this manually.  \nBlackout cells can be edited in the sketch (press `X` to enter blackout mode). The array of cells will then be output to the data file when an image is saved.\n\n## Support\n\nThis is a personal project and is mostly unsupported.  \nThat being said, I'm happy to hear feedback or answer questions.\n\n## License\n\nThis project is licensed under the Unlicense - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadin%2Fgenerative-noodles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcadin%2Fgenerative-noodles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadin%2Fgenerative-noodles/lists"}