Logo by wmauzey - Contribute your own Logo!
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. October 22, 2014, 11:40:58 PM


Login with username, password and session length



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: Escape time versions of IFS  (Read 3380 times)
Description: Some simple code to think about how to convert IFS to escape time
0 Members and 1 Guest are viewing this topic.
msltoe
Iterator
*
Posts: 161


« on: April 17, 2011, 09:16:03 PM »

I've been looking at escape time versions of simple IFS fractals. This should help us think about the more complicated ones and 3-D versions. No claim of originality.

Here's the code and then a few pictures:
 
 x=real(z);y=imag(z);
  x=abs(x);y=abs(y);
  x1=x;y1=y;
       
  //Shape to be carved out of square
       
 // if ((x1<0.5)&&(y1<0.5)) {x=100;} // Menger
  if ((y1>0.5)&&(x1>0.5)) {x=100;}  // Viscek Cross
 //  if ((x1>0.875)&&(y1>0.875)){x=100;} // Thicker cross
         
  //Bounding square
  if (x>1.5) {x=100;}
  if (y>1.5) {y=100;}
       
  //Shifting
  x1=floor(x+0.5); if (x1>1) {x1=1;}
  y1=floor(y+0.5); if (y1>1) {y1=1;}     
  x=x-x1;
  y=y-y1;       
      
  //Rotation
  x1=a11*x+a12*y;
  y1=a21*x+a22*y;
       
  //Scaling
  x=3*x1;y=3*y1;
   
  // For now, pixel = 0
  z=x+flip(y);
  z=z+pixel;


* cross.png (13.94 KB, 532x480 - viewed 165 times.)

* h_tile.png (18.64 KB, 532x480 - viewed 172 times.)

* flower_tile.png (133.27 KB, 532x480 - viewed 156 times.)
Logged
visual.bermarte
Strange Attractor
***
Posts: 289


« Reply #1 on: April 18, 2011, 09:54:01 AM »

Hi, sorry but
what is it a12 and a22? 2 parameters/sliders maybe? and pixel?
flip,real and imag are already defined somewhere else?  embarrass

thanks in advance
Logged
msltoe
Iterator
*
Posts: 161


« Reply #2 on: April 18, 2011, 02:54:48 PM »

visual:

A = [ a11 a12
         a21 a22]

A is a matrix transformation. In order to be conformal, it has to be a rotation matrix times a scalar. In the 1st and 2nd pictures, A is the identity matrix. In the 3rd, it is a rotation of 45 degrees.

The pixel is zero in all three pictures. It's hard to find interesting patterns with pixel > 0.

-mile
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  



Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines

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