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

Fractal-Tree broken on mobile #18

Closed
trebeljahr opened this issue Sep 30, 2022 · 3 comments
Closed

Fractal-Tree broken on mobile #18

trebeljahr opened this issue Sep 30, 2022 · 3 comments
Labels
good-first-issue Issues which are good for newcomers to the project. improve-existing-fractals Improvement Suggestions for Existing Fractals.

Comments

@trebeljahr
Copy link
Owner

image

The Fractal-Tree / Fractal-Canopy doesn't show nicely on mobile. Needs some calculations to figure out the maximum Root Length based on the current settings, to stay within the bounds of the screen.

@trebeljahr trebeljahr changed the title Fractal-Tree broken on Mobile Fractal-Tree broken on mobile Sep 30, 2022
@trebeljahr trebeljahr added improve-existing-fractals Improvement Suggestions for Existing Fractals. good-first-issue Issues which are good for newcomers to the project. labels Sep 30, 2022
@npx
Copy link

npx commented Oct 14, 2022

Hey I didnt check out the code yet, but isnt that similar to what I have worked on?

I was wondering, if you would like me to outsource and refactor my work with proper interfaces so the scaling logic can be re-used. If so, what about you create another issue for the outsourcing and assign it to me, ill take care of it.

Afterwards we can go through the fractals one by one to refactor to reuse that logic.
What do you think?

@trebeljahr
Copy link
Owner Author

Sry I didn't see that. Not the most on top of things sometimes, should really enable notifications for this repo haha 😅

I like the idea, the outsourcing is already done, so now it's just a question of using that same logic to close this issue right?

There is one problem I see you could run into with this approach, namely the different fractals will have different algorithms and hence you might need to figure out how to adapt the Barnsley Fern approach to new types of fractals that don't have a mapping to the idea of "furthest point left,right,up,down".

Especially L-Systems could be a bit of a problem since they are just long strings executed as draw instructions one by one and the scaling happens in between iterations with some magic numbers.

Let me know how it goes/if you need help 👍

@npx
Copy link

npx commented Oct 29, 2022

Well I guess we need to find different ways to determine the sizes depending on the fractals. I could not really abstract for the canopy :c
But once there are multiple following certain scaling logics, it would make sense to refactor. Like determine scaling directing depending on a growth function or something.

// I will just hit you with the @trebeljahr this time haha check out the PR at your leisure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Issues which are good for newcomers to the project. improve-existing-fractals Improvement Suggestions for Existing Fractals.
Projects
None yet
Development

No branches or pull requests

2 participants