Welcome to Fractal Forums

Fractal Software => Smartphones / Mobile Devices => Topic started by: searles on December 03, 2015, 12:38:59 PM




Title: New Version/Reimplementation of Fractview
Post by: searles on December 03, 2015, 12:38:59 PM
Hello, I implemented 2 years ago Fractview, and now I completely reimplemented it from scratch. The new version requires Android 5 (due to the use of GPU-Acceleration), is slimmer but at the same time way more powerful and faster. The old version of FractView is now FractViewLite, the new one should have gotten rid of all these nasty crashes that required reinstall. It still has a nice bookmark system, allows sharing images but also allows to copy the fractal to the clipboard and share it with others.

The program now uses a programming language and a virtual machine (using Renderscript which does its calculations on the CPU), hence there are a lot of possibilities, from orbit traps to Lyapunov-fractals (see attachment).

On the Google-Play homepage you will find links with additional information. Here is the link: https://play.google.com/store/apps/details?id=at.searles.fractview&hl=en

And of course, the whole thing is still open source and Ad-Free since this is all about the joy of fractals and the beauty of mathematics ;)

Cheers, Karl


Title: Re: New Version/Reimplementation of Fractview
Post by: Chillheimer on December 03, 2015, 06:20:25 PM
it looks really nice and pinch zooming/turning feels good! and I love your free&joy of fractals approach!

but I have no idea how to get beautiful pictures like you posted here or in the playstore, all i get is the standard mandelbrot set


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on December 04, 2015, 12:20:43 PM
In the next major version step I will add nice presets. You get these pictures by modifying the program in the Program-menu. What you do is as follows:

Go to the Program-menu and delete everything there.

Then paste the following code that will generate the picture that I posted (you find coordinates in [3.4, 4.0] × [2.5, 3.4])

Code:
var x int;
var y int;
var color int;

extern breakbound real = 1e9;
extern maxdepth int = 100;
var lyaexp realf = 0;
var i = 0;

func step(r) {
   z = r * z * (1 - z);
   lyaexp = lyaexp + log abs r (1 - 2z);
   next(i, maxdepth) and abs lyaexp < breakbound // returns a boolean
}

func fullstep(a, b) {
   step b and step b and step b and step b and step b and step b
   and step a and step a and step a and step a and step a and step a
}

var z real = 0.5;

