Re: [sage-devel] Re: On plotting frac(x^2+y^2) as complex and implicit plot

2025-02-27 Thread Travis Scrimshaw
I concur that it is just a moiré pattern and issues from sampling. Once you get sufficiently far from the origin, the interval of r for frac(r^2) = (0,1) gets very small (in fact, very quickly). Contrast this with f(x,y) = frac(sqrt(x^2+y^2)) It comes down to the sampling being done to make the

Re: [sage-devel] Re: On plotting frac(x^2+y^2) as complex and implicit plot

2025-02-26 Thread Georgi Guninski
Thanks for the plots. Are you sure that the example with implicit_plot and plot_points=800 doesn't have patterns? I suspect that precision issues (float?) together with small "pixel" size incorrectly kill the pattern. implicit_plot(lambda u, v:frac(u^2+v^2)-0.5, (13, 14), (13, 14), plot_points=800

[sage-devel] Re: On plotting frac(x^2+y^2) as complex and implicit plot

2025-02-26 Thread Emmanuel Charpentier
I think that the shapes you perceive are moiré patterns, depending on the resolution of your plot, the resolution of your screen and the region you plot. To understand it, start with a plot of [image: \operatorname{frac}\left(x^2\right)],as done here