{"id":24808536,"url":"https://github.com/markroland/sand-table-pattern-maker","last_synced_at":"2025-10-13T10:30:59.478Z","repository":{"id":53570054,"uuid":"177175080","full_name":"markroland/sand-table-pattern-maker","owner":"markroland","description":"A tool for creating G-code commands to draw patterns","archived":false,"fork":false,"pushed_at":"2025-09-16T21:21:04.000Z","size":859,"stargazers_count":38,"open_issues_count":4,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-09-16T23:55:27.102Z","etag":null,"topics":["drawing-machine","gcode","sand-table","sisyphus-tables"],"latest_commit_sha":null,"homepage":"https://markroland.github.io/sand-table-pattern-maker/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markroland.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-22T16:31:46.000Z","updated_at":"2025-09-16T21:21:08.000Z","dependencies_parsed_at":"2025-04-19T01:25:18.607Z","dependency_job_id":"2c7d28b4-ec49-44e6-b311-0565b1baf41a","html_url":"https://github.com/markroland/sand-table-pattern-maker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/markroland/sand-table-pattern-maker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markroland%2Fsand-table-pattern-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markroland%2Fsand-table-pattern-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markroland%2Fsand-table-pattern-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markroland%2Fsand-table-pattern-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markroland","download_url":"https://codeload.github.com/markroland/sand-table-pattern-maker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markroland%2Fsand-table-pattern-maker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014647,"owners_count":26085555,"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-10-13T02:00:06.723Z","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":["drawing-machine","gcode","sand-table","sisyphus-tables"],"created_at":"2025-01-30T10:17:59.205Z","updated_at":"2025-10-13T10:30:59.473Z","avatar_url":"https://github.com/markroland.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sand Table Pattern Maker\n\n![Sand Table](sand_table_pattern_maker.jpg)\n\n[Launch Pattern Maker](https://markroland.github.io/sand-table-pattern-maker/)\n\nThis is part of my [Sand Table Build](https://markroland.com/portfolio/sand-table)\n\nBuilt with [p5.js](https://p5js.org)\n\n## Installation\n\n```\nnpm install\nnpm run dev\n```\n\n## Run using NPM\n\n```\nnode sand-pattern.mjs --pattern=circle \u003e circle.json\n```\n\nOr using the `bin` command:\n\n```\nsand-pattern --pattern=circle \u003e circle.json\n```\n\n## Controls\n\n - Press \"o\" to toggle an overlay of the pattern settings in the canvas\n - Press \"c\" to toggle the live coordinates and plotter mechanism view\n - Press \"d\" to download a heightmap PNG of the pattern.\n - Press \"p\" to play/pause playback of pattern.\n\n## How to Build a New Pattern\n\n```\nnode ./scripts/create-new.js NewPatternName\n```\n\nPattern classes are made up of at least 4 methods:\n\n - **constructor** - The class constructor defines a few aspect of the class including:\n   - `this.key` - Used for identifying the class's properties in the main sketch file\n   - `this.name` - Used for referencing the pattern in the UI.\n   - `this.config` - This is an object that defines the pattern's input configuration options.\n   - `this.path` - Initializes the pattern's output path coordinates\n - **draw** - This class is called by the main sketch to draw the pattern. It reads and\n   updates the UI input values and sends the input to the class's `calc` method.\n - **calc** - This is where the algorithm for the pattern is implemented. Using the selected\n   inputs, the method returns the coordinates for the complete path.\n\nOnce you've completed your design, submit a Pull Request and if it works, I'll merge it in. Thanks in advance!\n\n## Optimize a THR track\n\nWhen creating tracks, it may be that there are far too many points than necessary - the sand table\nmay not be able to render the track with the precision specified. Since each instruction is processed\nthis may lead to an unnecessarily slow drawing time. In order to prevent this I have created a THR\noptimization script that uses the drawing devices table and ball size to simplify the path to avoid\nunnecessary drawing steps.\n\n```\nnode ./scripts/optimize-thr.mjs {path_to_thr_file}\n```\n\n## Patterns\n\n- XY Coordinates\n- Circle\n- Cross\n- Cycloid ([Epicycloid](https://en.wikipedia.org/wiki/Epicycloid), [Hypocycloid](https://en.wikipedia.org/wiki/Hypocycloid), [Hypotrochoid](https://en.wikipedia.org/wiki/Hypotrochoid))\n- Curvature\n- Diameters\n- Free Draw\n- Easter Eggs ([Reference](https://math.stackexchange.com/questions/3375853/parametric-equations-for-a-true-egg-shape))\n- Farris Curve ([Reference](http://www.sineofthetimes.org/the-art-of-parametric-equations-2/))\n- Fermat's Spiral ([Reference](https://en.wikipedia.org/wiki/Fermat%27s_spiral))\n- Fibonacci\n- Fibonacci Lollipops\n- Frames (Border Patterns)\n- G-Code\n- Gravity\n- Heart ([Reference](http://mathworld.wolfram.com/HeartCurve.html))\n- Space Filling Curves \\[[1](https://p5js.org/examples/simulate-l-systems.html)\\] \\[[2](https://en.wikipedia.org/wiki/Space-filling_curve)\\] \\[[3](https://fedimser.github.io/l-systems.html)\\]\n- Lissajous Curve ([Lissajous Curves](https://en.wikipedia.org/wiki/Lissajous_curve))\n- Parametric ([Butterfly Curve](https://en.wikipedia.org/wiki/Butterfly_curve_(transcendental)))\n- Rectangle\n- Rhodonea (Rose) Curve ([Rose Curve](https://en.wikipedia.org/wiki/Rose_(mathematics)))\n- Shape Morph\n- Shape Spin\n- Spiral\n- Spiral (Logarithmic) ([Reference](https://en.wikipedia.org/wiki/Logarithmic_spiral))\n- Spokes\n- Star\n- Superellipse \\[[1](https://en.wikipedia.org/wiki/Superellipse)\\] \\[[2](https://mathworld.wolfram.com/Superellipse.html)\\] \\[[3](https://thecodingtrain.com/CodingChallenges/019-superellipse.html)\\]\n- Text\n- Theta Rho Coordinates\n- Wiggly Spiral\n- Zig Zag\n\n## License\n\n[![Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://i.creativecommons.org/l/by-nd/2.0/88x31.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/)\n\nThis work is licensed under a [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/) License.\n\nThis work makes use of [p5.js](https://p5js.org), which carries a [GNU Lesser General Public License](https://p5js.org/copyright.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkroland%2Fsand-table-pattern-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkroland%2Fsand-table-pattern-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkroland%2Fsand-table-pattern-maker/lists"}