This is a drawing application for turtle graphics using a custom scripting language based on LOGO. Made in inspiration of a highschool project I lost the code of. It is also able to draw L-systems.
Formal launguage definition can be found at src/language/grammar.pegjs
. In a nutshell, it is a simple procedural language with a somewhat C-like syntax.
See examples/
folder.
Script | Output |
---|---|
weed(stochastic,2rounds) | |
spiral | |
hexpiral | |
penta-doodle | |
saw | |
stick-saw | |
star |
Plumeto is built with Next.js, peggy for parser generation and roughjs to draw on canvas in a sketchy style.
To run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
If you make changes to the grammar in src/language/grammar.pegjs
update the generated parser by running
npm run grammar
- Language
- Fix expression bug where it doesn't accept expected expressions such as
- a*4+sin(x)
- Fix parsing bugs in general
- Add comments support
- Fix return statements, they don't work if nested.
- Turing completeness (only needs memory?)
- Other cool stuff
- Fix expression bug where it doesn't accept expected expressions such as
- UX
- Fix styles
- Fix dark mode
- Panning
- Handle parsing errors
- Colors
- Tests