Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.92 KB

README.md

File metadata and controls

57 lines (43 loc) · 1.92 KB

Plumeto

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.

Plumeto language

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.

Examples

See examples/ folder.

Script Output
weed(stochastic,2rounds) weed
spiral spiral
hexpiral hexpiral
penta-doodle penta-doodle
saw saw
stick-saw stick-saw
star star

Development

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

Roadmap

  • 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
  • UX
    • Fix styles
    • Fix dark mode
    • Panning
    • Handle parsing errors
    • Colors
  • Tests