# Fractalforums

## Fractal Related Discussion => Fractal Mathematics And New Theories => Topic started by: trafassel on December 14, 2019, 04:22:02 PM

Title: Mandelbrot Feigenbaum
Post by: trafassel on December 14, 2019, 04:22:02 PM
This code is far from a optimal implementation to draw a Feigenbaum Diagram for a one dimensional Mandelbrot Set, but this works in my renderer (Gestaltlupe) an can easily be used to extend in the 3D space.

Code: [Select]
public override void Init(){  base.Init();  if(GetString("intern.Formula.TempUpdateVal")!="d2417dfa49d0913c3816fb4199d079dd")  {    SetParameterBulk("Formula.Parameters: bailout=1E+200 is2d=0 redmax=4.5 scaley=3.1 voxelsize=0.001 Formula.Static: Cycles=1365 Julia=0 jx=0 jy=0 jz=0 Scene: CenterX=-1.61853777777782 CenterY=-0.191357777777785 CenterZ=-2.87922837698476E-17 Radius=1 Transformation.Camera: AngleX=90 AngleY=0 AngleZ=0 IsometricProjection=1 Position=1 intern.Formula: TempUpdateVal=d2417dfa49d0913c3816fb4199d079dd");  }}public double bailout;public bool is2d;public double voxelsize;public double redmax;public double scaley;System.Random _rand=new Random();public override bool GetBool(double x,double y,double z){  y*=scaley;  x+=voxelsize*_rand.NextDouble();  double jx,jy,jz;  if (_isJulia)  {    jx=_jx;    jy=_jy;    jz=_jz;  }  else  {    jx=x;    jy=y;    jz=z;    x=_jx;    y=_jy;    z=_jz;  }  double minvy=jy-voxelsize;  double maxvy=jy+voxelsize;  for (int n=1;n < _cycles;  n++)  {    x=x*x+jx;    if(minvy<x &&maxvy>x)Red++;    if(Red>redmax)return false;  }  return true;}
Title: Re: Mandelbrot Feigenbaum
Post by: trafassel on December 14, 2019, 09:47:48 PM
I switch y with z in the formula above and replace the one dimensional mandelbrot formula with the 2d formula and rotate by 45°.