pouët.net

How is this oldschool fractal-zoom effect made?

category: code [glöplog]
Yo.
Just got curious. I had never actually attempted to code this. Any ideas what happens to the framebuffer. On amiga ofc its copper and such stuff i dont really know anything about. https://www.youtube.com/watch?v=gKBo-pbU6AM

My first guess its that its just stretching a backbuffer and overlaying that on the framebuffer while plotting random pixels in the middle? but on the other hand it might be easier than that, just by transforming the framebuffer directly, but how?

if someone could explain how this works in a linear framebuffer that would be fun.
it should be an easy effect to code, but just want to see how coders actually did it back in the day.
added on the 2015-11-11 18:20:06 by rudi rudi
Gargaj: yes thats the one. thx.

the comment from psonice sounds clear:
Quote:
no, there's no zooming or rotation at all. Each block is just shifted a few pixels, the direction and distance depending on the position of the block. In other words, all it really does is scrolling :D The shift direction and amount for each block is set so they shift the pixels around the screen in a spiral pattern.

The complex pattern it generates is caused by the different shift amounts in each block, if you have a block shifting left by 2 pixels and the one to the right of it shifts left by 1 pixel, it has the effect of stretching the original image by 2x. When it's happening on x + y, in a complex way (because of the spiral pattern) you get cool patterns forming.
added on the 2015-11-11 18:35:56 by rudi rudi
For historical reasons, here's how Tsunami/VD tried to explain it in a readme attached to the Chaosland sources he sold (which then got leaked into BBS:es).. Looks like he wasn't so clear on what's happening either as he copied it from Dweezil ;)

Quote:
The fractal zoomer is really a simple routine, but even though it is only about 220 lines long source, it is very hard to get working! I have tried to explain it to about 10 guys, but only a few have understood it anyway;() But you already have the source if I recall it correctly? So here is a short explanation about the theory of fractal(???) zooming:

The picture is divided into 32*32 puzzles (in theory..). Then I go to the first puzzle and take values from 2 tables containing the x-difference and y-dif., add these together and get a value that tells: FROM WHERE should I copy a block TO here! Then I do the copying action and go to the next puzzle. and so on. There is also additional x & y "shaking" routines that try to obtain a better result in rotation. Not so static you know... I have 2 buffers. I copy from the one I show to the other one hiding somewhere. Hmm... that's the method, but it is quite hard to explain. Hopefully you understand it, when looking both this short guide and the source?
added on the 2015-11-11 18:46:49 by break break
nobody has actually explained it properly :P
added on the 2015-11-11 19:18:32 by rudi rudi
haha, yes.. also how the hell does this dithering remain. It is not "aliasing" as it zooms, but zooms as if it is a vector graphic. Still no idea how..
added on the 2015-11-11 19:29:58 by Navis Navis
according to quote from break, a 220 lines long sourcecode would probably mean it is alot of predefined tables where the blocks are in the code. it should be logical however.
added on the 2015-11-11 20:00:51 by rudi rudi
Of course, those who can read Amiga asm code can download the Chaosland source and try to dechiper it themselves :) Not sure if it's available in any convenient location, but you can at least grab it from my archives (under V for Virtual Dreams): http://minie0.pp.fi/amiga/
added on the 2015-11-11 20:20:09 by break break
this thread explained it well enough for me, there's a basic source implementation as well.
added on the 2015-11-11 20:23:52 by 4mat 4mat
Nice one 4mat, never noticed that thread before (and now I see it's even referenced to in the original pouet thread, duh)
added on the 2015-11-11 20:28:53 by break break
take a look at kumpa.c
added on the 2015-11-11 20:41:42 by g0blinish g0blinish
got something working atleast
BB Image
added on the 2015-11-11 21:36:39 by rudi rudi
xscreensaver has a version written in C too
added on the 2015-11-11 22:31:45 by absence absence
I've done a low-rez version of this effect recently; Tsunami's comment about "shaking" is extremely important if you want to slow the motion down to get a more impressive motion and also to distribute the discretization errors across the screen more evenly.
added on the 2015-11-11 23:02:44 by introspec introspec
I finally realize how this is done. Just need some testing to get it right.
added on the 2015-11-12 14:25:08 by Optimus Optimus
again: https://bel.fi/alankila/rotzoomer.html
added on the 2015-11-12 14:35:48 by g0blinish g0blinish
That thing is really nice t fool around with. :D
added on the 2015-11-12 16:41:52 by Exin Exin
again: runs like crap in FF. jsyk.
added on the 2015-11-13 12:00:55 by raer raer
Runs smooth in Leopard Webkit on OS X/PowerPC, G4/550 Mhz.
added on the 2015-11-13 20:39:46 by Hoild Hoild
Ran smooth on A500, no OS, MC68000/7Mhz.
added on the 2015-11-13 20:41:25 by noname noname
I can confirm that the rotzoomer webpage is extremely slow in FF for some reason. I suspect it's doing something really inefficient.
added on the 2015-11-14 01:31:22 by FreeFull FreeFull
Can some one code pc dx api version of this legendary effect so we can move on? :D
I think Dweezil will be happy, where ever he is nowadays...
added on the 2015-11-14 17:06:08 by moredhel moredhel
This reminds me, I wonder why I never saw anyone trying to copy the awesome "smoke" effect Dweezil presented in Darkroom (the 2nd effect after the blurred chaoszoomer).. I recall him saying it was based on some kind of cellular automaton.
added on the 2015-11-14 17:12:49 by break break
Quote:
Can some one code pc dx api version of this legendary effect so we can move on? :D
I think Dweezil will be happy, where ever he is nowadays...


I did the same.
added on the 2015-11-14 17:14:30 by g0blinish g0blinish
Gobby, strastuit.
Care the Share the link?
added on the 2015-11-15 12:08:25 by moredhel moredhel

login