Logo by wmauzey - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. April 25, 2024, 09:29:59 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]   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: rotate()  (Read 1959 times)
0 Members and 1 Guest are viewing this topic.
emrys
Forums Newbie
*
Posts: 2


« on: May 20, 2015, 08:02:06 PM »

Hey all

I'm attempting to implement the KIFS function in Houdini but I'm not entirely sure what the rotate() functions are doing in the code. I've tried searching, but to no avail. Of course I'm not even sure what language this is, so that might help smiley. Did I mention I'm new here?

Thanks

Code:
Menger3(x,y,z){
   r=x*x+y*y+z*z;
   for(i=0;i<MI && r<bailout;i++){
      rotate1(x,y,z);

      x=abs(x);y=abs(y);z=abs(z);
      if(x-y<0){x1=y;y=x;x=x1;}
      if(x-z<0){x1=z;z=x;x=x1;}
      if(y-z<0){y1=z;z=y;y=y1;}
     
      z-=0.5*CZ*(scale-1)/scale;
      z=-abs(-z);
      z+=0.5*CZ*(scale-1)/scale; // equals to a shifted ABS

      rotate2(x,y,z);
   
      x=scale*x-CX*(scale-1);
      y=scale*y-CY*(scale-1);
      z=scale*z;
     
      r=x*x+y*y+z*z;
   }
   return sqrt(x*x+y*y+z*z)*scale^(-i);
}
Logged
dom767
Explorer
****
Posts: 40


dom767
WWW
« Reply #1 on: May 24, 2015, 11:40:21 AM »

The rotate makes each iteration of the fractal curve away from the standard fractal you started with.

I covered the basics on this article recently...
http://woo4.me/wooscripter/kaleidoscopic-ifs-fractals/

And I rendered this the other day. smiley


Enjoy getting into fractals!
Logged
Dodonaea
Forums Newbie
*
Posts: 3


« Reply #2 on: May 25, 2015, 04:15:53 PM »

Thanks dom767, very informative tutorial!
« Last Edit: May 26, 2015, 04:53:50 PM by Dodonaea » Logged
emrys
Forums Newbie
*
Posts: 2


« Reply #3 on: May 25, 2015, 07:50:06 PM »

Thanks dom767 that's a great tutorial.

I was also sent this link via PM:
https://github.com/Syntopia/Fragmentarium/blob/master/Fragmentarium-Source/Examples/Include/MathUtils.frag

These should definitely put me on the right track.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Flips are the new Rotate :) Mandelbulb 3d KRAFTWERK 9 2645 Last post January 10, 2011, 10:25:15 AM
by KRAFTWERK
Special "offset" and "rotate" options from Fractallab possible in M3d-formula? Mandelbulb 3d « 1 2 » SaMMy 18 30952 Last post April 05, 2011, 12:20:52 PM
by DarkBeam
Morphing Amazing Box & Rotate Movies Showcase (Rate My Movie) mary032964 5 2424 Last post September 12, 2013, 09:27:10 PM
by FracZky
rotate the camera in Mandelbulb 3D 1.8.9 Help & Support sangreelah 3 281 Last post March 03, 2014, 09:40:27 PM
by sangreelah
How to rotate the Mandelbulb? Mandelbulb 3d fengda2870 6 8498 Last post December 30, 2016, 10:54:56 PM
by Sockratease

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