Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add N-Flake #10

Open
trebeljahr opened this issue Sep 29, 2022 · 0 comments
Open

Add N-Flake #10

trebeljahr opened this issue Sep 29, 2022 · 0 comments
Labels
new-fractal Add a new fractal to the garden.

Comments

@trebeljahr
Copy link
Owner

Description

Add implementation for N-Flake fractals. Provide a way to toggle between different values for "n". If using an L-System, this might be a bit tricky, since the L-System architecture (at least for now) doesn't have an "easy" way to toggle between different systems. But it should be possible to cook up something using the DatGui components and just change the Config State around to different L-System parameters. There is already an old implementation for the L-System of a Pentaflake where n=5.

const pentaflake = {
  maxIterations: 8,
  axiom: "F++F++F++F++F",
  draw: drawRules,
  replace: {
    F: "F++F++F|F-F++F",
  },
  angle: 36,
};

Inspiration

Wikipedia - N-Flake

Type

Recursive -> Canvas or L-Systems

Difficulties

Should be straightforward. Except maybe centering the drawn fractal to the screen.

@trebeljahr trebeljahr added enhancement new-fractal Add a new fractal to the garden. labels Sep 29, 2022
@trebeljahr trebeljahr changed the title Add [Name of Fractal] Add N-Flake Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-fractal Add a new fractal to the garden.
Projects
None yet
Development

No branches or pull requests

1 participant