Logo by Fiery - Contribute your own Logo!

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

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

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. April 16, 2024, 11:41:29 PM


Login with username, password and session length


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


Pages: 1 [2]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Mandelbox Variant 21  (Read 6843 times)
Description: simpler folding code (simpler means less code)
0 Members and 1 Guest are viewing this topic.
trafassel
Fractal Bachius
*
Posts: 531


trafassel
« Reply #15 on: June 17, 2011, 11:32:41 PM »

If you like it, I will present some more AbsBox Julia sets.


* Data13pic10023s.jpg (183.57 KB, 1200x1200 - viewed 140 times.)

* Data695pic10366c.jpg (249.78 KB, 1200x1200 - viewed 142 times.)
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #16 on: June 18, 2011, 01:23:53 PM »

 joy MARVELLOUS images
Logged

No sweat, guardian of wisdom!
trafassel
Fractal Bachius
*
Posts: 531


trafassel
« Reply #17 on: June 29, 2011, 08:53:22 PM »

This video visualize the change of the julia seed.

<a href="http://www.youtube.com/v/B_t_8SvXGE0&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/B_t_8SvXGE0&rel=1&fs=1&hd=1</a>
Logged
trafassel
Fractal Bachius
*
Posts: 531


trafassel
« Reply #18 on: June 30, 2011, 10:43:23 PM »

The AbsBox with Scale=1.


* Data696pic10723s.jpg (245.17 KB, 1200x1200 - viewed 142 times.)

* Data696pic10726s.jpg (254.94 KB, 1200x1200 - viewed 157 times.)
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #19 on: July 02, 2011, 11:56:10 AM »

public override void Init() {base.Init();additionalPointInfo=new AdditionalPointInfo();}


// Simplified Mandelbox
public override long InSet(double ar, double ai, double aj,  double br, double bi, double bj, double bk, long zkl, bool invers) {

  double gr=50000; // bailoutValue
  double xx, yy, zz; // temp var
  long tw; // boring
  int n;
  double x=0,y=0,z=0;
  double r_n = 0;

  xx = x * x; yy = y * y; zz = z * z;
  tw = 0L;
 double r = Math.Sqrt(xx + yy + zz);

// This fixid to a special non Julia-variant
  double scale = 1.05;

  // Surface Coloring
  additionalPointInfo.red=0;
  additionalPointInfo.green=0;
  additionalPointInfo.blue=0;

  for (n = 1; n < zkl; n++) {

  // Original box fold is replaced by x=abs(x); y=abs(y); z=abs(z)
  // Inspired by the work of Kali.
   
  // Comment out to use the original (Tglad) Mandelbox formula.

  // if (x > 1) x = 2.0 - x; else
  if (x < -1) x = -2.0 - x;
             
  // if (y > 1)    y = 2.0 - y;  else
  if (y < -1) y = -2.0 - y;
             
  // if (z > 1)   z = 2.0 - z; else
  if (z < -1) z = -2.0 - z;
             
  //  ; fold sphere onto itself
  double fixedRadius = 1;
  double minRadius = 0.00001;

  xx=x*x;yy=y*y;zz=z*z;
  double length=   r = xx + yy + zz;

// Colors
  if(r!=0) {
  additionalPointInfo.red+=1.0*xx/r;
  additionalPointInfo.green+=1.0*yy/r;
  additionalPointInfo.blue+=zz/r;
  }
           
  // Bailout Condition
  if (length > gr) {  tw = n; break; }

 double mult=1;

 if (length < minRadius) {
 //     mult=Math.Sqrt(fixedRadius)/(minRadius);
 }   else
 if (length < fixedRadius) {
   mult=Math.Sqrt(fixedRadius)/(length);
 }
 mult*=scale;
 x*=mult;
 y*=mult;
 z*=mult;

// In Julia Mode: the fixed Julia values
// Iin Mandelbrot set mode: the room coordinates of the pixel to test
   x+=br;
   y+=bi;
   z+=bj;
 }

// For inside rendering
if (invers) {if (tw == 0) tw = 1; else tw = 0; }

  // Warning: this valaue can be very dangereus, if it is used for distanve esitmation:
  //
  return (tw);
}

Trafassel, I am noticing that Mandelbulb renders of your great fractal are very different from yours. Probably, some things needs fixing...

1st; Mandelbulb starts from x=cx, y=cy, z=cz, w=cw=0 when you seem to start at x=y=z=w=0 (very important)
2nd; this part seems to be missing in Jesse's formula

