News for hackers. Stuff that matters.
Re:Infinitely zooming botanical floral paradise painting by onion2k on Wednesday February 10, 2021 @03:20AM (#26086718)
Most of that script is actually for loading, playback and keyboard/mouse controls. The salient bit is loop() function on lines 152 to 233.

It loops around an array of 48 (hand-drawn?!) images, using 4 images at any given time. The images and the base scale factor are based on an incrementing 'z_position' value. It copies each of of the four images in to an HTML5 canvas so the outer 25% is a straight up copy of one image, then 50-75% is 0.5 scale copy of another image, then 25-50% is a third image at 0.25 scale, and the centre 25% is the fourth image at 0.125 scale. All the effects are CSS filters applied to the canvas element.

It's surprisingly simple for such a cool effect.

Re:Infinitely zooming botanical floral paradise painting by alanbernstein on Wednesday February 10, 2021 @08:58AM (#26089104)
The code is simple, but don't overlook the level of effort in producing the, yes, hand-drawn, images that all align with their neighbors in a weird way.
Re:Infinitely zooming botanical floral paradise painting by _nalply on Wednesday February 10, 2021 @02:10PM (#26093397)
I looked at the images. I imagine they are created like this: Paint the first image, then make a copy, zoom it out and paint around the center and repeat about 44 times. For the last about four images take care to create a loop back to the first image.
Re:Infinitely zooming botanical floral paradise painting by _nalply on Thursday February 11, 2021 @04:39AM (#26099783)
Adding to my comment after a good night's sleep: To create a loop back to the first image is a bit tricky. You need to put in the zoomed-out previous image as before, but also a ring-shaped part of the zoomed-in first image.

It's awkward to explain. One problem to wrap your head around is that the series of images you create by zooming out previous images has to played in reverse.

I could imagine programming a shallow random-generated fractal generator creating series of images and then the infinite zoom would be really infinite, and this would be even easier than the loop.

Re:Infinitely zooming botanical floral paradise painting by alanbernstein on Thursday February 11, 2021 @09:03AM (#26101585)
If you're generating abstract shapes, to marry be able to use map the image to the screen using toroidal geometry, like that tunnel-flying demo. I think it would be trickier to do that with handcrafted art because the distortion would look weird.
Re:Infinitely zooming botanical floral paradise painting by porker on Wednesday February 10, 2021 @05:20AM (#26087463)
Very clever, and explains why it doesn't hammer my CPU. I was surprised when my computer didn't turn into a leg warmer.
Re:Infinitely zooming botanical floral paradise painting by AltruisticGap2 on Wednesday February 10, 2021 @04:34AM (#26087181)
Ahh. I thought it was another one of those AI generated effects.

I haven't looked at the images, I assume then that they are specially made for that effect? (because I can't see the images fading one into another)

Re:Infinitely zooming botanical floral paradise painting by tomcam on Wednesday February 10, 2021 @07:55AM (#26088464)
I can’t thank you enough for doing this. I somehow got intimidated and was afraid to look at the source. It only increases my wonder at this astounding piece of art.
Re:Infinitely zooming botanical floral paradise painting by Hoasi on Wednesday February 10, 2021 @05:47AM (#26087626)
Thank you for explaining this.