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

How to increase the transformation amount #17

Open
coalaura opened this issue Nov 17, 2019 · 2 comments
Open

How to increase the transformation amount #17

coalaura opened this issue Nov 17, 2019 · 2 comments

Comments

@coalaura
Copy link

coalaura commented Nov 17, 2019

I would like to render some of the fractals in more detail (More transformations) how would i do that?

@MCGamer00000
Copy link

MCGamer00000 commented Nov 30, 2019

I have found that increasing the number of iterations makes the fractals more detailed.
For example, in the Menger Sponge, this is the original code

obj = Object()

for _ in range(8):

    obj.add(FoldAbs())

    obj.add(FoldMenger())

    obj.add(FoldScaleTranslate(3, (-2,-2,0)))

    obj.add(FoldPlane((0,0,-1.0), -1.0))

obj.add(Box(2.0, color=(.2,.5,1)))

return obj

and here is a much more detailed piece.

obj = Object()

for _ in range(16):

    obj.add(FoldAbs())

    obj.add(FoldMenger())

    obj.add(FoldScaleTranslate(3, (-2,-2,0)))

    obj.add(FoldPlane((0,0,-1.0), -1.0))

obj.add(Box(2.0, color=(.2,.5,1)))

return obj

Notice how the 8 was made into 16.. That makes the amount of iterations of the fractal increase.
Note that due to certain problems, when zoomed in enough, you can't add any more iterations. I'm not exactly sure how one could fix that issue though.

@ksgustafson
Copy link

I know there are perturbation methods for zooming on 2d mandelbrot, not sure exactly how those translate to these fractals though. I think you would need to work out the math for these specific ones to implement deeper zooms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants