Logo by kr0mat1k - 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: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. March 28, 2024, 04:30:48 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 ... 3 4 [5] 6 7 8   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: Custom formulas & transforms - WIP & discuss  (Read 16316 times)
0 Members and 1 Guest are viewing this topic.
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #60 on: February 19, 2011, 01:31:22 PM »

Added several transforms for attractor type fractals. They are very interesting I think. grin
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #61 on: February 19, 2011, 01:33:34 PM »

And most of all;

THANK YOU JESSE FOR RELEASING NEW VERSION OF MB3D!!!
Logged

No sweat, guardian of wisdom!
lenord
Fractal Bachius
*
Posts: 611


No Matter where you go there you are


« Reply #62 on: February 19, 2011, 04:46:07 PM »

I give up, spend more time trying to stay current with these than using them huh?
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #63 on: February 19, 2011, 07:39:50 PM »

I give up, spend more time trying to stay current with these than using them huh?

I know they are many, and it takes a long time to try em all! grin It will take some months to see best results from this huge formula sets I think! undecided
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #64 on: February 27, 2011, 10:19:39 AM »

I was uncertain if release this formula. It is very slow, and it is unstable. Why "unstable"?
Because it's very sensible to bailout, that has to be very small (4 or something near - and if you hybridate it with other formulas the setting is automatically changed each time and you must set it again and again!), and only some values of seed give a good 3D effect, and it's enough hard to find them. undecided

So I release it as UNTESTED; I invite Jesse to NOT include it in the official database cheesy wink wink but it will remain a present for the "fractal scientists". grin


* NeonDes4D.m3f (2.11 KB - downloaded 157 times.)
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #65 on: February 27, 2011, 06:32:48 PM »



_Sin4Dplus released.

Detail of a _flipxy, _sin4D, CommQuat sequence.

This version of sin() formula is different from UF sin, but I don't know why since should be the same (in slices z=0) huh? cheesy
Logged

No sweat, guardian of wisdom!
Kali
Fractal Supremo
*****
Posts: 1138


« Reply #66 on: March 04, 2011, 12:14:33 AM »

Hey Luca, I'm very impressed with the work you are doing!

See if you can improve this formula or make something more interesting with it, if you have the time.
Is the linear combination of orthogonal mandelbrots I told you about in another thread, remember?


* KaliLinCombSSE2sm.m3f (0.77 KB - downloaded 136 times.)
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #67 on: March 04, 2011, 10:01:40 AM »

Hey Luca, I'm very impressed with the work you are doing!

See if you can improve this formula or make something more interesting with it, if you have the time.
Is the linear combination of orthogonal mandelbrots I told you about in another thread, remember?

It's very hard to modify a premade formula, and impossible without knowing what is the original formula... In other words most likely I would have to rewrite it sad no time for this sorry... Try to combine it with my functions; it should give great results. Azn
Logged

No sweat, guardian of wisdom!
ericr
Fractal Fanatic
****
Posts: 318


« Reply #68 on: March 04, 2011, 10:09:07 AM »

if you can  do the linear combination ( and i know you have done cos4D ans sin4D)
So you can do formula like f(x)=aOcos(x)+bosin(x)+a1sin(2x)+b1cos(2x)+    +ansin(nx)+bncos(nx)
the fourier seria and so all function you want (the user must calcul the coef )
in Chao pro it is done but in C , but its ok in H in the matrix etc
for the convegence it s ok (Hilbert prouve it in L2  and Cesaro in L1)

tank you
ERIC
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #69 on: March 04, 2011, 12:21:22 PM »

if you can  do the linear combination ( and i know you have done cos4D ans sin4D)
So you can do formula like f(x)=aOcos(x)+bosin(x)+a1sin(2x)+b1cos(2x)+    +ansin(nx)+bncos(nx)
the fourier seria and so all function you want (the user must calcul the coef )
in Chao pro it is done but in C , but its ok in H in the matrix etc
for the convegence it s ok (Hilbert prouve it in L2  and Cesaro in L1)

tank you
ERIC

Too complicated to do this with 4D coeffs, with my knowledge for now. wink

Moreover, this function will be that much slow ...  undecided
« Last Edit: March 04, 2011, 01:20:05 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #70 on: March 04, 2011, 01:16:31 PM »

I am reading something about Legendre poly;




...

<- not bad. cheesy

Apparently it's easy as drink water to write this formula with 4D coeffs but wait!!!! To calculate x^n if x is a quat I need to make a bunch of computations. In general I can do integer powers as xn = x*x(n-1). This is already enough hard to codify. If I do mistakes coding a loop, the formula makes an infinite loop! shocked After all, normally I directly save it back in x. But in this case I can't because I need to keep x for the next x power. In poor words, I need to use the stack, and I am not able to do so for now. Wait ... wink
« Last Edit: March 04, 2011, 01:23:05 PM by DarkBeam » Logged

No sweat, guardian of wisdom!
ericr
Fractal Fanatic
****
Posts: 318


« Reply #71 on: March 04, 2011, 02:01:31 PM »

md-fourier-ea {
// Michèle Dessureault, sept 2000
//
// - D'après les pages 474ss des Standard Mathematical Tables
// 22ème édition
// - From the Standard Mathematical Tables, 22nd edition, pp474
// and following
//
// 4 premiers termes de l'équation générale des séries de Fourier:
// 4 first terms of Fourier Series general equation:
// a0/2 + a1*cos(pi*#z/L)+ b1*sin(#pi*#z/L) +
//        a2*cos(2*pi*#z/L)+ b2*sin(2*#pi*#z/L) +
//        a3*cos(3*pi*#z/L)+ b3*sin(3*#pi*#z/L) +
//        a4*cos(4*pi*#z/L)+ b4*sin(4*#pi*#z/L)
//
complex Var_x,Var_y;
int temp1;
complex temp2;
double signe;
complex temp3;
complex w;
bool est_pair;
int iter;
double phi;
double path,diff;
complex oldz;
double bailtest;
double bi;
parameter complex bornes;
double bs;
parameter double a0,a1;
parameter double l;
parameter double b1,a2,b2,a3,b3,a4,b4;
parameter complex offset;
parameter int coord;
complex rho;
complex theta;
parameter int barn;
parameter double barn_offset;
parameter int pairimp;
parameter bool sgn;
parameter int intf,test;
parameter double bailout;

   void init(void)
   {
      z=pixel;
      Var_x=(0.0,0.0);
      Var_y=(0.0,0.0);
      temp1= 0;
      temp2= (0.0,0.0);
      signe= 1.0;
      temp3= (0.0,0.0);
      w= (0.0,0.0);
      est_pair= true;
      iter= 0;
      phi= 0.0;
      path= 0.0;
      diff= 0.0;
      oldz= z;
      bailtest= 0.0;
      bi= real(bornes);
      bs= imag(bornes);
   }
   void loop(void)
   { 
      w= a0/2 + a1*cos(pi*z/l)+ b1*sin(pi*z/l);
      w= w+a2*cos(2*pi*z/l)+ b2*sin(2*pi*z/l);
      w= w+a3*cos(3*pi*z/l)+ b3*sin(3*pi*z/l);
      w= w+a4*cos(4*pi*z/l)+ b4*sin(4*pi*z/l) + offset;
      Var_x=real(w);
      Var_y=imag(w);
      if  (coord== 1)
      {
         rho= sqrt(sqr(Var_x)+sqr(Var_y));
         theta= atan2(Var_y/Var_x);
         if  (theta< 0)
         {
            theta= theta+ 2 * pi;
         }
         Var_x= rho;
         Var_y= theta;
      }
      else if  (coord==2)
      {
         rho= sqrt(sqr(Var_x)+sqr(Var_y));
         Var_x= rho* cosh(real(z));
         Var_y= rho* sinh(imag(z));
      }
      z= fnx(Var_x) + fny(Var_y* 1i);
      iter=iter+ 1;
      path= path+ cabs(z);
      phi= atan2(z);
      phi= phi/pi;
      if  (phi< 0.0)
      {
         phi= phi+ 2.0;
      }
      if  ((barn== 1 && real(z) >= barn_offset) || (barn== 2 && imag(z) >= barn_offset) || (barn== 3 && (real(z) * imag(z)) >= barn_offset) || (barn== 4 && (real(z) + imag(z)) >= barn_offset) || (barn== 5 && diff>= barn_offset) || (barn== 6 && phi>= barn_offset) || (barn== 7 && cabs(z) >= barn_offset) || (barn== 8 && path>= barn_offset) || (barn== 9 && iter>= barn_offset))
      {
         z= fnb(z);
      }
      if  (pairimp> 0)
      {
         if  (pairimp== 1)
         {
            temp2= real(z);
         }
         else if  (pairimp== 2)
         {
            temp2= imag(z);
         }
         else if  (pairimp== 3)
         {
            temp2= real(z) * imag(z);
         }
         else if  (pairimp== 4)
         {
            temp2= real(z) + imag(z);
         }
         else if  (pairimp== 5)
         {
            temp2= diff;
         }
         else if  (pairimp== 6)
         {
            temp2= phi;
         }
         else if  (pairimp== 7)
         {
            temp2= cabs(z);
         }
         else if  (pairimp== cool
         {
            temp2= path;
         }
         else if  (pairimp== 9)
         {
            temp2= iter;
         }
         if  (sgn== true)
         {
            temp3= real(z) * imag(z);
            if  (temp3< 0)
            {
               signe= -1.0;
            }
         }
         if  (intf== 0)
         {
            temp1= ceil(signe*cabs(temp2));
         }
         else if  (intf== 1)
         {
            temp1= floor(signe*cabs(temp2));
         }
         else if  (intf== 2)
         {
            temp1= trunc(signe*cabs(temp2));
         }
         else if  (intf== 3)
         {
            temp1= round(signe*cabs(temp2));
         }
         if  (temp1% 2 == 0)
         {
            est_pair= true;
         }
         else
         {

            est_pair= false;
         } 
         if  (est_pair)
         {
            z= fnpi(z);
         }
      }
      diff= cabs(z-oldz);
      oldz= z;
      Var_x= real(z);
      Var_y= imag(z);
      if  (!((bi==0)&&(bs==0)))
      {
         if  (((((Var_x-Var_y)>bi) && ((Var_x-Var_y)<bs)) || (((Var_x+Var_y)>bi) && ((Var_x+Var_y)<bs))))
         {
            z=1E6;  //forces escape
         }
      }
      if  (test== 0)
      {
         bailtest= |z|;
      }
      else if  (test== 1)
      {
         bailtest= sqr(real(z));
      }
      else if  (test== 2)
      {
         bailtest= sqr(imag(z));
      }
      else if  (test== 5)
      {
         bailtest= sqr(abs(real(z)) + abs(imag(z)));
      }
      else if  (test== 6)
      {
         bailtest= sqr(real(z) + imag(z));
      }
      else if  (test== 7)
      {
         bailtest= |z|+iter^2;
      }
      else if  (test== cool
      {
         bailtest= |z|+phi^2;
      }
      else if  (test== 9)
      {
         bailtest= |z|+path^2;
      }
      else if  (test== 10)
      {
         bailtest= |z|+diff^2;
      }
      else if  (test== 11)
      {
         bailtest= sqr(abs(real(z))- abs(imag(z)));
      }
      else if  (test== 12)
      {
         bailtest= sqr(abs(real(z))* abs(imag(z)));
      }
      else if  (test== 13)
      {
         bailtest= sqr(abs(real(z))/ abs(imag(z)));
      }
      else if  (test== 14)
      {
         bailtest= sqr(abs(real(z))^ abs(imag(z)));
      }
      else if  (test== 15)
      {
         bailtest= sqr(abs(imag(z))^ abs(real(z)));
      }
   }
   bool bailout(void)
   {
      return((test== 3 && fnbl(sqr(real(z))) <= bailout&& fnbl(sqr(imag(z))) < bailout) ||   (test== 4 && (fnbl(sqr(real(z))) <= bailout|| fnbl(sqr(imag(z))) < bailout)) || (test< 3 || test>4) && fnbl(bailtest) <= bailout);
   }
   void description(void)
   {
      this.title="Fourier";
      this.method = "multipass";
      this.periodicity = 0;
      this.magn = 2;
      this.helpfile="mde-help\mde-fourier-ufm.htm";
 
      a0.caption = "A0";
      a0.default =  1.0;
 
      a1.caption = "A1";
      a1.default =  1.0;
 
      b1.caption = "B1";
      b1.default =  0.0;
 
      a2.caption = "A2";
      a2.default =  1.0;
 
      b2.caption = "B2";
      b2.default =  0.0;
 
      a3.caption = "A3";
      a3.default =  1.0;
 
      b3.caption = "B3";
      b3.default =  0.0;
 
      a4.caption = "A4";
      a4.default =  1.0;
 
      b4.caption = "B4";
      b4.default =  0.0;
 
      l.caption = "Wavelength";
      l.default =  1.0;
 
      offset.caption = "Offset";
      offset.default =  (0.0,0.0);
 
      coord.caption = "Coordinates";
      coord.enum="Cartesian\nPolar\nHyperbolic";
      coord.default =  0;
 
      barn.caption = "Barnsley type";
      barn.enum = "none\nreal\nimag\nreal*imag\nreal+imag\ndiff\nangle\nmagnitude\npath\niteration";
 
      barn_offset.caption = "Barnsley Offset";
      barn_offset.default =  0.0;
 
      pairimp.caption = "Odd-Even type";
      pairimp.enum = "none\nreal\nimag\nreal*imag\nreal+imag\ndiff\nangle\nmagnitude\npath\niteration";
 
      intf.caption = "Odd-Even factor";
      intf.enum = "ceil\nfloor\ntrunc\nround";
 
      sgn.caption = "Apply Odd-even Sign?";
      sgn.default =  false;
 
      bornes.caption ="Escape Range";
      bornes.default =  (0.0,0.0);
 
      bailout.caption = "Bailout Value";
      bailout.default =  4.0;
      bailout.min = 1.0;
 
      test.caption = "Bailout Test";
      test.enum = "mod\nreal\nimag\nor\nand\nmanh\nmanr\niter\nangle\npath\ndiff\nminus\nproduct\ndivision\nreal^imag\nimag^real";
      test.hint = "This gives a choice of test conditions for bailing out";
 
      fnx.caption = "Apply F(x)";
      fnx.default = "ident" ;
 
      fny.caption = "Apply F(y)";
      fny.default = "ident" ;
 
      fnb.caption = "Barnsley Function";
      fnb.default = "flip" ;
 
      fnpi.caption = "Odd-even Function";
      fnpi.default = "flip" ;
 
      fnbl.caption = "Bailout Function";
      fnbl.default = "ident" ;
      fnbl.hint = "To choose some function for further bailout tests";
   }
}
thas is the code from Chaos pro witch make the Fourier
I hope it help
ERIC
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #72 on: March 04, 2011, 06:06:10 PM »

You have not understood what I mean!

Yes, with an interface that compute sine of complex (or hypercomplex) numbers and wraps the addition and the "dirty stuff", it is easy (well... not that easy);

      w= a0/2 + a1*cos(pi*z/l)+ b1*sin(pi*z/l);
      w= w+a2*cos(2*pi*z/l)+ b2*sin(2*pi*z/l);
      w= w+a3*cos(3*pi*z/l)+ b3*sin(3*pi*z/l);
      w= w+a4*cos(4*pi*z/l)+ b4*sin(4*pi*z/l) + offset;
      Var_x=real(w);
      Var_y=imag(w);

See that "real"? I can't just use "real" grin beacuse I only can access to every numeric component of complex (or hypercomplex) numbers. And for me every sin() means many rows of code, plus I need to preserve "z" - this means using the stack...

In other words; difficult.

For this motivation I will not translate it; too many functions at the same time = too much code to write = too much pain! angry Using simple functions is faster, and easier for me and everybody. wink
Logged

No sweat, guardian of wisdom!
Kali
Fractal Supremo
*****
Posts: 1138


« Reply #73 on: March 04, 2011, 07:47:00 PM »

But... we are going to pay you a lot of money!

didn't we mention it?

cheesy

Logged

kram1032
Fractal Senior
******
Posts: 1863


« Reply #74 on: March 05, 2011, 01:39:55 AM »

DarkBeam, you asked for inverse toric coordinates?

Well, I asked WA in case of the "flat" torus, which is a 4D object.
http://www.wolframalpha.com/input/?i=solve+{w%2cx%2cy%2cz}%3d{r*cos%28u%29%2cr*sin%28u%29%2cp*cos%28v%29%2cp*sin%28v%29}+for+{r%2cu%2cp%2cv}&incParTime=true

If you use the same approach for a "3D" torus, e.g. a doughnut-surface, you should easily get the corresponding results from WA that way as well smiley
Logged
Pages: 1 ... 3 4 [5] 6 7 8   Go Down
  Print  
 
Jump to:  


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.2 seconds with 25 queries. (Pretty URLs adds 0.012s, 2q)