{"id":22525834,"url":"https://github.com/msurguy/squigglecam","last_synced_at":"2025-07-24T05:36:44.299Z","repository":{"id":31796982,"uuid":"114606024","full_name":"msurguy/SquiggleCam","owner":"msurguy","description":"Web Based implementation of SquiggleDraw algorithm","archived":false,"fork":false,"pushed_at":"2022-02-13T18:25:25.000Z","size":1176,"stargazers_count":65,"open_issues_count":3,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T15:30:58.010Z","etag":null,"topics":["editor","plotter","squiggledraw-algorithm","svg","webcam"],"latest_commit_sha":null,"homepage":"https://msurguy.github.io/SquiggleCam","language":"Vue","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/msurguy.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}},"created_at":"2017-12-18T06:52:31.000Z","updated_at":"2025-01-11T12:38:22.000Z","dependencies_parsed_at":"2022-08-07T16:31:07.593Z","dependency_job_id":null,"html_url":"https://github.com/msurguy/SquiggleCam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msurguy/SquiggleCam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msurguy%2FSquiggleCam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msurguy%2FSquiggleCam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msurguy%2FSquiggleCam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msurguy%2FSquiggleCam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msurguy","download_url":"https://codeload.github.com/msurguy/SquiggleCam/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msurguy%2FSquiggleCam/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266796900,"owners_count":23985493,"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-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["editor","plotter","squiggledraw-algorithm","svg","webcam"],"created_at":"2024-12-07T06:11:49.355Z","updated_at":"2025-07-24T05:36:44.278Z","avatar_url":"https://github.com/msurguy.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nWeb Based implementation of [SquiggleDraw algorithm](https://github.com/gwygonik/SquiggleDraw ), originally implemented by Gregg Wygonik.\n\nThe online version of this project takes a picture from your webcam and turns it into plotter-drawable, laser-engravable SVG file.\n\nHere's an example of output image generated with this tool:\n\n![Image of SquiggleCam in use](https://raw.githubusercontent.com/msurguy/SquiggleCam/master/examples/description.jpg \"Image of SquiggleCam output\")\n\nAnd here's a video my plotter that uses this tool:\n\n[![Video of SquiggleCam in use](https://raw.githubusercontent.com/msurguy/SquiggleCam/master/examples/botomazov.jpg)](https://www.youtube.com/watch?v=abBnMcs58ds)\n\n# Installation and running\n\nClone or download this repo, then run this command to get all dependencies installed locally:\n```\nnpm install\n```\n\nThen, run this command to watch for changes and to launch the HTML page in the browser:\n```\nnpm run dev\n```\n\n# Algorithm\n\nThe algorithm processes the image in the following way:\n\n```\nRetrieve photo as an array of pixels IMAGE\nSet desired number of horizontal lines as LINE_COUNT\nSet desired number of vertical spacing as SPACING\nSet desired line amplitude as AMPLITUDE\nSet desired line rotation frequency as FREQUENCY\nFor y :=0 to image height step image height / LINE_COUNT do\n\tSet startx := 0\n\tSet starty := y\n\tCreate a set of coordinates as [startx, starty]\n\tFor x := 1 to image width step SPACING do\n\t\tGet brightness br of the current pixel as average of r,g,b values\n\t\tSet r := (255 - br) / LINE_COUNT * AMPLITUDE\n\t\tSet a := (255 - br) / FREQUENCY\n\t\tCreate a set of coordinates as [x, y + Math.sin(a) * r]\nPass the resulting array of coordinates to rendering application\n```\n\n# Using the output images\n\nThe output SVG file generated with this tool can be uploaded to SVG -\u003e GCODE (or similar) converter in order to be plotted on a pen plotter or engraved on a laser cutter.\n\n# Roadmap and todo list\n- [ ] Ability to use image URL for input\n- [ ] Ability to save settings in local storage as presets (and reuse them later)\n- [ ] Ability to switch the squiggle mode (not just horizontal lines): spirals, vertical lines, loops, etc\n- [ ] Ability to go back to the previous images from your current \"session\"\n- [ ] Fix bug with the video size when the paper size is modified during video being on\n\nIf you want to implement any of these or contribute - please create an issue and feel free to submit a PR, I would appreciate that.\n\n# License\nMIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsurguy%2Fsquigglecam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsurguy%2Fsquigglecam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsurguy%2Fsquigglecam/lists"}