kuromusha / mandelbrot-chaco

Mandelbrot Plotting with Panning and Zooming in TraitsUI and Chaco
MIT License
0 stars 1 forks source link

Change detail level adaptively #4

Closed kuromusha closed 1 year ago

kuromusha commented 1 year ago

This PR is to enable #2.

n is calculated by log10(3 / range) * 30 + 100.

adaptive_detail_level
kuromusha commented 1 year ago

@timdiller Thank you for your comment.

Regarding the detail level, I miscalculated it. n should have been calculated by log10(3 / range) * 300 + 100 for range=0.0003 and n=1000. I modified the calculation. https://github.com/kuromusha/mandelbrot-chaco/pull/4/commits/d2baa88beaf0885d2c0da04f9c705e69c2044da4 It looks better than before. But it takes more time for extreme zoom factors and the calculation formula can be improved as you mentioned. (They are other problems, though.)

Regarding the drawing performance, I modified the way of updating the plot as you advised. https://github.com/kuromusha/mandelbrot-chaco/pull/4/commits/dd04858dd7dcc988db12fde5ae7cf88a48bb73cc The performance became a little better. Thank you very much for your advice!

timdiller commented 1 year ago

@kuromusha Looks good to me. See here for help on how to link a pull request to an issue. You can explicitly make the link by editing the PR through the Github interface, or you can include the words " Closes #2 " in the description to trigger it implicitly.

kuromusha commented 1 year ago

@timdiller Thank you. I linked this PR with the Issue #2. And I merge this.