Title: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 14, 2014, 10:02:57 PM I created a repository for my little programs that do things to the output of kf (just some colouring tools so far):
http://code.mathr.co.uk/kf-extras They're written in C (C99 standard), tested on Linux with GCC, using OpenMP for parallelism where appropriate. Code is currently a bit ugly (lots of copy/paste between files) - I hope to clean it up soon, which should make writing new tools much easier. Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 17, 2014, 03:11:31 PM Today I finished the exponential map (aka log polar or mercator projection) convertor:
(http://mathr.co.uk/mandelbrot/2014-12-17_kf-extras_expmap_wire.png) parameters: http://mathr.co.uk/mandelbrot/2014-12-17_kf-extras_expmap_wire.kfr rendered from 98 640x360 kfb files, giving a 565x6075 image, downscaled 4x in GIMP for anti-aliasing. Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: youhn on December 17, 2014, 05:59:55 PM How would this sound if you see the horizontal axis as time, and the vertical axis as frequency ... ? Maybe do a logscale on the horizontal axis first. Any jpeg-to-wave converters around? :hmh:
Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: Chillheimer on December 17, 2014, 07:11:40 PM hey claude, this looks really fascinating!
and the fact that you can do this with an addition to kalles fraktaler is the best.. :) now I'm wondering, how can someone like me, who has no programming skills, using windows 8, use this? is it possible? you do know kf is open source? it would be great if these kinds of things would find their way directly into the program. Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 17, 2014, 08:54:24 PM hey claude, this looks really fascinating! and the fact that you can do this with an addition to kalles fraktaler is the best.. :) now I'm wondering, how can someone like me, who has no programming skills, using windows 8, use this? is it possible? probably not without learning more - even if you had exe versions (which I can't provide as I don't use windows), you'd need to use interactive cmd command line (or bat files) to make them do anything useful - so I guess they're power-user only for now Quote you do know kf is open source? it would be great if these kinds of things would find their way directly into the program. yep, I looked at kf's source to know the file format of .kfb files and my programs are open source too, so Karl is free to look (and copy - all I ask is attribution and reciprocal source openness, no specific license yet but think LGPL in intent) the code into his stuff - I can't do it myself because (again) I don't use windows another possibility is for someone to write a separate gui program (like the movie maker) that allows batch processing, but it would be nice to have at least some of the features in kf (especially i miss the pseudode colouring when exploring) Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 17, 2014, 09:03:27 PM How would this sound if you see the horizontal axis as time, and the vertical axis as frequency ... ? Maybe do a logscale on the horizontal axis first. Any jpeg-to-wave converters around? :hmh: I tried some experiments with libfftw3, but didn't like how it sounded: http://mathr.co.uk/mandelbrot/2014-12-17_kf-extras_expmap_wire.wav will continue experimenting... Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: youhn on December 17, 2014, 10:04:51 PM Ha, that was fast! Thanks man! ;D
Indeed does not sound very good, this should be filtered further to perhaps make something nice of it. Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 17, 2014, 10:49:31 PM Here's a new video with sound:
http://mathr.co.uk/mandelbrot/2014-12-17_three_five.ogv http://mathr.co.uk/mandelbrot/2014-12-17_three_five.kfr When zooming I tried to go through a few places with different rotational symmetry to make the sound more interesting. Here's a tutorial of how I made it, bash shell commands with comments in between: Code: mkdir ~/work The zoom assembler is at http://code.mathr.co.uk/book it doesn't need anything else in the repository so you could just get that file: http://code.mathr.co.uk/book/blob/HEAD:/code/zoom.c (click "raw" to download) compile it like this: Code: gcc -std=c99 -Wall -Wextra -pedantic -O3 -fopenmp -ggdb -o zoom zoom.c -lGLU -lGL -lGLEW -lglut -lm Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 18, 2014, 11:54:33 AM Here's a tutorial of how I made it Now obsoleted by a fully automatic movie maker bash script (kfbtoogv.sh in the repository) - just specifiy the length in seconds and a couple of directories! A few things are hardcoded (program directories, antialiasing factor, ... - need to make them runtime options), and using ghc for simple maths is a bit overkill, so it's not perfect yet. Overnight I rendered a zoom out sequence of the same location at 3840x2160 into ~/work , then I mkdir ~/work/tmp, then I kfbtoogv.sh 120 ~/work ~/work/tmp and 18mins later got this video without having to do anything manually: http://mathr.co.uk/mandelbrot/2014-12-18_three_five_720p.ogv Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: TheRedshiftRider on December 18, 2014, 01:35:10 PM I dont want to sound like a noob but how do I open the files of the expmap? I read what you said but what could I use to open them?
Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 18, 2014, 02:06:22 PM I dont want to sound like a noob but how do I open the files of the expmap? I read what you said but what could I use to open them? You can browse the source code here: http://code.mathr.co.uk/kf-extras/tree You can download all the code with git, for example: git clone http://code.mathr.co.uk/kf-extras.git Once you have the source code, you need to compile it. On Linux, just cd into the directory and type 'make'. On Debian systems you probably need the package 'build-essential', so install that first. Other Linux distributions probably have similar packages. I don't know how to compile it on Windows, but MINGW might be a start (it provides a minimal unix-like toolset including gcc the GNU C compiler). You might be able to compile it with Microsoft VisualStudio, but I don't know at all anything about that. Check the README for instructions on how to run it. You need to give it a list of kfb files and redirect the output to a file, something like "ls *.kfb | expmap > out.pgm" (dir might work on Windows, but check that it outputs one file per line with no other junk) I just realized there might be a problem with text format (line endings are different between Window (CRLF) and Linux (LF)) - I'll try to debug this soon... Once you run it, the output is PGM, one of the NetPBM family of simple uncompressed image file formats - GIMP loads it fine, or there is pnmtopng which can convert to PNG on the command line. Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: Chillheimer on December 18, 2014, 02:21:36 PM http://mathr.co.uk/mandelbrot/2014-12-18_three_five_720p.ogv although at times it sounds horrible, i somehow like the way how the picture translates into sound. it sounds accurate and partly harmonic... As computer-musician I wonder if one could use fractals as oscillators.... (a little research shows: already happens, I have to check that out.. http://www.musicradar.com/reviews/tech/tone2-electrax-387994/ ) Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: quaz0r on December 18, 2014, 07:46:05 PM take a look at this nifty program, it actually does what you guys are thinking about:
http://photosounder.com/ i tried running a mandelbulb render through it once, it turned out pretty trippy i thought O0 Title: Re: kf-extras for manipulating output from Kalles Fraktaler 2 Post by: claude on December 21, 2014, 12:41:14 PM I adapted the code for these to run in wine32 on Linux (it seems wine32 really doesn't like to pipe data in or out). So now they take command line arguments instead. EXEs are all in here, run them without arguments to see how to use them: http://mathr.co.uk/mandelbrot/kf-extras_v3-windows.zip Source code for this release is at the v3-windows tag in the windows branch, direct link to browse: http://code.mathr.co.uk/kf-extras/tree/refs/heads/windows To compile on Linux, install mingw64 development tools (there are Debian packages) and run make -f Makefile.w32 I probably won't develop these any further, as I got mightymandel working to a sufficiently good state (finally added glitch correction!). Benchmarks are about equally fast as KF in wine32, which is nice. See this thread for that project's updates: http://www.fractalforums.com/index.php?topic=20428.0 |