Oh, yeah! That's exactly the picture I had in mind. Thanks so much for making it! Now maybe some number theorist can explain the patterns. —Dan P.S. Though for a hexagonal pixel structure with pixels labeled via x * 1 + y * exp(2pi*i/3) I would want to try x^2 + xy + y^2 (with all coefficients = 1, no 2's.)
On Jan 11, 2016, at 4:30 PM, Gareth McCaughan <gareth.mccaughan@pobox.com> wrote:
On 11/01/2016 23:02, Dan Asimov wrote:
Nice! Christian, I don't know if you take requests, but:
Would you be willing to do the same thing but with 1024 or more colors, on a larger square?
Try this: http://codepen.io/anon/pen/ZQyaYm
which uses more colours, on a larger square, at one pixel per pixel, and does it using an HTML5 canvas object rather than by constructing an enormous table with one cell per pixel.
(For reasons I don't at all understand, this has stopped actually working for me on the computer where I created it -- it sits there saying "Loading" for ever and never actually draws anything -- but on another one it works just fine. My apologies if whatever I've screwed up causes it not to work for some of you too.)
The "skeleton" of the code is copy-and-pasted from some tutorial thing that obviously envisages turning this into an animation. I've experimented with making it animate but what it's doing is a bit too expensive for my taste.
If on line 10 you set colours to a smaller value (try, say, 100) more of the finer structure of the Moire fringes will be exposed.
With the default values (1024 for both), on some monitors you may see flickering in some parts of the image. I think this is not an optical illusion but the result of temporal dithering by a monitor that uses that technique to represent a larger number of brightness levels for each channel than the display is actually physically capable of.
Try replacing x*x+y*y with 2*(x*x+y*y)+x*y for a hexagonal structure.
-- g
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun