Personal computing discussed

Moderators: askfranklin, renee, emkubed, Captain Ned

 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

More fun with fractals...

Wed Feb 20, 2013 10:20 pm

As you may already be aware if you follow the DYMT:R thread, I've been playing around with fractals again.

The latest geeky diversion is figuring out how to create animated fractal zoom videos. You can check out the first attempt here: http://youtu.be/ceeW4nIw0D4

It's a 90-second "deep zoom" (12 orders of magnitude) into the Mandelbrot set at (-7.540838721493303e-01 + 4.981851110224700e-02i). To give some sense of scale, this is roughly equivalent (plus or minus an order of magnitude) to magnifying an individual atom to the size of your screen.

The video is rather low-res (only 480p), and has some aliasing/noise effects and video compression artifacts (grumble, grumble), but I think it shows promise.

Everything was done using home grown fractal rendering software (written in Python and C), and Open Source video encoding tools, running on Ubuntu Linux.

I may need to re-purpose some spare PC hardware into a fractal rendering farm so I can do this stuff in high-def. I've got a couple of Phenom II 1090Ts and an X4 980 that I could press into service; with my main desktop's FX-8320 in the mix that's 24 reasonably capable cores I should be able to throw at this. I think that should get the render times down to something tolerable. :wink:

So... any other math/fractal/graphics geeks out there who are into this stuff?
Nostalgia isn't what it used to be.
 
anotherengineer
Gerbil Jedi
Posts: 1688
Joined: Fri Sep 25, 2009 1:53 pm
Location: Northern, ON Canada, Yes I know, Up in the sticks

Re: More fun with fractals...

Wed Feb 20, 2013 11:26 pm

I think you should draw an isometric drawing of a fractal in 2D autocad ;)
Life doesn't change after marriage, it changes after children!
 
yogibbear
Gerbil Elite
Posts: 920
Joined: Fri Feb 08, 2008 11:30 am

Re: More fun with fractals...

Thu Feb 21, 2013 12:18 am

Needs more wub wub.
Core i7 4770K | eVGA GTX1080 FTW ACX 3.0 | 16GB DDR3 2133mhz | Asus Z87-PLUS | Corsair HX650 | Fractal Define R4 | Samsung 840 Pro 256GB | Windows 10 x64
 
JohnC
Gerbil Jedi
Posts: 1924
Joined: Fri Jan 28, 2011 2:08 pm
Location: NY/NJ/FL

Re: More fun with fractals...

Thu Feb 21, 2013 12:31 am

yogibbear wrote:
Needs more wub wub.

http://www.youtube.com/watch?v=GvqKnCdB_D4&sns=em ?
Gifter of Nvidia Titans and countless Twitch donation extraordinaire, nothing makes me more happy in life than randomly helping random people
 
sschaem
Gerbil Team Leader
Posts: 282
Joined: Tue Oct 02, 2007 11:05 am

Re: More fun with fractals...

Thu Feb 21, 2013 12:42 am

check this site. lots of fractal experiments.

http://glsl.heroku.com/e#6480.7

http://glsl.heroku.com/e#6550.0
 
AMM
Gerbil Jedi
Posts: 1996
Joined: Tue Jun 10, 2003 9:12 am
Location: London
Contact:

Re: More fun with fractals...

Thu Feb 21, 2013 6:03 am

Any chance of github-ing your code?
To understand recursion, you must first understand recursion.
 
Chrispy_
Maximum Gerbil
Posts: 4670
Joined: Fri Apr 09, 2004 3:49 pm
Location: Europe, most frequently London.

Re: More fun with fractals...

Thu Feb 21, 2013 6:46 am

Ah, fractals....

I must have wasted hours in the early days of WinFRACT, when I first upraded to a video card that could handle 24-bit colour.
Congratulations, you've noticed that this year's signature is based on outdated internet memes; CLICK HERE NOW to experience this unforgettable phenomenon. This sentence is just filler and as irrelevant as my signature.
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Thu Feb 21, 2013 9:56 am

AMM wrote:
Any chance of github-ing your code?

The plan is to release the code publicly in the near future. It's currently rather hack-ish; as I'm playing around with it I'm cleaning it up, documenting it, and fixing a few mis-features.
Nostalgia isn't what it used to be.
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Fri Feb 22, 2013 1:41 am

Nostalgia isn't what it used to be.
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Fri Feb 22, 2013 7:10 pm

Here's one rendered at higher resolution (full 720p): http://youtu.be/4G1n2YmAVJY

