Logo by Dinkydau - 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 20, 2024, 07:52:21 AM


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]   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: Menger Sponge based 3D fractal morphing to crazy flowers  (Read 869 times)
0 Members and 1 Guest are viewing this topic.
Alon Nahary
Conqueror
*******
Posts: 102



« 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.

<a href="https://www.youtube.com/v/WLXkburgi3k&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/WLXkburgi3k&rel=1&fs=1&hd=1</a>
Logged

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


Fragments of the fractal -like the tip of it


« Reply #1 on: September 08, 2016, 03:39:01 PM »

Raytracing is slow. Switch to distance estimation
 Azn cheesy
Logged

No sweat, guardian of wisdom!
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #2 on: September 08, 2016, 03:55:11 PM »

it looks nice  smiley
Logged
Alon Nahary
Conqueror
*******
Posts: 102



« Reply #3 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 smiley

////////////////////////////////////////////////////////////////////////
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;
}
Logged

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


Fragments of the fractal -like the tip of it


« Reply #4 on: September 08, 2016, 06:57:13 PM »

there is buddhi's method but dunno what it is. search smiley
Logged

No sweat, guardian of wisdom!
Alon Nahary
Conqueror
*******
Posts: 102



« Reply #5 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 cry
Logged

1Bryan1
Fractal Fertilizer
*****
Posts: 352



WWW
« Reply #6 on: September 08, 2016, 11:38:20 PM »

Nice video.
mesmerising.
Logged

Find 340+ more of my fractal art at http://1bryan1.deviantart.com/gallery/
Pages: [1]   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.137 seconds with 24 queries. (Pretty URLs adds 0.007s, 2q)