Logo by rathinagiri - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. March 28, 2024, 08:40:39 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Magnetic Mandelbrot  (Read 1452 times)
0 Members and 1 Guest are viewing this topic.
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« on: July 31, 2014, 10:12:59 PM »

I want to do the Magnetic Mandelbrot 1 fractal and eventually find the perturbation method for it.
However I only get almost all orbits trapped, i.e. an almost only black picture, no matter how high I set the maximum iteration.
But it has some expected shapes.
What am I doing wrong? Is there a different bailout criteria?


Code:
std::complex<double> Z(Zr,Zi), C(m_pX[x],m_pY[y]), _1(1,0), _2(2,0);
std::complex<double> T = (Z*Z) + (C-_1);
std::complex<double> N = Z*_2 + (C-_2);
std::complex<double> K = T/N;
Z = K*K;
Zr = Z.real();
Zi = Z.imag();


* magnetic-err.jpg (43.8 KB, 640x360 - viewed 223 times.)
« Last Edit: July 31, 2014, 10:34:13 PM by Kalles Fraktaler, Reason: Some typos corrected and image added » Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: August 01, 2014, 11:35:17 AM »

yes there is, in the ultrafractal formula definition bailout criteria is:


  |z| < @bailout && |z - 1| > @lowerbailout

lowerbailout defaults to "0.0005"

but i checked it, this part of the bailout is not so siginificantly influencing the image, at least i did not end with an image like yours when removing that part!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Roquen
Iterator
*
Posts: 180


« Reply #2 on: August 01, 2014, 03:11:12 PM »

Is this what you expect: http://glsl.heroku.com/e#18816.0
Logged

All code submitted by me is in the public domain. (http://unlicense.org/)
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #3 on: August 06, 2014, 04:45:46 AM »

Or this ?

Code:
/***************************************************************************
                          qtfmag.cpp  -  description
                             -------------------
    begin                : Wed Sep 5 2001
    copyright            : (C) 2001 by 3Dickulus.
    email                : ***@****.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "qtfpainter.h"

/**********************************************************
 *
 *               Magnetic funcs
 */

void QtfPainter::mag0func( double r,  double i)
{
  uint count = 0;
  double p;
  double q;
  double a;
  double b;
  double mag;
  double dr = divergence*0.33333;

  while ( count++ < maxiter)
  {
    a = r * r - i * i + 3;
    p = (r + r);
    b = p * i;
    p += 2;
    q = i; q += i;
    mag = (p * p + q * q);
    r = (a * p + b * q) / mag;
    i = (p * b - a * q) / mag;
    a = r * r - i * i;
    i = dr * r * i;
    r = a;

    if ( (fabs(r-1) + fabs(i)) < 0.0001)
    {
      count |= 16;
      break;
    }
    if ( fabs(a) > 10000) break;

  }

  coltmp = (count >= maxiter) ? 0 : ( count % maxcol + 2 );

return;
}

void QtfPainter::mag1func( double r,  double i)
{
  uint count = 0;
  double p;
  double q;
  double a;
  double b;

  double dr = divergence*0.33333;

  double mag,magr,magi;

  magr = r + 1;
  magi = i;

  r = 0;
  i = 0;
  while ( count++ < maxiter)
  {
    a = r * r - i * i + magr - 1;
    p = b = (r + r);
    p += magr; p -= 2;
    b *= i; b += magi;
    q = i; q += i; q += magi;
    mag = (p * p + q * q);
    r = (a * p + b * q) / mag;
    i = (p * b - a * q) / mag;
    a = r * r - i * i;
    i = dr * r * i;
    r = a;

    if ( (fabs(r-1) + fabs(i)) < 0.0001)
    {
      count |= 16;
      break;
    }
    if ( fabs(a) > 10000) break;
  }
  coltmp = (count >= maxiter) ? 0 : ( count % maxcol + 2 );

return;
}


void QtfPainter::mag2func( double r,  double i)
{

  uint count = 0;
  double p;
  double q;
  double a;
  double b;
  double mag;
  double dr = divergence*0.33333;

  while ( count++ < maxiter)
  {
    a = r * r - i * i + 9;
    b = 2 * r * i;
    p = a * r - b * i + 6;
    q = a * i + b * r;
    a = 3 * (r * r - i * i) + (6 * r) + 7;
    b = 3 * (r * i + r * i) + (6 * i);
    mag = a * a + b * b;
    r = (p * a + q * b)/mag;
    i = (a * q - p * b)/mag;
    mag = r * r - i * i;
    i   = dr * r * i;
    r   = mag;

    if ( (fabs(r-1) + fabs(i)) < 0.0001)
    {
      count |= 16;
      break;
    }
    if ( fabs(a) > 10000) break;
  }
  coltmp = (count >= maxiter) ? 0 : ( count % maxcol + 2 );

return;
}


void QtfPainter::mag3func( double r,  double i)
{
  uint count = 0;
  double p = r + 1;
  double q = i;
  double a;
  double b;
  double dr = divergence*0.33333;

  double re, im;
  double ren, imn;
  double ret, imt;
  double mag,magr,magi;

  re = (p - 1) * (p - 2) - q * q;
  im = q * (2 * p - 3);
  magr = p * p - q * q - 3 * p + 3;
  magi = 2 * p * q - 3 * q;
  r = 0;
  i = 0;

  while ( count++ < maxiter)
  {
    ren = r * r - i * i;
    imn = 2 * r * i;
    a = ren + 3 * (p - 1);
    b = imn + 3 * q;
    ret = a * r - b * i + re;
    imt = a * i + b * r + im;
    a = 3 * ren + 3 * ((p - 2) * r - q * i) + magr;
    b = 3 * imn + 3 * (q * r + (p - 2) * i) + magi;
    mag = a * a + b * b;
    r = (ret * a + imt * b) / mag;
    i = (a * imt - ret * b) / mag;
    a = r * r - i * i;
    i = dr * r * i;
    r = a;

    if ( (fabs(r-1) + fabs(i)) < 0.0001)
    {
      count |= 16;
      break;
    }
    if ( fabs(a) > 10000) break;
  }
  coltmp = (count >= maxiter) ? 0 : ( count % maxcol + 2 );

return;
}


EDIT: image 1x generated by mag0func
         image 1q generated by mag1func
         the other 2 funcs are variants of these two


* mag-1q.jpg (39.45 KB, 575x389 - viewed 424 times.)

* mag-1x.jpg (8.12 KB, 371x280 - viewed 412 times.)
« Last Edit: August 06, 2014, 06:03:55 AM by 3dickulus, Reason: clarity? » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Magnetic minibrot 3d Art / Composition DarkBeam 0 1215 Last post April 10, 2011, 04:31:25 PM
by DarkBeam
Magnetic Torsion Images Showcase (Rate My Fractal) Pauldelbrot 0 690 Last post September 06, 2011, 03:43:38 AM
by Pauldelbrot
Magnetic Equilibrium Mandelbulb3D Gallery lenord 0 501 Last post November 12, 2011, 03:47:04 AM
by lenord
Mandelbrot Safari XXIX: Magnetic Torsion Mantis Images Showcase (Rate My Fractal) Pauldelbrot 0 579 Last post December 02, 2012, 12:23:11 PM
by Pauldelbrot
Mandelbrot set in "cross-sections of magnetic field borders" ? Fractals Applied or in Nature « 1 2 3 » Chillheimer 37 9422 Last post February 18, 2014, 07:20:14 PM
by stereoman

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.184 seconds with 27 queries. (Pretty URLs adds 0.009s, 2q)