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
julia_plot sometimes does not draw the entire julia set #28557
Comments
This comment has been minimized.
This comment has been minimized.
Commit: |
Reviewer: Markus Wageringel |
comment:3
Ok, thank you. This change looks correct to me. Just in the documentation of I also rebased and squashed your commits and removed some trailing whitespace. If you agree with my changes, please set this ticket to positive review. New commits:
|
Changed branch from u/gh-DaveWitteMorris/fix_julia_radius to u/gh-mwageringel/28557 |
comment:4
You are right. Thanks for the review, for correcting the docstring, and for fixing my newbie mistakes. |
Changed stopgaps from none to none |
comment:5
There is a merge conflict with the latest beta. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
Since #23740, Sage can now plot julia sets of more general polynomials. I merged in the latest beta, but this branch will only affect the case of polynomials of the form @DaveWitteMorris: Please check whether this is ok, or change the implementation if possible. |
comment:8
Thanks for doing the merge. I'm sorry not to have done anything, but I moved to a different computer last month and have not been able to get git and sagemath working properly yet. Now that the semester is coming to an end, I should have more time and expect to be able to get my installation straightened out enough to work on this ticket later in the week. |
comment:9
I fixed two minor pyflakes complaints in mandel_julia.py. ( However, I also think that @mwageringel : Thanks again for your help with this ticket. |
Changed branch from u/gh-mwageringel/28557 to u/gh-DaveWitteMorris/28557 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Thanks for the updates. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:14
Replying to @DaveWitteMorris:
No problem, as this ticket is now a dependency of #28772, so this one gets merged first. It is still useful to merge this ticket individually, as it makes for a cleaner history which makes it easier to figure out where a change is coming from, later on. Try for example |
Changed branch from u/gh-DaveWitteMorris/28557 to |
The algorithm for julia_plot (and fast_julia_plot) erroneously assumes that if |z| > 2, then z is not in the Julia set of the function f(z) = z2 + c, because the orbit of z is unbounded under iteration of f(z). (To see that this is not always true, let c = -6. Then z = 3 is a fixed point, so its orbit is obviously not unbounded.) Looking on the bright side, the algorithm does give correct results whenever |c| <= 2 (which includes all points in the Mandelbrot set), so most users will never see a problem.
To fix this, the bound 2 should be replaced with an appropriate bound R that depends on c. By the quadratic formula, the largest (positive) fixed point of the function f*(x) = x2 - |c| is R = (1 + sqrt(1 + 4|c|))/2. It is then easy to see that f*(x) > x for x > R. Then, by the triangle inequality, we have |z2 + c| > |z| whenever |z| > R. So the orbit of z tends to infinity whenever |z| is greater than this value R.
I have uploaded a PR that replaces 2 with this value of R, but I have not done this before, and I apologize if I goofed up anything about this ticket.
Component: dynamics
Keywords: complexdynamics
Author: Dave Morris
Branch/Commit:
a5a0408
Reviewer: Markus Wageringel
Issue created by migration from https://trac.sagemath.org/ticket/28557
The text was updated successfully, but these errors were encountered: