Welcome to Fractal Forums

Fractal Software => Mandelbulb 3d => Topic started by: DarkBeam on February 05, 2011, 07:04:14 PM




Title: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 05, 2011, 07:04:14 PM
Hi all. I have looked at the formulas of MB3D, and I have "studied" the simplest ones. So I understood the basic "constants" and I was able to write some custom transforms :angel1: :angel1: :angel1:

I opened this thread to ask Jesse the permission to share the formulas with everybody. Please give it to me...  :'(

(And I will be happy to know some more details to write other transforms please :dink:)

Luca.  :D


Title: Re: Asking permission.
Post by: DarkBeam on February 05, 2011, 07:15:49 PM
Here is an example; Integer Power before and after an "Inverse cylindrical" transform.  ;D


Title: Re: Asking permission.
Post by: Jesse on February 05, 2011, 11:20:39 PM
Already answered your private message, of course you can publish selfmade formulas, thats great!

Here are some additional infos that may help a bit:

Code:
  TIteration3Dext = packed record
    J4,Rold,RStopD,x,y,z,w: Double;   // use with neg indizes before C1
    C1, C2, C3: Double;     //  
    J1, J2, J3: Double;     //+24   these are the constants for adding. (x0, y0, z0) or (Cx, Cy, Cz).  w0 is J4 (-56)
    PVar:       Pointer;    //+48   the actual formulas adress of constants and vars
    SmoothItD:  Single;     //+52
    Rout:       Double;     //+56   the square of the vector length, can be used as input
    ItResultI:  Integer;    //+64
    maxIt:      Integer;    //+68
    RStop:      Single;     //+72
    nHybrid:    array[0..5] of Integer;  //+76 Hybrid counts or single weights in interpolhybrid
    fHPVar:     array[0..5] of Pointer;  //+100 pointer to constants+vars, PVars-8=0.5, dOption values below -8
    fHybrid:    array[0..5] of ThybridIteration2; //+124   adresses of formulas
    CalcSIT:    LongBool;   //+148
    DoJulia:    LongBool;   //+152
    LNRStop:    Single;     //+156
    DEoption:   Integer;    //+160
    fHln:       array[0..5] of Single;  //+164  for SmoothIts
    iRepeatFrom: Integer;   //+188
    OTrap:      Double;     //+192
    VaryScale:  Double;     //+200    to use in vary by its
    bFirstIt:   Integer;    //+208    used also as iteration count, is set to 0 on it-start
    bTmp:       Integer;    //+212    tmpBuf, free of use.
    Dfree1:     Double;     //+216
    Dfree2:     Double;     //+224
    Deriv1:     Double;     //+232    for 4D first deriv or as full derivs
    Deriv2:     Double;     //+240
    Deriv3:     Double;     //+248
    SMatrix4:   TSMatrix4;  //+256
  end;

x,y,z,w is also [eax],[edx],[ecx],[ecx+8]

A common outline of a formula:

    push  ebp
    mov   ebp, esp
    push  esi
    push  edi
    mov   esi, [ebp + 8]    //PIteration3D = @TIteration3Dext.C1  
    mov   edi, [esi + 48]   //PAligned16, constants with index 0 and increasing, -8 is always double=0.5, user variables are below -8
  //  fld   qword [ecx + 8]
    fld   qword [ecx]
    fld   qword [edx]
    fld   qword [eax]        //x,y,z(,w)
...
    fadd  qword [esi + 24]  // add Cx
    fstp  qword [eax]
    fadd  qword [esi + 32]  // add Cy
    fstp  qword [edx]
    fadd  qword [esi + 40]  // add Cz
    fstp  qword [ecx]
 //   fadd  qword [esi - 56]  // add Cw
 //   fstp  qword [ecx + 8]
    pop   edi
    pop   esi
    pop   ebp
    ret   $0008

Here is the struct for C programmers and some additional infos from marius,
and the common variables are named like they are used in the formula descriptions:

Code:
__attribute__((packed)) struct TIteration3Dext {
double Cw,Rold,RStopD,x,y,z,w; // use with neg indizes before C1. w is also used for 3d ifs and abox analytic DE
double Px, Py, Pz;             //      actual position, never change these!  Can be used as input.
double Cx, Cy, Cz;             //+24   these are the constants for adding. Pxyz or the julia seed.  Cw is @-56 (begin of struct)
void*  PVar;                   //+48   the actual formulas adress of constants and vars, constants at offset 0 increasing, user vars below -8
float  SmoothItD;              //+52
double Rout;                   //+56   the square of the vector length, can be used as input
int    ItResultI;              //+64
int    maxIt;                  //+68
float  RStop;                  //+72
int    nHybrid[6];             //+76   all formulas iteration counts or single weights in interpol-hybrid
void*  fHPVar[6];              //+100  all formulas pointer to constants+vars, PVars-8=0.5, use PVar for the actual formula
void*  fHybrid[6];             //+124  the formulas adresses
int    CalcSIT;                //+148
int    DoJulia;                //+152
float  LNRStop;                //+156
int    DEoption;               //+160
float  fHln[6];                //+164  for SmoothIts
int    iRepeatFrom;            //+188
double OTrap;                  //+192
double VaryScale;              //+200  to use in vary by its
int    bFirstIt;               //+208  used also as iteration count, is set to 0 on it-start
int    bTmp;                   //+212  tmpBuf, free of use.
double Dfree1;                 //+216
double Dfree2;                 //+224
double Deriv1;                 //+232  for 4D first deriv or as full derivs
double Deriv2;                 //+240
double Deriv3;                 //+248
float  SMatrix4[4][4];         //+256  for 4d rotation, used like most other values only by the programs iteration loop procedure
};

// fastcall is not quite delphi fastcall.
// first two args are ok, third is in ecx in delphi, on stack here.
void __attribute__((fastcall)) formula(
             double* x,      // [eax]
             double* y,      // [edx]
             double* arg,    // [ebp+8], points to TIteration3Dext.C1
             void* dummy     // so we end w/ ret 8 as delphi expects
             ) {
  // Compute ptr to proper start of TIteration3Dext struct.
  struct TIteration3Dext* cfg = (struct TIteration3Dext*)(arg-7);

  // Read / write some fields as demonstration.. not a real formula ;-)
  double r = cfg->x + cfg->y - cfg->z * cfg->w;
  cfg->Deriv1 = r;
}

compile with 'gcc -c -Os -m32'.

Objdump -D can be used to show the generated code.

Be aware to not use absolute addresses or compiler generated callings to functions that don't exists in m3d.


Title: Re: Asking permission.
Post by: DarkBeam on February 06, 2011, 10:38:43 AM
 O0 Wow very cool... I am still trying to optimize formulas at my best, it is hard to do, I hope to be done soon :evil1:


Title: Re: Asking permission.
Post by: cKleinhuis on February 06, 2011, 11:08:36 AM
crazy stuff, hand coded assembla formulas!


Title: Re: Asking permission.
Post by: David Makin on February 06, 2011, 01:06:01 PM
crazy stuff, hand coded assembla formulas!

I beg to differ, as far as CPU/FPU code goes then writing the guts of fractal code in any higher language is completely nuts if you are capable of writing it in native code and have the facility to do so - in the past you would get a absolute minimum 10 to 20 times speed up as compared to even an optimising compiler and even now you'll get a 2 to 5 times speed increase (that's assuming you know what you're doing with respect to pipelines, caching, free cycles and stalling etc.).
Of course GPU code is a slightly different matter !


Title: Re: Asking permission.
Post by: DarkBeam on February 06, 2011, 01:47:19 PM
Please please try those. :embarrass:

Those are simple "basic" transforms, unoptimized for now (optimize machine code is expert stuff! :hurt: )
There is a "gnarl2D" transform that is very slow and don't work well with all formulas, but somebody can suggest me how to fix... :D


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 06, 2011, 05:45:26 PM
A quick set of log type transforms, thanks to this site; http://webster.cs.ucr.edu/AoA/Windows/HTML/RealArithmetica2.html

A quick test;

Mandelbulb3Dv16{
M.....S....O/...w....2.....ZGT/tvZ1wz8GogQwZYr1EceXg9OUXbwX.bczPYdIwzuYOfjjr.nzD
................................NjiugQrlqz1........Y./..................y.2.....
................/ME//....6kq2...b/....E2.....M6N4krMKaqD/..........c./...wX....E
./kX0LDD..../..........wz.............................................sD...../..
.w1...sDJUCstBaZdx1..........U52is.3qHdjuA80MK.dBu107jAY7VVMzc5F6Y4LL6qDWeqgXcMd
BuHA4ncOQRVMzmqA5xMGM6qD......oA......................sD..kz0...................
.............................UJRR4.uppN.sNLb/UkRR4.arpN.cULb/U9SR4..............
...........................U..6.P....M4...EB....W....61....F....8/...I1....UJl12
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6...../....I....6....kL/pKMuZaPb7oPs/UFH/........................k/..U/4MU/
4M.................0./........yDOaNaNaNa7z1.....................................
................................................................................
.....................2.....3.........w3HjRaK....................................
..............................0E................................................
................................................................................
................................}

 ;D ;D ;D


Title: Re: MB3D custom tranforms & formulas
Post by: bib on February 06, 2011, 05:57:57 PM
Welcome to FF Luca ;)


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 06, 2011, 06:08:52 PM
Welcome to FF Luca ;)
:embarrass: Thanks a lot... I am a little devil :angel1:


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 06, 2011, 06:28:09 PM
 :D Fantastic!!! This is a 3D gnarl!!! Simply used a 2D gnarl transform (alone) plus a flipxz... Check by yourself!!!

Mandelbulb3Dv16{
M....kf....j0...w....2...............1.......s1E................................
................................vFVf53iSoy1........A./..................y.2.....
................/ME//....6U6....N7....E2......Pht/mw1CuD/..........c./...w1.....
./UaNadD..../..........wz.............................................sD...../..
.w1...sDYsAIxzzzjz1..........WAbUdisqcljTcFzUvMS3t97C1JzzzzvzUNehUisqcljMaO9c9iB
Ow1mQ0auWPX4zU2bVezzzzyD......2F......................sD..kz0...................
.............................UJRR4.uppN.sNLb/UkRR4.arpN.cULb/U9SR4..............
...........................U..6.P....M4...EB....W....61....F....8/...I1....UJl12
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6....E.....I....I....kLbtKMmlaA2/..rJaQ................................A...
...................wzcNaNaNaNavDOaNaNaNaty1........0./.........E................
................................................................................
.....................2.....3.........wZFgZ4QMd3.mZqMVl4.g/......................
4MU/.........................E1E..................cJ.1.......U.E..........2.....
................................................................................
................................}

 :o

But it seems more a vine one :)

This example uses 4D rotation


Mandelbulb3Dv16{
M....kf....j0...w....2....UbODfMigY6.ve2auAOOP1ErqG5MJj0vzv7E9KNNph1.lHhbJALKm/k
................................vFVf53iSoy1........A./..................y.2.....
................/ME//....6EW....76....E2......Pht/mw1CuD/..........c./...w1/....
./kX0LDD..../..........wz.............................................sD...../..
.w1...sD/Zh4j8Hcaz1.UqeAEZc2zYonlUV0UOyDAuRcysmzTzfkaqEWp.etzC8.SBGz..yDTfHoBtmz
TznktH0E52etzOJrpmFezzxj......YO......................sD..kz0...................
.............................UJRR4.uppN.sNLb/UkRR4.arpN.cULb/U9SR4..............
...........................U..6.P....M4...EB....W....61....F....8/...I1....UJl12
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....A....E.....I....I....kLbtKMmlaA2/..rJaQ................................A...
...................wzcNaNaNaNavDOaNaNaNaty1........0./.........E................
................................................................................
.....................2.....3.........wZFgZ4QMd3.NxaP7FrQ........................
.MU/.........................E1E..................cJ.1.......U.E..........2.....
................................................................................
................................/....E/...U/....T7pPo34RZF1N..kN.wqR............
...........1Ak.1Ak........................................................2.....
...../.........E................................................................
............................................}

EDIT CHECK OUT CORRECTED GNARL2D POST DOWN


Title: Re: MB3D custom tranforms & formulas
Post by: n8iveattitude1 on February 06, 2011, 08:48:35 PM
i tried ABsY and gnarl2d ;)

Mandelbulb3Dv16{
M.....S...kX/...61.........X7wC3HGrezcdazGQmXV/E3d0z0WBvxy1XF.r9vzetzctSaA0yk3xD
................................TJYt2GuDl.2........Y./..................y.2.....
................/M.//....6ED/...H1....E......Mb52a7KZ1nD/..........c./...w1.BnAH
z.....kD..../2UaNaNaNaNiz.............................................sD...../..
.w1...sDi.J5EODtbwHdCg/XqHy7zqnDEV/f3d7jJmc6xj9tUwncfUzzvGC6z27.5xzoZTmjpi8NhITt
Uwn0Zd1ApLC6zolqgHF4YTmD......Y3......................sD.2kz0...................
.............................UJRd..upZ0.sNL8.UkRd..arZ0.cUL8.U9Sd...............
................a..........U..6.k....E4....C....J0...c1...k1....S....Aoz..EpIF1A
...U.WLS1KoiuKABHWMSbY9hc06.2cE.8LQj.MxuvBTuCfuDUYwlbsII5.AEJzHmWnv4.1EBI.UVcp2.
.....................EWfzHx6d2yD2I13.YrVp0.e/0biMaOyzcisP8OPAXzD.ezYfTLkRzH.Gc..
mcV0.MxuvBTuCfujKjySnbiney9..........EUA8ojH9l3.c.LWmfeBhzfVVmlUaotzzuCDd58g6zzD
Y6W0xvoGQ/kCaWctpJKwzW35PpHERyzjPD7Kl3Dkzz1..UeX80ksQjB.Sm.V8K7.eWel.kK4TRY9.29d
D0U3aEede0.cU08.UnHVyV5.Ma8e.6cHT/o6..8cU0.AWFvcD0kYJu8.daKQmh5.U08c.sFQ9q6Z.EtY
i0UXsFtXy/EsV5C....cU08.zz/cU08.yz1cU08.xz3cU08.................................
E....A....E/....I....c....kIdJaQkZaPnhKOn.UQ..............................U/4MU/
4M...................pAnAnAnAnyD........kz1........wz...........................
................................................................................
.....................2.....3.........wJEWBLK.UKNmZqMVl4.g/......................
6....MU/4MU/4................E0k........Y.2........3./..........................
................................................................................
................................/....E/...E/....TRaPV75PmE2.gFKOiRKA............
.................MU/4MU/........nAnAnAnAHzXaNaNaNaNizcNaNaNaNavD........E.2.....
...2./..........................................................................
............................................}


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 06, 2011, 09:42:39 PM
Images please... ;D

Stay tuned I am trying to optimize toSpherical and I need some help :)


Title: Re: MB3D custom tranforms & formulas
Post by: Madman on February 06, 2011, 10:30:47 PM
Nice additions, Darkbeam. This is a picture using your AbsX and invcylindrical

(http://nocache-nocookies.digitalgott.com/gallery/5/3195_06_02_11_10_24_54.jpeg)


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 06, 2011, 11:40:07 PM
Oh no sorry sorry! I mistaken in coding Gnarl2D, the last opcode is wrong. This is the correct version (that works perfectly as is as a standalone formula. Previous one was buggy!)

Code:
[OPTIONS]
.Version = 2
.DEoption = -1
.Double Strength = 1.03
.Double X step = 0.1
.Double Y step = 0.1
.Double Alpha = 3.0
.Double Beta = 2.0

[CODE]
558BEC568B75088B7630DD02DD46D0DEC9D9FEDD02DEC1DD46D8DEC9D9FEDD02
DEC1D9FEDD46E8DEC9D9E0DD00DEC1DD46F0DEC9DD00DD46D0DEC9D9FEDD00DE
C1DD46D8DEC9D9FEDD00DEC1D9FEDD46E0DEC9D9E0DD02DEC1DD46F0DEC9DD1A
DD185E5DC20800
[END]


Description:

Gnarl deformation in 2D (from Mark Townsend) - variation with step X & Y
Gnarl formula gives strange "smoke-like" shapes.
Formula by Luca GN 2011
TIPS
The formula works with all formulas including IFS ones and can be used alone
Handle with care. This transform uses massively sin - it is slow and may be fuzzy
Big values for alpha and beta perturb even more. Be very careful with the strength...

x' = (x - stepX sin(y + sin( a (y + sin (b y )))) * Strength
y' = (y - stepY sin(x + sin( a (x + sin (b x )))) * Strength
z unchanged
[/code]


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 06, 2011, 11:48:49 PM
Nice additions, Darkbeam. This is a picture using your AbsX and invcylindrical

(http://nocache-nocookies.digitalgott.com/gallery/5/3195_06_02_11_10_24_54.jpeg)

Most excellent, a pity that Gnarl2D was wrongly coded :embarrass:


Title: Re: MB3D custom tranforms & formulas
Post by: bib on February 06, 2011, 11:54:11 PM
Thanks a lot Luca for all these formulas. These are very nice additions. I like the coordinates system inversion. Some more infinite exploration to come!!


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 07, 2011, 12:18:03 AM
You are very kind my friend. I wanted to write a point inversion but I don't know how to write the formula, in 2d it is easy...
x'=x/(x^2+y^2) and y'=y/(...)
this is cylindrical inversion but what about spherical inversion? :)


Title: Re: MB3D custom tranforms & formulas
Post by: blob on February 07, 2011, 12:21:14 AM
Images please... ;D

Amazing Box with AbsZ:


Title: Re: MB3D custom tranforms & formulas
Post by: KRAFTWERK on February 07, 2011, 09:54:37 AM
Oh no! More formulas!  O0

Cool Luca, will try these out!


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 07, 2011, 12:33:40 PM
I have looked at log, abs type formulas; they was too "basic" and needed some enhancement :dink:

Also, I made a gnarl3D formula :D
I consider those formulas "final" - they don't need any further adjustment or fix. I am going to post final formulas in a separate topic. Now I will open it! :embarrass:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on February 07, 2011, 06:18:13 PM
Basic transforms are a good idea, because it might be a way for generating more user wanted shapes...

I thought it would be good to have a 'SquaringR' formula (generating a sphere) for this reason to have a better bailout condition.

I attached it with a sample parameter file (using also the _invcylindrical formula), first some transformations and then bailing out with squaringR by selecting 'repeat from' on this last formula.
Should result in the 'SqrRtest.jpg' image.

I also included a formula i tried some time ago, wasn't shure to post it but with the new formula selections and maybe more selections in the future (i think i have to add some...  :-\) this might be ok...


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 07, 2011, 10:15:57 PM
Oh my! Really striking job :D
Jesse some of your formulas limit user choice (example n power must be between 2 and 9) how can it be done? :) and thanks for the help in private issues  :-*


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: cKleinhuis on February 08, 2011, 12:09:37 AM
in my eyes a break down to simple formulas would be great, e.g. a "exponentiation" and an "adding" function applied alternatively would generate the standard mandelbulb ;)
your program already features (a limited amount of) alternation, so, new formulas can be created easily

although an object approach like it is done in ultrafractal would be more likely but a little harder to implement with current set up,
so that even the mandelbox can be "clicked" together, like you would need an IFGREATERTHEN formulaA ELSE formulaB, function, so, a formula should
be able to have another formula as parameter ;)

i know this is going crazy, but this would make constructing of formulas possible with no actually understanding of what is going on



Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 08, 2011, 08:48:54 AM
I wanted to do a 3D Barnsley. But I still have problems with the "jge" that wants an absolute address value and not an offset. Suggestions? :-\


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 08, 2011, 09:24:56 AM
Oh my... Using Jesse's new formula I produced a 2D "extruded" gnarl. Too bad it's immensely slow to calculate and fuzzy :'(

Mandelbulb3Dv16{
M....kG....9/...w....2....Ukm2.V4/...jOqzxmxzr1E1Fx187ylmynSj2Vh8W3xzc5dim2.V4mj
................................OaNaNaNadz1........A./..................y.2.....
................/ME//....6Ed....07....E2.....kmEQgisq6sD/..........c./...w1.BnAH
y.....kD..../..........wz.............................................sD...../..
.wHnAnQDYsAIxzzzjz1..........WAbUdisqcljTcFzUvMS3t97C1JzzzzvzUNehUisqcljMaO9c9iB
Ow1mQ0auWPX4zU2bVezzzzyD......og......................sD..kz0...................
.............................UJRR4.uppN.sNLb/UkRR4.arpN.cULb/U9SR4..............
...........................U..6.P....M4...EB....W....61....F....8/...I1....UJl12
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....A....E.....I.........kLN/5PpBrIdtaK.IaQ.........................c..........
...................6./........zj................................................
................................................................................
.....................I.....3....3....wpNi3aQg71F.24PM/..........................
..............................zDOaNaNaNa7zXaNaNaNaNiz0.......U.E..........2.....
................................................................................
................................/....E/...E.....TBpMVlKOiR4.....................
................................BnAnAnAnoz1.....................................
................................................................................
............................................}

Edit. YAY!!! This is very better


Mandelbulb3Dv16{
M....kG....9/...w....2....U4oBdEu5n3.T.uIJ4xuV3Ev6MLU/JK0z9lA8YTE6duz2L1dwAFbm.E
................................fl59ou6tSz1........A./..................y.2.....
................/M.//....6.VA...J3....E2.....wTzVIP.kssD/..........c./...w1...UZ
1/kPGAcC..../..........wz.............................................sD...../..
.wn3r4BCIVPam4.ACy1..........KqVnM5muWfjZgNaipWEYr9Jsadg/.XXzAiRUE5muWfjVP56oVgi
sunN5CXR6f9iyMeQF.P.kssD......2W1.....................sD..kz0...................
.............................UJRR4.uppN.sNLb/UkRR4.arpN.cULb/U9SR4..............
...........................U..6.P....M4...EB....W....61....F....8/...I1....UJl12
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....A....E.....I.........kLN/5PpBrIdtaK.IaQ.........................c..........
...................6./........zj................................................
................................................................................
.....................I.....3....3....wpNi3aQg71F.24PM/..........................
..............................zDOaNaNaNa7zXaNaNaNaNiz0.......U.E..........2.....
................................................................................
................................/....E/...E.....TBpMVlKOiR4.....................
................................BnAnAnAnoz1.....................................
................................................................................
............................................}

 O0 O0 O0


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 08, 2011, 12:51:30 PM
 :-X Somebody twisted my Menger sponge... :'( Oh, sorry it is my new transform "Helispiral"! In "release" topic together with Sphere inversion. It took an age to write sphere inversion, whatever. :fiery: :fiery: :fiery:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 08, 2011, 03:54:56 PM
 :angry: Hmph!!! I am very sorry to beg you with that many messages. Too bad sphereinv was wrongly coded! I have now corrected it and added some (intentionally!) "wrong" formulas, that I called sphereXinv (and so on) to use as a replacement. Sorry again :sad1:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on February 08, 2011, 06:23:53 PM
I wanted to do a 3D Barnsley. But I still have problems with the "jge" that wants an absolute address value and not an offset. Suggestions? :-\

to my knowledge, and the IA-32 Intel® Architecture Software Developer’s Manual,
http://www.intel.com/products/processor/manuals/ (http://www.intel.com/products/processor/manuals/)

the conditional jumps are all relative with signed 8 or 32 bit offsets.

I am not sure if we should discuss assembler issues in here, you can always email me directly, that might also be faster for me to answer.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 08, 2011, 08:01:07 PM
I wanted to do a 3D Barnsley. But I still have problems with the "jge" that wants an absolute address value and not an offset. Suggestions? :-\

to my knowledge, and the IA-32 Intel® Architecture Software Developer’s Manual,
http://www.intel.com/products/processor/manuals/ (http://www.intel.com/products/processor/manuals/)

the conditional jumps are all relative with signed 8 or 32 bit offsets.

I am not sure if we should discuss assembler issues in here, you can always email me directly, that might also be faster for me to answer.

I have no hurry to read reply Jesse :) thanks I'll check again.

But a question; what is C? Cx, Cy, Cz... Sorry for the ignorance  :'(


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on February 08, 2011, 09:22:41 PM
But a question; what is C? Cx, Cy, Cz... Sorry for the ignorance  :'(

C1 to C3 are the actual position in raystepping, will be copied to x,y,z on iteration start and also to J1..J3 (the ones used as add component) if you don't calculate in julia mode.  In julia mode J1..J4 are the user specified values and not changed.
Also C1..C3 are not changed, else you get in trouble with raystepping and nearly all other functions  :dink:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: marius on February 09, 2011, 03:14:04 AM
I wanted to do a 3D Barnsley. But I still have problems with the "jge" that wants an absolute address value and not an offset. Suggestions? :-\

to my knowledge, and the IA-32 Intel® Architecture Software Developer’s Manual,
http://www.intel.com/products/processor/manuals/ (http://www.intel.com/products/processor/manuals/)

the conditional jumps are all relative with signed 8 or 32 bit offsets.

I am not sure if we should discuss assembler issues in here, you can always email me directly, that might also be faster for me to answer.

Wait..  :o the Mandelbulb3Dv16{..} descriptions actually contain raw code?!
You might want to look into http://code.google.com/p/nativeclient/ as containment option without too much overhead  :police:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 09, 2011, 08:45:12 AM
I wanted to do a 3D Barnsley. But I still have problems with the "jge" that wants an absolute address value and not an offset. Suggestions? :-\

to my knowledge, and the IA-32 Intel® Architecture Software Developer’s Manual,
http://www.intel.com/products/processor/manuals/ (http://www.intel.com/products/processor/manuals/)

the conditional jumps are all relative with signed 8 or 32 bit offsets.

I am not sure if we should discuss assembler issues in here, you can always email me directly, that might also be faster for me to answer.

Wait..  :o the Mandelbulb3Dv16{..} descriptions actually contain raw code?!
You might want to look into http://code.google.com/p/nativeclient/ as containment option without too much overhead  :police:

If it didn't contain raw code I would never be able to write custom formulas. Do you really want to deny to others the opportunity of helping Jesse? :hmh: :sad1:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: marius on February 09, 2011, 09:21:49 AM
Wait..  :o the Mandelbulb3Dv16{..} descriptions actually contain raw code?!
You might want to look into http://code.google.com/p/nativeclient/ as containment option without too much overhead  :police:

If it didn't contain raw code I would never be able to write custom formulas. Do you really want to deny to others the opportunity of helping Jesse? :hmh: :sad1:

No, not at all. Just suggesting perhaps some form of sand boxing of executable formula code would be prudent.

A scripting language could be safe but slow without compilation; native client tries to find a middle ground between native speeds yet offer sand boxing. Since the rendering formulas do not require any complicated input or output they are actually a perfect match for such an approach. And this still allows for anyone to contribute and mash-up efficient formula code.

You could see Mandelbulb3d as the analogue of a web browser, and formulas that of webpages.

I for one did not realize that cutting & pasting Mandelbulb3Dv16{..} amounted to running fresh raw binary. At some point, it becomes difficult to assess trustworthiness or origin of the formulas.

Then again, I'm a professional barely functional paranoid ;D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 09, 2011, 09:45:30 AM
Then again, I'm a professional barely functional paranoid ;D
:tease:  ;D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: hobold on February 09, 2011, 12:56:40 PM
Computer security is an illness that hits those hardest who do not suffer from it. :)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: David Makin on February 09, 2011, 05:38:58 PM
Computer security is an illness that hits those hardest who do not suffer from it. :)

Computer security is a problem that hits those hardest who use anything remotely related to Microsoft or Adobe (unless you consider the Commodore Amiga/Atari ST).


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 09, 2011, 05:40:17 PM
I was looking for some info on complex numbers and I found this article; http://en.wikipedia.org/wiki/Tricomplex_number
Considering the space as a vector field, we can compute the inverse of every point of the vector space and obtain an "inverse tricomplex field".  :o

It required a lot of tricks in coding but finally "tricomplex inversion" is here, I upped it in the release folder :D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: David Makin on February 09, 2011, 05:42:15 PM
I was looking for some info on complex numbers and I found this article; http://en.wikipedia.org/wiki/Tricomplex_number
Considering the space as a vector field, we can compute the inverse of every point of the vector space and obtain an "inverse tricomplex field".  :o

It required a lot of tricks in coding but finally "tricomplex inversion" is here, I upped it in the release folder :D

What do you do in the case of inversion of a non-zero value having no inverse ?


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 09, 2011, 05:55:18 PM
I was looking for some info on complex numbers and I found this article; http://en.wikipedia.org/wiki/Tricomplex_number
Considering the space as a vector field, we can compute the inverse of every point of the vector space and obtain an "inverse tricomplex field".  :o

It required a lot of tricks in coding but finally "tricomplex inversion" is here, I upped it in the release folder :D

What do you do in the case of inversion of a non-zero value having no inverse ?

Mandelbulb3D has a very solid engine; in case of floating point errors, it simply discards. So I skip completely checks... :) Jesse in his "_reciprocalX" formula does the same; simply computes the inverse without any check and it works. Probably he "turned off" fp errors. :)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on February 09, 2011, 11:03:34 PM
Wait..  :o the Mandelbulb3Dv16{..} descriptions actually contain raw code?!

No, this text contains only parameters like the formula names, and absolute no sourcecode or things that could do harm!

Only the *.m3f formula files are containing code that will be directly executed, so be very careful when downloading formula files.
Be sure that you can trust the author.



Title: Re: Custom formulas & transforms - WIP & discuss
Post by: hobold on February 09, 2011, 11:19:56 PM
Computer security is a problem that hits those hardest who use anything remotely related to Microsoft or Adobe (unless you consider the Commodore Amiga/Atari ST).
I was trying to coin a wittycism for the phenomenon that the only way to have a somewhat secure machine is to catch an unhealthy dose of paranoia. Choose your poison ...

Unfortunately, security and convenience are antagonists. When a computer system is very convenient for users, it probably is very convenient for malicious attackers as well. And conversely, when a computer system is solidly secured, the users will have to live with some inconveniences.

The market forces, which drive ever more powerful computers into the hands of more and more clueless users, do move computing hardware into a direction of ever more ease of use, ever more convenience. Smartphones are the currently latest example. These little devices know more sensitive data about their users (about their location and communication, for instance) than a typical desktop machine. But they are typically much less secure.

If you are truly paranoid, you do not have a smartphone. Information security is not a technical problem, and cannot be solved by mere technical measures. Security starts and ends with the behaviour of those who want to be secure.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: kon16ov on February 10, 2011, 04:22:23 AM
I'm fond of saying, "The key to keeping the secret is the keeping of the key."  Big fan of encryption...unless your hard drive goes bing and your encrypted partitions won't mount. That's a problem.

Anyhoo -- I think my only problem with the formulas is not knowing where to begin or how to go about the creation/editing of the beasties.  There's probably been umpteen discussions on this and I should probably go poke around a bit.  I will say that my assembler is REALLY rusty -- the last ML work I did was on the 68000...(someone mentioned the Amiga?  :))  I like the idea of "sandboxing" and such since I have, every so often, this itch to bandy about an odd formula or two and just see what it produces.

Ah, well.  For now, I am more than happy to poke, prod and jostle the formulas in place, currently.  It's all great stuff!


Title: Re: MB3D custom tranforms & formulas
Post by: lecristal on February 10, 2011, 09:10:30 AM
Welcome to FF Luca ;)
:embarrass: Thanks a lot... I am a little devil :angel1:

little devil???
is welcome as the


Title: Re: MB3D custom tranforms & formulas
Post by: DarkBeam on February 10, 2011, 10:30:42 AM
Welcome to FF Luca ;)
:embarrass: Thanks a lot... I am a little devil :angel1:

little devil???
is welcome as the

Thank you very much! Merci beaucoup  :embarrass: :dink: :dink: :dink:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 10, 2011, 12:53:22 PM
Need help; please go here http://www.fractalforums.com/new-theories-and-research/binary-box-tiling-(help-me!)/ :hmh:

ADDED Poincarè - now it is correct, previous version was wrong sorry. :angry:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 11, 2011, 11:57:53 AM
Added in final version spherical coord adjustment + an enhanced version of scaling that is useful for coordinate manipulation :angel1:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 11, 2011, 12:16:31 PM
A "Sierpinski mandala", obtained with an angle multiplication, very similar to KPK formulas in UF (but in 3D!!!). This is only a quick example tough! ;D

Mandelbulb3Dv16{
M.....S....O/...w....2.....fOPnJYIt/.jw0aqlz.62E5B9dSB1Ckv1012.MnU1wyk0agDfaADwD
................................Ctxd9Vwcoz1........Y./..................y.2.....
................/ME//....6U10...V1....E2.....wh70j0LxkqD/..........c./...w1.....
./EnAnYD..../..........wz.............................................sD...../..
.w1...sDPpngnwARcxXZpCK8Qp1Lzwe69s1.Oydj5o5alkJDQxffi4VBDH5Oz.MZNklOj1cjtFvJheY6
LuHi.Wof87mZyE2F3Q0LxkqD......2K......................sD..kz....................
.............................UJRR4.uppN.sNLb/UkRR4.arpN.cULb/U9SR4..............
...........................U..6.P....M4...EB....W....61....F....8/...I1....UJl12
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....E....E.....I.........kLoxqQkVKNmZqMVl4.....................................
...................wz.........zD........kz1........wz...........................
................................................................................
.....................2.....3....2....wpIX34PdtqNklKRn/..........................
..............................zD........kz1........../........zD................
................................................................................
................................/....E/.........TZaPqB5QcJaQdBKMg/..............
..........U0............................U.2.....................................
................................................................................
..........................................k.....I....c....kIdJaQkZaPnhKOn.UQ....
..........................U/4MU/4M.................../........zD........kz1.....
...wz...........................................................................
........................................................}


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: hobold on February 11, 2011, 03:05:34 PM
"Ladies and gentlemen, fasten the seat-belts for take-off. We are now leaving solid mathematical ground and are headed for the utopia of artistic freedom."

Very good stuff! And my apologies for earlier derailing of this thread.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: bib on February 11, 2011, 04:35:21 PM
"Ladies and gentlemen, fasten the seat-belts for take-off. We are now leaving solid mathematical ground and are headed for the utopia of artistic freedom."

You're late, buddy, it's been a year since I don't touch the ground anymore  :o O0 ::) :D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 11, 2011, 05:05:33 PM
 
:D Hi and thanks to everybody who posted encouraging comments! I don't have the material time to thank everybody singularly but keep doin! :D

Sometimes fractals do bad jokes to me! :fiery: I tested tospherical and invspherical with Menger3 and Sierpinski and it worked well. But testing with integer power shows an effect similar to "conj" formula ... Not good definitely! :fiery:

Due to bad coding, invspherical do also a flipxy, and it is not wanted! So I have to fix again! :fiery: (download again final.zip)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: bib on February 11, 2011, 05:51:09 PM
Luca. Take your time. No rush :):):) In fractals, quality is better than quantity ;)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 11, 2011, 08:23:08 PM
Luca. Take your time. No rush :):):) In fractals, quality is better than quantity ;)

If only I was sage! ;D ;D ;D
Uploaded new transforms for toric space; inversions are NOT correct but they give funny results.  O0 I don't know the correct formula, anyone??? :-\


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 16, 2011, 05:10:19 PM
Released a Barnsley in 4 dimensions and a box tiling. The box tiling gives incredible effects when combined with Amazing box & c. :)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: bib on February 16, 2011, 05:13:56 PM
Please stop Luca !! I don't have the time to test :):)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: lenord on February 16, 2011, 05:22:03 PM
I keep downloading them just to stay current but haven't had the time to try more that a couple of them. Too many toys too little Playtime.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 16, 2011, 05:33:42 PM
Please stop Luca !! I don't have the time to test :):)

(http://img40.imagefra.me/i52g/kriptokapi/e5fa_2e1_u6bci.jpg)

This new world awaits you. Don't you want to get in the forest? :dink:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 16, 2011, 06:03:13 PM
(http://img40.imagefra.me/i52g/kriptokapi/mo3y_670_u6bci.jpg)


Mandelbulb3Dv16{
M.....S....O/...w....2.............6.1.......s3E................................
.....................UF92FpyVYzD8QxckpX05z1........Y./..................y.2.....
................/ME//....6U./...f/....E2.....Qz/NcmCAZtD/..........c./...w1....U
z.....kD..../..........wz.............................................sD...../..
.w1...sDYsAIxzzzjz1..........WAbUdisqcljTcFzUvMS3t97C1JzzzzvzUNehUisqcljMaO9c9iB
Ow1mQ0auWPX4zU2bVezzzzyD......22......................sD..kz0...................
.............................UJRR4.uppN.sNLb/UkRR4.arpN.cULb/U9SR4..............
...........................U..6.P....M4...EB....W....61....F....8/...I1....UJl12
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6....E.....I....E....kLWx4SoZ4PdtqN........................................
...................0./.......U.E..........UNaNaNaNaxz...........................
................................................................................
.....................Uy....3....4....2YEjVbJV7LSHBKMgJ4BY/......................
.Q...2.......................U.E........Uz1........wz...................kz1.....
................................................................................
................................}

 ^-^ ^-^ ^-^


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 16, 2011, 06:41:27 PM
Added the non-commutative (Hamiltonian) version of the Barnsley formula. It looks more roundy. ^-^

The strange thing is that commutative Barnsley has a beautiful mset and "flat" Julia while the noncommutative has a beautiful Julia and awful mset ;D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 17, 2011, 11:31:57 AM
Added too Barnsley2 variations comm & non comm, Barnsley2 shares 80% of the code with his brother :D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 19, 2011, 01:31:22 PM
Added several transforms for attractor type fractals. They are very interesting I think. ;D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 19, 2011, 01:33:34 PM
And most of all;

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


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: lenord on February 19, 2011, 04:46:07 PM
I give up, spend more time trying to stay current with these than using them :hmh:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 19, 2011, 07:39:50 PM
I give up, spend more time trying to stay current with these than using them :hmh:

I know they are many, and it takes a long time to try em all! ;D It will take some months to see best results from this huge formula sets I think! :-\


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam 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. :-\

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

(http://img37.imagefra.me/i52r/kriptokapi/xu37_de8_u6bci.jpg) (http://i.imagefra.me/ce1i1r75)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on February 27, 2011, 06:32:48 PM
(http://img37.imagefra.me/i52r/kriptokapi/gc37_581_u6bci.jpg)

_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) :hmh: :D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali 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?



Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam 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 :sad1: no time for this sorry... Try to combine it with my functions; it should give great results. ^-^


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: ericr 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


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam 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. :dink:

Moreover, this function will be that much slow ...  :-\


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on March 04, 2011, 01:16:31 PM
I am reading something about Legendre poly;

(http://upload.wikimedia.org/math/a/3/b/a3b8b7279eae7a792c0b9a3e6da6eb9a.png)

(http://upload.wikimedia.org/math/f/5/a/f5a48040222ec31d9c92be9ad49ae36a.png)
...
(http://upload.wikimedia.org/math/7/a/d/7ad7c8e1ed196ef90e018c2cfcaa395c.png)
(http://upload.wikimedia.org/math/5/a/0/5a0ef17da96893d22036d6e9fb6c7119.png) <- not bad. :D

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! :o 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 ... :dink:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: ericr 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== 8)
         {
            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== 8)
      {
         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


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam 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" ;D 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. :dink:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali on March 04, 2011, 07:47:00 PM
But... we are going to pay you a lot of money!

didn't we mention it?

:D



Title: Re: Custom formulas & transforms - WIP & discuss
Post by: kram1032 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 (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 :)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on March 05, 2011, 01:05:42 PM
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 (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 :)

An entire page of formulas pops out, I'm very confused, what is the correct one? :hmh:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: kram1032 on March 05, 2011, 04:26:23 PM
I fear, all of them.

It's like solving a quadratic formula but more complex.
Note, that most of them are just sign shifts of each other.

My guess is, that this is due to the fact, that a torus is a finite structure, which repeats after a so-and-so-long straight path...


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on March 05, 2011, 04:47:45 PM
I fear, all of them.

It's like solving a quadratic formula but more complex.
Note, that most of them are just sign shifts of each other.

My guess is, that this is due to the fact, that a torus is a finite structure, which repeats after a so-and-so-long straight path...

Okay ... It's better to leave toric transforms as they are. It's a fractal program after all :dink: Thanks Mark! :worm:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: kram1032 on March 05, 2011, 04:56:07 PM
maybe it actually doesn't matter, if I think about it again:

it's like this: a quadratic equation has two solutions because x^2 = (-x)^2

these toric equations have a total of 16 solutions, because the back transform maps all those to the same point.

Also, don't forget, I used there a flat 4D map of a torus... if you wanted a 3D transform, you gotta use 3D-toric coordinates instead^^


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on March 07, 2011, 12:52:35 PM
Updated database with Ikenagabulb. :) :alien:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Sockratease on March 07, 2011, 01:21:41 PM
Updated database with Ikenagabulb. :) :alien:

So why is that zip file still called "Final" then?   :tease:

It's never going to be final   :laugh:

Call the next one "Current" or something   :evil1:

Just joking.

Thanks for these.  Too many to keep up with! 


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on March 07, 2011, 08:10:56 PM
Updated database with Ikenagabulb. :) :alien:

So why is that zip file still called "Final" then?   :tease:

It's never going to be final   :laugh:

Call the next one "Current" or something   :evil1:

Just joking.

Thanks for these.  Too many to keep up with! 

I'm too lazy to change the title  :laugh:  :laugh:

(And now added all conj formulas. The cheapest update ever  :laugh: )


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Sockratease on March 09, 2011, 12:47:17 AM
Is there a reason I get this error message every time I try the "Reciprocal x"  (actually - it's many of the new formulas, not just one) formula:

(http://www.sockrateaze.com/stuff/error.jpg)

Could it be a GPU issue?

The 'puter I'm using in this case has no graphics card at all, just the chip-thing it came with  (I use garbage computers for online purposes).  Haven't tried it on any other 'puters yet, but it's 100% consistent on this one!


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: 0Encrypted0 on March 09, 2011, 04:23:13 AM
Access violation fixed in 1.6.9.4

Edit3:
Update to v1.6.9.4:
- fixed a bug in v1.9.6.3, freeing formulas, rendering, selecting new formula + render again could lead to an access violation.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Sockratease on March 09, 2011, 01:18:21 PM
Access violation fixed in 1.6.9.4

Edit3:
Update to v1.6.9.4:
- fixed a bug in v1.9.6.3, freeing formulas, rendering, selecting new formula + render again could lead to an access violation.

Oops!   :embarrass:

Guess I need to upgrade to the new version.

Thankies.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: scheven_architect on April 27, 2011, 11:05:06 PM
(http://img37.imagefra.me/i52r/kriptokapi/gc37_581_u6bci.jpg)

_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) :hmh: :D

Could I have the settings to play with them? I find it hard to get parameters that give a similar result.

greetings!


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on April 28, 2011, 07:35:30 PM
Could I have the settings to play with them? I find it hard to get parameters that give a similar result.

greetings!

Effectively, the original sin4d is no longer in the database (was wrong!) and the sequence I told back gives a tricorn :o but these params can be cool to explore, especially Julia sets


Mandelbulb3Dv16{
O.....S....O/...w....2I..............1.......s1E................................
................................OaNaNaNadz1........A./..................y.2.....
................/M.0E....6kp....J1....E2.....QzIXLua2PrD/..........c./...w1/BnAn
x.....sD1E../.kSNzGNAnlSzcSZpbW3wBxj2C6MhBljbz9..................y1...sD...../..
.w1...sDYsAIxzzzjz1..........UAbUdisqcljp1IDqOBWGwXgZflfm2etzYvqlUV0UOyD85a.gaQW
GwnouSV48.etzSPvooeAVOyD......YJ......................sD..kz0...................
.............................ULRR4.2qpN.cOLb/.oRR4.qrpN.kVLb/UESR4..............
.....................wzzz1.U..6.P....M4...EB....W....61....F....8/...I1....UJl22
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....E....E.....I.........kL4lKOkVJK..pPrJaQ.........................c..........
...................6./........zj................................................
................................................................................
.....................2.....3....3....wpIdt4B2/5PpB5..YZK........................
.....................wFVf53iSYzD........................................kz1.....
..............zj................................................................
................................/....E/.........TBqPid4B2/......................
........................................U.2.....................................
................................................................................
..........................................E.....I....I....kEjpKPFJLMo/kPo/UQ....
...................................................wz.........zD........kz1.....
...wz...........................................................................
........................................................}


Mandelbulb3Dv16{
O.....S....O/...w....2....keH28jzhmmzSrpzwoa4Y/E799FSNx2EzvnjUo01bdsz.3rOsXiNduj
................................jDrL.nuss.2........A./..................y.2.....
................/ME/E....6EL0...o4....E2.....6hblPk/fRmD/..........c./...w1.BnAH
y.....sD1E../.kSNzGNAnlSzcSZpbW3wBxj2C6MhBljbz9..................y1...sD...../..
.w1...kDMWfy2QkObw1..........YE.b146jAZjYlykZz869tX932sNAy66zgKmDgpgC0mDVPNF.CV6
9t1pOB5Lnu66z0NMRM4XD0mD......2r0.....................sD..kz0...................
.............................ULRR4.2qpN.cOLb/.oRR4.qrpN.kVLb/UESR4..............
.....................wzzz1.U..6.P....M4...EB....W....61....F....8/...I1....UJl22
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....E....E.....I.........kL4lKOkVJK..pPrJaQ.........................c..........
...................6./........zj................................................
................................................................................
.....................2.....3....3....wpIdt4B2/5PpB5..YZK........................
................................................................nAnAnAnAnz1.....
..............zj................................................................
................................/....E/.........TBqPid4B2/......................
........................................U.2.....................................
................................................................................
..........................................E.....I....I....kEjpKPFJLMo/kPo/UQ....
...................................................wz.........zD........kz1.....
...wz...........................................................................
........................................................}

Another interesting combo with a sine ...

Mandelbulb3Dv16{
O.....S....O/...w....2....UV0zJC3SWazcKzd6wL52zDJQ2G4tqRMzPMBF/srLagzwF3BiMgtuvD
................................bV45GzV93/2........A./..................y.2.....
................/ME/E....6Ep/...33....E2.....gaUm14u2ilD/..........c./...w1.BnAH
y.....sD1E../.kSNzGNAnlSzcSZpbW3wBxj2C6MhBljbz9..................y1...sD...../..
.w1...kDmqFnMWolFwX/oui5/Da/zsdtwqX345lDtd.m39Lezv1vnKz0YCG4zmR.gHgNeyjDjE6Vw1ER
HwHTaCcMl4yDyK8fhV..qBlj......Yj......................sD..kz0...................
.............................ULRR4.2qpN.cOLb/.oRR4.qrpN.kVLb/UESR4..............
.....................wzzz1.U..6.P....M4...EB....W....61....F....8/...I1....UJl22
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....I....E.....I.........kL4lKOkVJK..pPrJaQ.........................c..........
...................6./........zj................................................
................................................................................
.....................2.....3.........wpIdtKK..5PpB5..YZK........................
................................................................nAnAnAnAnz1.....
..............zj................................................................
................................/....E/.........TN2Pd/5KN/......................
........................................U.2.....................................
................................................................................
..........................................E.....I....2....kLHBKMgZaPb/..........
...................................................../..........................
................................................................................
.....................................................2.....3....3....AoPhpKIp34R
.w4R.65.......................................................zD........kz1.....
...wz.........zD................................................................
................................................................}

:D

And a squarry Julia with her small childs (used the Julia pick to find the seed, do it :D )


Mandelbulb3Dv16{
O.....S....O/...w....2....UIdSlFlTGqzSjXxlAhakzDh4NgUdLnxyHsUb5Aj1BjzCJkwVgX.Zwj
................................nw.rOPHQo.2........A./..................y.2.....
................/ME/E....6kk/...U2....E2.....2XzmrrB1mmD/..........c./...w1.BnAH
y.....sD1E../2kOcoSV5TvoziraN6XEhAvD0kPeVVYMHw9..................y1...sD...../..
.w1...kDY0fXvRnUgw1..........mGT5C9VPRZjXqTCXja61q9dkusSrA69z2.tF49VPRZj0ESYlGsK
LtH9xRsg2ipJyUmMeYrB1mmD......oO......................sD..kz0...................
.............................ULRR4.2qpN.cOLb/.oRR4.qrpN.kVLb/UESR4..............
.....................wzzz1.U..6.P....M4...EB....W....61....F....8/...I1....UJl22
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....I....E.....I.........kL4lKOkVJK..pPrJaQ.........................c..........
...................6./........zj................................................
................................................................................
.....................2.....3.........wpIdtKK..5PpB5..YZK........................
................................................................nAnAnAnAnz1.....
..............zj................................................................
................................/....E/.........TN2Pd/5KN/......................
........................................U.2.....................................
................................................................................
..........................................E.....I....2....kLHBKMgZaPb/..........
...................................................../..........................
................................................................................
.....................................................2.....3....3....AoPhpKIp34R
.w4R.65.......................................................zD........kz1.....
...wz.........zD................................................................
................................................................}


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on May 07, 2011, 01:08:42 PM
Updated some c-swapping formulas, test image and render : http://lucagn.deviantart.com/art/Dreams-207889511


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali on May 07, 2011, 05:37:56 PM
Updated some c-swapping formulas, test image and render : http://lucagn.deviantart.com/art/Dreams-207889511

I'll look fot it later, but what I'm needing is the possibility of exchanging cx, cy, cz values to experiment with my new formula.
I do it with flips but I have to do two flips, one for Z & C and another for Z only to restore the values...
(I don't know if I'm saying it clearly)
a total swap of C values in only one step should be nice...

As always, thanks for sharing your efforts!


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on May 07, 2011, 06:01:48 PM
Updated some c-swapping formulas, test image and render : http://lucagn.deviantart.com/art/Dreams-207889511

I'll look fot it later, but what I'm needing is the possibility of exchanging cx, cy, cz values to experiment with my new formula.
I do it with flips but I have to do two flips, one for Z & C and another for Z only to restore the values...
(I don't know if I'm saying it clearly)
a total swap of C values in only one step should be nice...

As always, thanks for sharing your efforts!

Flipc-xyz; tried? makes this
x<->Cx
y<->Cy
z<->Cz

Or you need:
Cx<->Cy
?


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali on May 07, 2011, 06:22:47 PM
Need Cx<->Cy<->Cz

My formula likes that way, don't know why  :hmh:

(you know women...)

 ;D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on May 07, 2011, 07:44:10 PM
Need Cx<->Cy<->Cz

My formula likes that way, don't know why  :hmh:

(you know women...)

 ;D

I need to know exactly; you mean

Cx=Cy, then Cy=Cz and finally Cz=Cx ? Sure? :D


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali on May 07, 2011, 08:40:12 PM
Need Cx<->Cy<->Cz

My formula likes that way, don't know why  :hmh:

(you know women...)

 ;D

I need to know exactly; you mean

Cx=Cy, then Cy=Cz and finally Cz=Cx ? Sure? :D

I need:  (Initial values -> Final values)

Cx -> Cy
Cy -> Cz
Cz -> Cx

But if you do only the tree assignments you posted, the result is:

Cx -> Cy
Cy -> Cz
Cz -> Cy

Because you will lose Cx if you don't save it first!

So the algorithm should be:

Cx_temp = Cx
Cx = Cy
Cy = Cz
Cx = Cx_temp

I know you was going to do that anyway, because is so obvious...

But do it :now: ! 

 :-*

P.S.: Where's the ballfold you mentioned? Spherefold doesn't have R parameter and also I think it's not working fine.. what does exactly?

P.S.2: I tried to code a simple stupid formula in assembler, and I couldn't do it. So my conclusion is that Jesse is God, and you are Jesus.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on May 07, 2011, 10:23:40 PM
Now? Noooo... ;D
I have many old formulas to finish and to be written - patience patience :lol:

I am not a saint, however :D
Spherefolding, is it. I dont know anything about it but trust me it works fine


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali on May 07, 2011, 11:40:19 PM
That's ok, I can wait a few months, but no more  :D

I'm sure Jesse will modify the formula to include that flip and enable Mandelbrot mode, but I wanted the flip separately for experimentation ;)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 18, 2011, 07:42:37 PM
Now the "sphere sponge" is POSSIBLE - very easy with my new folding mode for sphere inversion... ;D


Mandelbulb3Dv17{
P.....S....O/...w....2.....JP873UHu0.bRFAwtaAh2Ewu.Oh3w2Gwvy0liP/DV2zyYaFnN5FMyj
................................QW5PSMg7rz1........Y./..................y.2.....
................/MU//....6Eh....22....E2.....2KWwYI1hYqD...........c./...w1....U
z.UaNadD32../.kcmd5..xBwzG51dEIXlHzjoU9p.irrzw9............2.....y1...sD...../..
.w1...sDt9y55pE9dx1..........4f1.WJmTGdjFbVCvBHt.rPyWzlFBoGOzA083PJmTGdjcUGlKZwb
IuHhC.6K7z7ZyY6D1II1hYqD......ok..............kD.2....sD..kz0...................
.............................UTRU4.Yq/O.cQ5c/.wRU4.Ks/O.kX5c/UMSU4..............
.....................wzzz1.U..6.P....M4...EB....W....61....F....8/...I1....UJl32
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6....E.....I....I....kLn/5OZ7LNdtaR.YaPb31...........................U.4MU/
4M........................................EnvwbNS0exz.........zD................
................................................................................
.....................2.....3....8....oINiRKNmB1.jJbPo73.........................
.....MU/4MU/4................U.E........kz1........wz.........zD................
................................................................................
................................}

Try it!!!


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: cytotox on June 20, 2011, 10:13:07 PM
Hi DarkBeam

When I paste the par file (from the clipboard using the appropriate button in M3D) and press 'Calculate 3D', all I get is a solid yellow image. I am using M3D 1.72 & your latest formula collection under windows Vista. What could I be doing wrong?  :sad1:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on June 21, 2011, 01:27:07 AM
Try to set the 'repeat from' option to the second formula...


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 21, 2011, 09:13:26 AM
Try to set the 'repeat from' option to the second formula...

Nooo, wrong answer  :boooo: ;D ;D ;D

@cytotox -> Have you put the new formula file into the m3d folder? I mean the latest _sphereinv ... I updated it yesterday.

Should render like that;



Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 21, 2011, 09:15:04 AM
Bonus param (sphere sponge v2)


Mandelbulb3Dv17{
P.....S....O/...w....2.....JP873UHu0.bRFAwtaAh2Ewu.Oh3w2Gwvy0liP/DV2zyYaFnN5FMyj
................................QW5PSMg7rz1........Y./..................y.2.....
................/MU//....6.c....22....E2.....2KWwYI1hYqD...........c./...w1....U
z.UaNadD32../.kcmd5..xBwzG51dEIXlHzjoU9p.irrzw9............2.....y1...sD...../..
.w1...sDt9y55pE9dx1..........4f1.WJmTGdjFbVCvBHt.rPyWzlFBoGOzA083PJmTGdjcUGlKZwb
IuHhC.6K7z7ZyY6D1II1hYqD......Id..............kD.2....sD..kz....................
.............................UTRU4.Yq/O.cQ5c/.wRU4.Ks/O.kX5c/UMSU4..............
.....................wzzz1.U..6.P....M4...EB....W....61....F....8/...I1....UJl32
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6....E.....I....I....kLn/5OZ7LNdtaR.YaPb31...........................U.....
...................................................xz.........zD................
................................................................................
.....................2.....3....8....oINiRKNmB1.jJbPo73.........................
.....MU/4MU/4................U.E........kz1........wz.........zD................
................................................................................
................................}

 :dink:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: cytotox on June 21, 2011, 10:28:28 AM
@cytotox -> Have you put the new formula file into the m3d folder? I mean the latest _sphereinv ... I updated it yesterday.

Yes, I did. I downloaded & installed the latest M3D version and extracted all the m3f files of your final.zip file (timestamp of _sphereinv.m3f: 19.06.2011) to the M3Formulas subfolder. I checked it on my computer at home (under Vista 64bit) as well as here on my computer at work (Windows XP Professional, SP3), yielding the same negative result. I also tried your bonus par on the second computer, which yields exactly the same render:


Try to set the 'repeat from' option to the second formula...

When I do that, I get a render of a spherically distorted menger sponge, but not the one that DarkBeam shows in his attached image ...


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 21, 2011, 01:20:40 PM
Okay, but your Mandelbulb still loads the old formula, beacuse I don't see the new option (that produces the effect)

If you don't see another additional option in your _sphereinv you are not seeing the correct effect, but the old one... Try to locate all the _sphereinv files in your HDD. There is a temp folder (different than your M3D) that stores all formulas. Delete everything, then restart Mandelbulb and it will work :dink:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: cytotox on June 21, 2011, 04:45:46 PM
Thanks for the quick reply. I checked and found a duplicate file - in a 'duplicate' folder called 'formulas', from which I deleted everything.

After this, it worked perfectly ...  :D

So, M3D is keeping separate copies of formula files in a folder of its own and is using these preferentially? :verysurprised:
What is the reasoning behind that behaviour?  :hmh:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 21, 2011, 05:00:16 PM
So, M3D is keeping separate copies of formula files in a folder of its own and is using these preferentially? :verysurprised:
What is the reasoning behind that behaviour?  :hmh:

Dunno! :D Ask the master Jesse ;)

Enjoy them!


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on June 21, 2011, 09:26:45 PM
Ah, you improved your sphereInv formula, looks cool!

The reason why i store all formulas also in the users local application data folderis that each copy of m3d on the computer has instantan acces of the newest formulas, regardless of where the copy is located.

And m3d checkes of the newest formula version, so just downloading the new final.zip from DarkBeam and extracting it to a known folder of m3d formulas is enough to do.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 21, 2011, 11:05:51 PM
This new improvement opens a giant field of exploring
Tomorrow i will try the inner radius fold, this formula
if r<inrad
r=2inrad-r
then r is used for inversion etc... This should fill those empty spaces inside hypermengers ;)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: cytotox on June 22, 2011, 08:58:36 AM
The reason why i store all formulas also in the users local application data folderis that each copy of m3d on the computer has instantan acces of the newest formulas, regardless of where the copy is located.

I can see the logic behind that. However, this specific folder seems to contain only those formulas that have been used / loaded in M3D before ...

And m3d checkes of the newest formula version, so just downloading the new final.zip from DarkBeam and extracting it to a known folder of m3d formulas is enough to do.

Well, in my case it evidently did not work that way. The newest formula for _sphereinv, extracted from the final.zip to the M3D M3Formulas folder (timestamp: 19.06.2011) was not used by M3D, but instead the - now deleted - older version (dating from ?) seems to have been used. Could it be that when M3D copies the formula file to the application data folder, it generates a new date / timestamp for that file? At least this would explain the observed behaviour ...


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: cytotox on June 22, 2011, 10:11:34 AM
Quoting myself ...

Could it be that when M3D copies the formula file to the application data folder, it generates a new date / timestamp for that file? At least this would explain the observed behaviour ...

I checked it and yes, when the formula file is copied to the application data folder by Mandelbulb 3D, the current date is assigned, which results in the copied file being 'newer' than the one in the original folder ... :-\

(So, when you try to use an outdated formula file, realize that it does not work, and then download and extract the newer version, you will always encounter this problem)


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on June 22, 2011, 03:28:10 PM
Thanks cytotox for the advice, the filedate has to be kept to work properly, of course!
Will try to change it in the next verison.


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 22, 2011, 06:55:08 PM
More folding modes added! :tool: :tool: :tool:

(http://img37.imagefra.me/i56m/kriptokapi/cigk_96d_u6bci.png) (http://i.imagefra.me/247idpvm)

Parameter of image 1

Mandelbulb3Dv17{
P.....S....O/...w....2.....vVRHF0qS..Hl04oQrN82E.iD4F.YdVwn2.Ed2.NO6zIBXeCHQ9KzD
................................XE5dH8Lqlz1........Y./..................y.2.....
................/ME//....6.I/...L1....E2.....gqfufSkH/rD/..........c./...w1....U
z.EnAnYD32../..........wz..................................2.....y1...sD...../..
.w1...sD1z.bd5wIkx1..........G91DeJ5.fdjJJTqvaTu3rvkDkNu/D3QzscZEVJ5.fdjFO7IMp/k
OuHhAwcKR.gayU0QxUSkH/rD......IT..............kD.2....sD..kz....................
.............................UTRU4.Yq/O.cQ5c/.wRU4.Ks/O.kX5c/UMSU4..............
.....................wzzz1.U..6.P....M4...EB....W....61....F....8/...I1....UJl32
...U.iVFwxDE./ozPM2Tzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1............28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....A....E.....I.........kL4x4PYZaPbxoMo/................................U/4MU/
4M.................6./..........................................................
................................................................................
.....................2.....3....4....wpQkVKNmJKOiN5.Z75.........................
.....6........................zj..............................zD........kz1.....
................................................................................
................................/....E/...U0....BJaPbJaQn..IjRLNm/..............
................4MU/4MU/................6.2........wz.........zD........kz1.....
................................................................................
............................................}

edit, mode "3" no longer exists, now it's mode "2"


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali on June 22, 2011, 09:28:14 PM
Nice new additions, Luca!

A question: is there already in M3D some way of doing a "boxfold" exactly as the mandelbox does?

If not, please do a new transform for me :-*


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on June 22, 2011, 10:30:12 PM
Nice new additions, Luca!

A question: is there already in M3D some way of doing a "boxfold" exactly as the mandelbox does?

If not, please do a new transform for me :-*


"_Folding1" should do it  :happy:


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Kali on June 23, 2011, 05:28:03 AM
"_Folding1" should do it  :happy:

oops! that was easy...  thanks!  :dink:

and what does "_Folding2" do?


Title: Re: Custom formulas & transforms - WIP & discuss
Post by: Jesse on June 25, 2011, 08:29:44 PM
"_Folding1" should do it  :happy:

oops! that was easy...  thanks!  :dink:

and what does "_Folding2" do?

Had to look at this again, that are one of the first external formulas i made...
its like  z' = z+abs(z-2*fold)-abs(z-fold)-fold
so a folding affecting the positive axis (attached a graph of it, the green line. The red line was an attempt of a smooth spherical folding, but the results were disappointng).

@Lucas:
Giving formulas more options tend to cause problems, because the new values will be initialized more or less randomly!
So old parameters could not work anymore what can be really annoying if you continue an animation rendering with this formula and things screw up.
My advice would be to give the new formulas a different name!
And to overcome the huge formula count, i try to make some kind of formula hiding of unwanted ones or something...

Thank you!



Title: Re: Custom formulas & transforms - WIP & discuss
Post by: DarkBeam on June 25, 2011, 11:18:28 PM
Too bad if we continue to make new formulas everytime the situation can become impossible to manage, I was thinkin on the problem of liading old params, it will happen very rarely...

Many old formulas need a "revamp" as I learn new things :) the solution can simply be, if new formulas screw up something you can simply use the old ones to finish the render, then use the new better ones , :)