double mult=1;

if (length < 1e-5) {
 //     mult=Math.Sqrt(fixedRadius)/(minRadius);
 }   else

 if (length < fixedRadius) {
   mult=Math.Sqrt(fixedRadius)/(length);
 }
 mult*=scale;
 x*=mult;
 y*=mult;
 z*=mult;

That may be cause of errors or something. smiley
Logged

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


« Reply #20 on: July 02, 2011, 05:12:59 PM »

Really nice and interesting renders, trafassel, very good stuff!

What about using abs(a+f)-f (for each axis a) and varying f values ?

also abs(a+f1)-abs(a-f2)-a with different f1 and f2 values.
« Last Edit: July 02, 2011, 05:17:24 PM by Kali » Logged

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


Fragments of the fractal -like the tip of it


« Reply #21 on: July 02, 2011, 05:42:29 PM »

Hope somebody finds the "error", it would be great to see such images in Mandelbulb smiley
Logged

No sweat, guardian of wisdom!
trafassel
Fractal Bachius
*
Posts: 531


trafassel
« Reply #22 on: July 03, 2011, 04:39:09 PM »

DarkBeam, you are right. To work with the formula as julia set you have to replace

x=y=z=w=0; with  x=ar;y=ai;z=aj; (The position of the point to test).

The sphere inversion:
double mult=1;
if (length < 1e-5) {
 //     mult=Math.Sqrt(fixedRadius)/(minRadius);
 }   else
 if (length < fixedRadius) {
   mult=Math.Sqrt(fixedRadius)/(length);
 }

is the same as:
mult=1;
  if (r < fixedRadius && r>0) {
    mult=1.0/r;
  }
if minRadius is very small. In my tests both variants generates nearly the same pictures.

The pictures of the scale=1 AbsBox are generated with a very small bailout value. So in Reply #18  I have replaced:
double gr=50000; // bailoutValue
with
double gr=32; // bailoutValue

Here ist formula, I used for generation the julia movie. The get it to work in Gestaltlupe you have to press render two times. First to set the parameters. Second to render the picture. Hope, this will help you with the formula.


public override void Init() {base.Init();
if(GetString("intern.Formula.TempUpdateVal")!="33b6843e3102477181c51c97eaf7b578"){
SetParameterBulk(@"<Entry Key='Border.Max.x' Value='0.832922740362181' /><Entry Key='Border.Max.y' Value='1.590864959092' />
<Entry Key='Border.Max.z' Value='-0.01610155004377' /><Entry Key='Border.Min.x' Value='-3.20862914697999' />
<Entry Key='Border.Min.y' Value='-2.45068692825015' /><Entry Key='Border.Min.z' Value='-2.28947448667369' />
<Entry Key='Border.Min.zz' Value='0' />
<Entry Key='Formula.Static.Cycles' Value='120' /><Entry Key='Formula.Static.Formula' Value='-2' />
<Entry Key='Formula.Static.jx' Value='0.01' /><Entry Key='Formula.Static.jy' Value='0.08' /><Entry Key='Formula.Static.jz' Value='-0.01' />
<Entry Key='Formula.Static.jzz' Value='0' /><Entry Key='Formula.Static.MinCycle' Value='51' />
<Entry Key='Transformation.Camera.AngleZ' Value='12' /><Entry Key='Transformation.Perspective.Cameraposition' Value='0.3' />
<Entry Key='Transformation.Stereo.Angle' Value='-9' /><Entry Key='Transformation.Stereo.EyeDistance' Value='0.5' />
<Entry Key='View.Height' Value='720' /><Entry Key='View.Perspective' Value='1' /><Entry Key='View.Width' Value='1280' />
<Entry Key='intern.Formula.TempUpdateVal' Value='33b6843e3102477181c51c97eaf7b578' />");}
additionalPointInfo=new AdditionalPointInfo();}


// Simplified Mandelbox
public override long InSet(double ar, double ai, double aj,  double br, double bi, double bj, double bk, long zkl, bool invers) {

  double gr=50000; // bailoutValue
  double xx, yy, zz; // temp var
  long tw; // boring
  int n;
  double x=ar,y=ai,z=aj;
  double r_n = 0;
  double mult=1;

  xx = x * x; yy = y * y; zz = z * z;
  tw = 0;
  double r = xx + yy + zz;

  double scale = 1.05;

  // Surface Coloring
  additionalPointInfo.red=0;
  additionalPointInfo.green=0;
  additionalPointInfo.blue=0;

  for (n = 1; n < zkl; n++) {

  // Original box fold is replaced by x=abs(x); y=abs(y); z=abs(z)
  // Inspired by the work of Kali.
   
  // Comment out to use the original (Tglad) Mandelbox formula.

  // if (x > 1) x = 2.0 - x; else
  if (x < -1) x = -2.0 - x;
             
  // if (y > 1)    y = 2.0 - y;  else
  if (y < -1) y = -2.0 - y;
             
  // if (z > 1)   z = 2.0 - z; else
  if (z < -1) z = -2.0 - z;
             
  //  ; fold sphere onto itself

  xx=x*x;yy=y*y;zz=z*z;
  r = xx + yy + zz;

  if(r!=0) {
    additionalPointInfo.red+=xx/r;
    additionalPointInfo.green+=yy/r;
    additionalPointInfo.blue+=zz/r;
  }
           
  // Bailout Condition
  if (r > gr) {  tw = n; break; }

  mult=1;
  if (r < fixedRadius && r>0) {
    mult=1.0/r;
  }
  mult*=scale;
  x*=mult;
  y*=mult;
  z*=mult;

  // In Julia Mode: the fixed Julia values
  // In Mandelbrot set mode: the room coordinates of the pixel to test
  x+=br;
  y+=bi;
  z+=bj;
 }

  // For inside rendering
  if (invers) {if (tw == 0) tw = 1; else tw = 0; }

  return (tw);
}
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #23 on: July 03, 2011, 05:22:34 PM »

embarrass

Very sorry to disturb for nothing... Now I tried again Jesse's formula with different parameters and I am getting almost perfect pictures too. smiley

Scale=1 is rendered (but with awful de) and I managed to rendered your Apollonian julia wink

The problem is that many iters are needed (slow convergence on scales almost 1) smiley

Mandelbulb3Dv17{
P.....S....O/...kR/........dcze4Pd10.f2jgjIOPw.El.kbcJntYzvPSTETfd3yzKr12oIzLkzj
................................y.YKxj687.2.......EW./..................y.2.....
................/ME//....6.o0...lY....E2.....cBbscqueQpD/..........c./...w1....U
z.EnAnQD32../2.............................................2.....y1...sD...../..
.w1...sDlEeuPJMmGxX68stvHi.2zsbyiuux7goDiD8RvQ3w0xH3r0FQE.mHzkX6c6NTUmojAK67nbjN
1xfE9XgQ96GIzUCpt/0cfVoD......2O/.............kD.2....sD..kz0...................
.............................UTRU4.Yq/O.cQ5c/.wRU4.Ks/O.kX5c/UMSU4..............
.....................wzzz1.U..6.P....U0...EB....p....kB....F....1/...I1....UJp32
XM.U.0.MzzDg./kz....z1....6.1c..zzzz............MZCpCckYcz1..........2k.8.kXWF1.
QvM93P58iz9GMmnWK2zwz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1....................................C....wk1D.zz/..wD.k1Dw.szD.U9...Dw
k1EzTpxe...wk1D.Qs5s....k1Dw..bTU1....Dwk1.ly/C....wk1D.Mw5s....k1Dw.kqTU1....Dw
k1.kz/C....wk1D....s....zz/..wD.yz1.s0..xzJrf0..................................
E....2....E.....I....A....EE0x4SBx4NoE4.rJaQ....................................
..........EnAnAnAnAwz.........zD................................................
................................................................................
........................}

picture cheesy


* aaaaa iko.jpg (161.77 KB, 779x670 - viewed 141 times.)
Logged

No sweat, guardian of wisdom!
trafassel
Fractal Bachius
*
Posts: 531


trafassel
« Reply #24 on: July 29, 2011, 09:26:30 AM »

Another zoom into the AbsBox:

<a href="http://www.youtube.com/v/gOS6vUIihM8&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/gOS6vUIihM8&rel=1&fs=1&hd=1</a>
Logged
KRAFTWERK
Global Moderator
Fractal Senior
******
Posts: 1439


Virtual Surreality


WWW
« Reply #25 on: July 29, 2011, 09:36:46 AM »

Very interesting movie Traf! You get a nice feel of the fractal...
Nice to see that they have Disco-strobe lights in the fractal world too! smiley
Logged

trafassel
Fractal Bachius
*
Posts: 531


trafassel
« Reply #26 on: August 04, 2011, 10:50:27 PM »

Nice, that you like it.

The Disco-strobe lights comes from randomly generated shadows.
Logged
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  


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

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