Last night I figured out how to re-use data from one frame to drastically speed up rendering of the next. This makes rendering the fractal videos at higher resolutions practical, even on a run-of-the-mill desktop system. It still isn't exactly fast, but it "only" takes hours or days (instead of days or weeks). :lol:

The dirty details: Black areas of the image (points in the interior of the Mandelbrot set) are expensive to compute, especially at high zooms; this is because you need to iterate all the way up to the limit to determine whether a point is a member of the set, and the limit must be increased to insanely high values (half a million or so) as the zoom level rises to maintain image quality and avoid spurious "black holes". The trick is that when rendering a series of frames for a smooth zoom, successive images are very similar to each other. So you can use pixel data from the previous frame to decide which pixels of the new frame can't possibly lie outside the set, and skip the calculation for those points (just color them black without bothering to iterate).

I also want to come up with methods for scripting more complicated zoom/pan movements, to create virtual tours around the set instead of simple deep zooms into a single point.
Nostalgia isn't what it used to be.
 
ludi
Lord High Gerbil
Posts: 8646
Joined: Fri Jun 21, 2002 10:47 pm
Location: Sunny Colorado front range

Re: More fun with fractals...

Sun Feb 24, 2013 6:58 pm

just brew it! wrote:
Here's one rendered at higher resolution (full 720p): http://youtu.be/4G1n2YmAVJY

Whoa. Not only was that impressive, but after the video ended, I got a reverse-motion illusion (all the elements of the YouTube page layout were continuously receding) for several seconds afterward.
Abacus Model 2.5 | Quad-Row FX with 256 Cherry Red Slider Beads | Applewood Frame | Water Cooling by Brita Filtration
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Sun Feb 24, 2013 8:32 pm

ludi wrote:
Whoa. Not only was that impressive, but after the video ended, I got a reverse-motion illusion (all the elements of the YouTube page layout were continuously receding) for several seconds afterward.

The zoom rate is a bit higher on that one (same total zoom, but over a 60 second period instead of 90). I think this may accentuate the motion illusion effect.

Here's one more at 720p: http://youtu.be/t5jXTjQ4Nrg
Nostalgia isn't what it used to be.
 
FireGryphon
Darth Gerbil
Posts: 7729
Joined: Sat Apr 24, 2004 7:53 pm
Location: the abyss into which you gaze

Re: More fun with fractals...

Sun Feb 24, 2013 11:16 pm

just brew it! wrote:
ludi wrote:
Whoa. Not only was that impressive, but after the video ended, I got a reverse-motion illusion (all the elements of the YouTube page layout were continuously receding) for several seconds afterward.

The zoom rate is a bit higher on that one (same total zoom, but over a 60 second period instead of 90). I think this may accentuate the motion illusion effect.


Same thing just happened to me. Cool.

JBI, looking forward to your final documented code. Nice work on the videos so far.
Sheep Rustlers in the sky! <S> Slapt | <S> FUI | Air Warrior II/III
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Wed Feb 27, 2013 11:25 pm

http://youtu.be/8An2NoEw-2M (Make sure your player is set to 720p HD for best clarity, assuming your connection has sufficient bandwidth!)

Another "straight zoom" vid. I'd really like to work on the more elaborately scripted "fractal tour" stuff (and maybe even create some original music to accompany them), but don't see myself having time until mid-March. For now, this sort of thing will have to do, since the code's already written, and I can just set up a destination point and let it render overnight.

This one is a zoom into the "double spiral" (left) side of the valley between the main cardioid and the largest circular feature of the Mandelbrot set, at coordinates 7.534266571159055e-01, 5.181353020385396e-02i.

A nice illustration of "feature doubling" as we zoom in to a "mini-brot" at a magnification of 2e+12. Watch as the number of arms coming out of the vortex we're zooming into starts at 2 around the 0:57 mark, and repeatedly doubles at 1:12, 1:20, 1:26, and 1:28 (additional doublings, to 64 and 128 arms are also visible at the final magnification).
Nostalgia isn't what it used to be.
 
liquidsquid
Minister of Gerbil Affairs
Posts: 2661
Joined: Wed May 29, 2002 10:49 am
Location: New York
Contact:

Re: More fun with fractals...

Thu Feb 28, 2013 8:58 am

Seems like an excellent opportunity to see if you can take advantage of CUDA or some other type of GPU accelerator. Use it for benchmarks...
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Thu Feb 28, 2013 10:11 am

liquidsquid wrote:
Seems like an excellent opportunity to see if you can take advantage of CUDA or some other type of GPU accelerator. Use it for benchmarks...

Indeed. I've been thinking of taking the code and porting it to CUDA or OpenCL. Been wanting to learn how to do GPU computing.
Nostalgia isn't what it used to be.
 
AMM
Gerbil Jedi
Posts: 1996
Joined: Tue Jun 10, 2003 9:12 am
Location: London
Contact:

Re: More fun with fractals...

Sat Mar 02, 2013 11:10 am

It should be highly parallelizable right? Is your current implementation threaded?
To understand recursion, you must first understand recursion.
 
chuckula
Minister of Gerbil Affairs
Posts: 2109
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: More fun with fractals...

Sat Mar 02, 2013 12:23 pm

just brew it! wrote:
http://youtu.be/8An2NoEw-2M (Make sure your player is set to 720p HD for best clarity, assuming your connection has sufficient bandwidth!)

Another "straight zoom" vid. I'd really like to work on the more elaborately scripted "fractal tour" stuff (and maybe even create some original music to accompany them), but don't see myself having time until mid-March. For now, this sort of thing will have to do, since the code's already written, and I can just set up a destination point and let it render overnight.

This one is a zoom into the "double spiral" (left) side of the valley between the main cardioid and the largest circular feature of the Mandelbrot set, at coordinates 7.534266571159055e-01, 5.181353020385396e-02i.

A nice illustration of "feature doubling" as we zoom in to a "mini-brot" at a magnification of 2e+12. Watch as the number of arms coming out of the vortex we're zooming into starts at 2 around the 0:57 mark, and repeatedly doubles at 1:12, 1:20, 1:26, and 1:28 (additional doublings, to 64 and 128 arms are also visible at the final magnification).


Beautiful! I'm always a sucker for fractals. Is your code generic enough to handle different sets like the Julia & Fatou sets without too much trouble?
4770K @ 4.7 GHz; 32GB DDR3-2133; Officially RX-560... that's right AMD you shills!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Sat Mar 02, 2013 12:47 pm

AMM wrote:
It should be highly parallelizable right? Is your current implementation threaded?

Yes! Automatically uses as many cores as you've got (up to 32, IIRC). Chunks up the image being rendered into 50x50 pixel blocks, and hands those off to worker threads running on each core. Tested it on a 12-core server at work and it scales very well.

chuckula wrote:
Beautiful! I'm always a sucker for fractals. Is your code generic enough to handle different sets like the Julia & Fatou sets without too much trouble?

Yup. The interactive version of it allows you to click on a point in the Mandelbrot set and displays the corresponding Julia set in a second window. After next weekend I will have more time to work on the code again; want to do some Julia set morphing videos (animation of how the Julia set changes as the associated point in Mandelbrot-space moves).

Also need to do some regression testing to make sure the Windows version still works before releasing the code "into the wild", since all of my recent futzing around has been done under Linux.
Nostalgia isn't what it used to be.
 
Dposcorp
Minister of Gerbil Affairs
Posts: 2771
Joined: Thu Dec 27, 2001 7:00 pm
Location: Detroit, Michigan

Re: More fun with fractals...

Sat Mar 02, 2013 1:37 pm

just brew it! wrote:

That was very cool. Thanks
 
sschaem
Gerbil Team Leader
Posts: 282
Joined: Tue Oct 02, 2007 11:05 am

Re: More fun with fractals...

Sat Mar 02, 2013 1:58 pm

If you want to experiment with the GPU check the link I posted, dozen of ready to go samples. Including exotic 3d fractal experiments
http://glsl.heroku.com/e#7074.0

You can also use www.shadertoy.com to do real time GPS programming

Just don't try any of this on an intel apu.... :)
 
just brew it!
Administrator
Topic Author
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: More fun with fractals...

Sat Mar 02, 2013 2:22 pm

sschaem wrote:
Just don't try any of this on an intel apu.... :)

Well, it's not like I tend to run bleeding edge GPUs (since I don't game). So although I've got a couple of reasonably recent discrete GPUs (one each ATI and nVidia) at my disposal, they are quite low-end.
Nostalgia isn't what it used to be.
 
Arvald
Gerbil Elite
Posts: 761
Joined: Tue Sep 27, 2011 12:14 pm
Location: Gerbil-land, Canada

Re: More fun with fractals...

Mon Mar 04, 2013 9:25 am

Wow... oldschool :-)
I have not done Fractal work since a coop I did 20 years ago (the PC they gave me was not up to handling them rendering at a decent rate).
I worked with Mandelbrot and Julia sets at the time.

Who is online

Users browsing this forum: Google [Bot] and 1 guest
GZIP: On