extern pospal palette = [[#000, #a40, #fca, #fff]];
extern negpal palette = [[#000, #ccf, #88f]];

union c cplx;
var a real; var b real;

c = map(x, y);
var i = 0;
while fullstep(a, b);

lyaexp = lyaexp / i;

color = lab2int (if lyaexp < 0
 then negpal (4 log (1 + log (1 - lyaexp)))
 else pospal (6 lyaexp))


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on December 04, 2015, 12:34:51 PM
Now, from my phone, if you use "copy" you can copy the fractal. The following is really nice

Code:
scale 0.04366290828827071:0.035604162859637425 -0.035604162859637425:0.04366290828827071 0.16822888372571776:-0.254779458308629
program "

var x int;
var y int;
var color int;

extern alpha cplx = 1:0;
extern beta cplx = 2:0;
extern gamma cplx = 1:0;
extern delta cplx = -2:0;

// faster to put them into variables.
//  by default would be cplx.
var aa cplxf = alpha;
var bb cplxf = beta;
var cc cplxf = gamma;
var dd cplxf = delta;

func init(c) {
  (-cc * dd / (aa * bb))^(1/(bb - dd))
}

func fun(z, zz, c) {
 // interesting variation is to insert abs/conj
 // before power (==> burning-ship-alikes)
 c * (aa * z^bb + cc * z^dd)
}

extern maxdepth int = 120;
extern bailout real = 64;
extern epsilon real = 1e-9;
extern bailoutpalette palette = [[#000, #0a0, #acf, #804, #fe8]];
extern lakepalette palette = [[#a00, #ff4, #fff, #004]];

// power is only for cplxf
var c cplxf = map(x, y);
var z cplxf = init c;
var zz cplxf = 0;

var i = 0;
var power = max(re bb, re dd);

func smoothlen() {
 lab2int bailoutpalette log(i + smooth(z, bailout, power))
}

func lastarc() {
 lab2int lakepalette arcnorm z
}

while {
 var t = z;
 z = fun(z, zz, c);
 zz = t;

 not radrange(z, zz, bailout, epsilon,
         color = smoothlen(), color = lastarc())
     and (
             next(i, maxdepth)
         or
             { color = lastarc() ; false })
};"
ints {
}
reals {
bailout 1000000.0
}
cplxs {
delta -2.0:1.0
}
colors {
}
palettes {
bailoutpalette [[#000000, #e8ecff, #880044, #ffee88]]
lakepalette [[#ffffff, #000044]]
}

Copy this Text and use "paste" in the Programm.


Title: Re: New Version/Reimplementation of Fractview
Post by: DarkBeam on December 04, 2015, 12:36:45 PM
Does not launch - black screen. :'(
On a Nexus 7 (2013)
 :beer: hoping for a fix


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on December 04, 2015, 12:44:16 PM
I observed that right after install the program takes a long time to start up (I am not sure why yet, but it is only after the first start after a fresh install). I just reinstalled and it took 44 seconds. Will definitely be under investigation, but after the first start it runs smoothly and starts much faster.
(just to clarify, it is a blank screen, but not a crash?)


Title: Re: New Version/Reimplementation of Fractview
Post by: DarkBeam on December 04, 2015, 01:02:04 PM
Ah ok! It works now after some wait okay! :beer:


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on December 04, 2015, 01:17:35 PM
About the slow start up after install, it is as I suspected the Android system that has to do some internal work at the first startup (I use Renderscript and the fractal script is a large file that takes some time to compile after installation). I will investigate, maybe showing a splash screen if start-up takes more than 5 seconds.

Also, I added four presets for those who don't want to fiddle with copying and pasting. If you know of any fractals that should definitely be in there, post here, I will add them to the presets as well. You can reach presets via the "Program"-menu.

Cheers


Title: Re: New Version/Reimplementation of Fractview
Post by: DarkBeam on December 04, 2015, 04:54:49 PM
Quick question: possible to transcript this? It was a very popular formula.

Code:
// 'Ducks' fractal by Samuel Monnier
// (Implementation by Syntopia)
// See http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227
vec2 formula(vec2 z, vec2 c) {
    return cLog(vec2(z.x,abs(z.y)))+c;
}


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on December 04, 2015, 09:33:43 PM
Yes, is. Will put it into presets with the next update.

Code:

func init(c) { 0 }

func labs(a) {
   if im(a) > 0 then a else conj a
}

func fun(z, zz, c) {
  log(labs z + c);
}

var x int;
var y int;
var color int;

extern maxdepth int = 120;
extern bailout real = 64;
extern epsilon real = 1e-9;
extern lakepalette palette = [[#000, #0a0, #fb8, #fff]];

var c cplxf = map(x, y);
var z cplxf = init c;
var zz cplxf;

var i = 0;

func lastarc() {
    lab2int lakepalette (4 * arcnorm z)
}

while {
   var t = z;
   z = fun(z, zz, c);
   zz = t;
   not diffless(z, zz, epsilon)
      and next(i, maxdepth)
   or { color = lastarc() ; false }
};


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on December 04, 2015, 09:35:53 PM
And here is a zoom into this one.


Title: Re: New Version/Reimplementation of Fractview
Post by: DarkBeam on December 04, 2015, 11:55:45 PM
The biggest interest of the formula is the j mode really! But very nice :D

This is Fractint's Barnsley 1 but it is (also) nice in julia mode only. That I am unable to use ;)
Fractint base formulas:
http://www.nahee.com/spanky/www/fractint/fractal_types.html
Code:
func init(c) { 0 }

func bar(a) {
   if re(a) > 0 then a-1 else a+1;
}

func fun(z, zz, c) {
  bar(z) * c;
}

var x int;
var y int;
var color int;

extern maxdepth int = 120;
extern bailout real = 64;
extern epsilon real = 1e-9;
extern lakepalette palette = [[#000, #0a0, #fb8, #fff]];

var c cplxf = map(x, y);
var z cplxf = init c;
var zz cplxf;

var i = 0;

func lastarc() {
    lab2int lakepalette (4 * arcnorm z)
}

while {
   var t = z;
   z = fun(z, zz, c);
   zz = t;
   not diffless(z, zz, epsilon)
      and next(i, maxdepth)
   or { color = lastarc() ; false }
};

Also a Nova fractal. It looks nice even better than the original (less distortion)... Did not found the original formula for uf.

Code:
func init(c) { 1 }

func fun(z, zz, c) {
  z - (z*z*z-1)/(3*z*z) + c
}

var x int;
var y int;
var color int;

extern maxdepth int = 120;
extern bailout real = 64;
extern epsilon real = 1e-9;
extern lakepalette palette = [[#000, #0a0, #fb8, #fff]];

var c cplxf = map(x, y);
var z cplxf = init c;
var zz cplxf;

var i = 0;

func lastarc() {
    lab2int lakepalette (4 * arcnorm z)
}

while {
   var t = z;
   z = fun(z, zz, c);
   zz = t;
   not diffless(z, zz, epsilon)
      and next(i, maxdepth)
   or { color = lastarc() ; false }
};


Title: Re: New Version/Reimplementation of Fractview
Post by: DarkBeam on December 05, 2015, 11:46:47 AM
For some reason it forbids me to save the images (permission denied). Btw a Nova minibrot;
(http://i63.tinypic.com/51ok6q.png)
The generalized does not work. (Why?)
Code:
func init(c) { 1 }
extern zpow real = 3;


func fun(z, zz, c) {
  z - (z^(zpow)-1)/(zpow*(z^(zpow-1))) + c
}


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on December 08, 2015, 10:28:24 PM
Hm, that is interesting. If you use Android 6 or some extension to control the rights of an app, obviously you need to grant the "Write files"-permissions. Do you get an exception with a crash? I noticed a bug when you store images with higher height than width (a stupid bug), this one is fixed in the next update (should be online in the next hours) that also fixes some more needle stings.

EDIT: And about the generalized version: Try to store the result in a variable:
Code:
func fun(z, zz, c) {
    var tmp = z - (z^(zpow)-1)/(zpow*(z^(zpow-1))) + c ;
    tmp
}

The reason is that the type system is not that fancy and it does not handle the conversion of single-precision cplx numbers (that are used by the general power-operation) to double-precision ones.

This will be fixed with the next major version (which will be around february).


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on February 24, 2016, 11:32:11 AM
I published an update that brings a lot of major improvements and many new presets.
https://www.youtube.com/watch?v=cxb7aN7zpyo (https://www.youtube.com/watch?v=cxb7aN7zpyo)

Find more videos here:
https://www.youtube.com/channel/UCvl2XV_WsfwHLpr0NSDtNcg (https://www.youtube.com/channel/UCvl2XV_WsfwHLpr0NSDtNcg)

Now, start-up is much faster, the program reduced in size (we are down to 0,54 MB!) and the backing programming language improved  a lot. Though, you would not need it (unless you want to) because you can easily edit everything directly from the parameter's menu.

The thing I like the most (apart the use of 2d color palettes) is the way to select julia sets from the mandelbrot set. You can simply center the point to obtain the parameter. For assistance, you can select an option to show a grid.

Apart from that there are a lot new presets. One (slowcomputationally intense but amazingly pretty) preset is the magnetic pendulum (see eg the german Wikipedia https://de.wikipedia.org/wiki/Magnetisches_Pendel (https://de.wikipedia.org/wiki/Magnetisches_Pendel)), but there is also one preset to simply view complex functions using the color-wheel coloration (see https://en.wikipedia.org/wiki/Color_wheel_graphs_of_complex_functions (https://en.wikipedia.org/wiki/Color_wheel_graphs_of_complex_functions))

You can find more on the app on google play
https://play.google.com/store/apps/details?id=at.searles.fractview (https://play.google.com/store/apps/details?id=at.searles.fractview)

And attached, one julia set of the duck fractal

EDIT: And, if you like the program, a positive review is welcome. Feature requests are also accepted here.


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on February 29, 2016, 12:26:19 AM
In order to better support the app with certain topics, I have started a blog here:

http://fractview.blogspot.co.at/

https://fractview.wordpress.com/

EDIT: Switched from Blogger to Wordpress

Cheers,
Karl


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on March 15, 2016, 03:01:38 PM
Currently preparing an exciting update. in the next update, due in the next days, the presets-menu will be placed more prominently, with small previews and there is a new favorite of mine: 3d-fractals (not like mandelbulb - these are out of the scope). The following image took more than one hour to render (with 2x2 supersampling and a resolution of 3200x2400, but it was definitely worth the wait.

EDIT: Large version of the image: http://orig02.deviantart.net/87ef/f/2016/083/2/4/phoenix3d_by_searlesat-d9wbwt8.png (http://orig02.deviantart.net/87ef/f/2016/083/2/4/phoenix3d_by_searlesat-d9wbwt8.png)


Title: Re: New Version/Reimplementation of Fractview
Post by: searles on March 24, 2016, 09:44:05 AM
You can find some higher resolution images here, also for download as backgrounds: http://searlesat.deviantart.com/gallery/ (http://searlesat.deviantart.com/gallery/)
I have fixed all bugs that I am aware of and most crashes should be gone. Since Renderscript, the backing programming language, is poorly documented I would ask you for your help. If you experience still regular crashes, please submit bugreports to further improve the program.

And here is a nice illustration of the pendulum attractor (see https://nylander.wordpress.com/2007/10/27/magnetic-pendulum-strange-attractor/ (https://nylander.wordpress.com/2007/10/27/magnetic-pendulum-strange-attractor/)) where the depth information represents the length of the path of the pendulum. It is a slow Preset because it is difficult to calculate but it creates amazing pictures.

(http://orig02.deviantart.net/04d3/f/2016/084/1/7/pendulum_by_searlesat-d9wdcnd.png)

All the best,
Karl