Welcome to Fractal Forums

Fractal Art => Movies Showcase (Rate My Movie) => Topic started by: Alon Nahary on September 08, 2016, 10:06:34 AM




Title: Menger Sponge based 3D fractal morphing to crazy flowers
Post by: Alon Nahary on September 08, 2016, 10:06:34 AM
Menger Sponge based 3D fractals from my Julia3D software. Rendered in ray tracing, one minute a frame.

Changing C the gradually is controlling mostly translation and rotation between each iteration of the Menger Sponge folding code.

https://www.youtube.com/watch?v=WLXkburgi3k&feature=youtu.be


Title: Re: Menger Sponge based 3D fractal morphing to crazy flowers
Post by: DarkBeam on September 08, 2016, 03:39:01 PM
Raytracing is slow. Switch to distance estimation
 ^-^ :D


Title: Re: Menger Sponge based 3D fractal morphing to crazy flowers
Post by: quaz0r on September 08, 2016, 03:55:11 PM
it looks nice  :)


Title: Re: Menger Sponge based 3D fractal morphing to crazy flowers
Post by: Alon Nahary on September 08, 2016, 05:58:57 PM
Hi DarkBeam,

I honestly don't know how to find the distance estimation to each of the functions I discover. Some seems very unpredictable.
How for example can I deal with the if's in the following function, I appreciate any comment on this one:

Thanks :)

////////////////////////////////////////////////////////////////////////
bool getIsIn(double *start)
{
   Quaternion z(start[0] * 2, start[1] * 2, start[2] * 2, 1);

   double x1, y1;
   for (int it= 0; it< 64; it++)
   {
      // folding
      if ((z.x - z.y) < 0) { x1 = z.y; z.y = z.x; z.x = x1; }
      if ((z.x - z.z) < 0) { x1 = z.z; z.z = z.x; z.x = x1; }
      if ((z.y - z.z) < 0) { y1 = z.z; z.z = z.y; z.y = y1; }
      if ((z.x + z.y) < 0) { x1 = -z.y; z.y = -z.x; z.x = x1; }
      if ((z.x + z.z) < 0) { x1 = -z.z; z.z = -z.x; z.x = x1; }
      if ((z.y + z.z) < 0) { y1 = -z.z; z.z = -z.y; z.y = y1; }

      double t = z.dotBy(m_prms.m_juliaQuaternionC);
      if (t < 0.0)
      {
         Quaternion scaled = m_prms.m_juliaQuaternionC.scale(2.0*t);
         z = z - scaled;
      }
      double x2 = z.x * z.x;
      double y2 = z.y * z.y;
      double z2 = z.z * z.z;
      double newx = x2 - 0.5 * (y2 + z2) + m_prms.m_juliaQuaternionC.x;
      double newy = 2.0 * z.x * z.y * z.z + m_prms.m_juliaQuaternionC.y;
      double newz = z2 - 0.5 * (x2 + y2) + m_prms.m_juliaQuaternionC.z;
      if ((newx*newx + newy*newy + newz*newz) > 64)
         return false;
      z.x = newx;
      z.y = newz;
      z.z = newy;
   }
   return true;
}


Title: Re: Menger Sponge based 3D fractal morphing to crazy flowers
Post by: DarkBeam on September 08, 2016, 06:57:13 PM
there is buddhi's method but dunno what it is. search :)


Title: Re: Menger Sponge based 3D fractal morphing to crazy flowers
Post by: Alon Nahary on September 08, 2016, 08:12:08 PM
Thanks DarkBeam for directing me.

It looks like it's not for me, my code is different than simple iterations of the polynomial functions.
Inside the iteration loop of for (int it= 0; it< 64; it++)
I can have something like:

if (it == 3)
  z = z^6 + C;
else (it == 7)
  z = z^5 + C;
else
  z = z^9 + C;

So it's not a classic iterations loop. I'll guess I'll have to wait for the render to finish :'(


Title: Re: Menger Sponge based 3D fractal morphing to crazy flowers
Post by: 1Bryan1 on September 08, 2016, 11:38:20 PM
Nice video.
mesmerising.