Title: Infinitized (Sierpinski) fold using bitwise operators Post by: DarkBeam on January 27, 2015, 11:24:09 AM This type of fold is totally new.
The idea is to add a fractal level to Tglad's Mandelbox without heavy job for the CPU. To do so we could exploit the floating point structure that is "sierpinski like" if you think about it. (Yes really I am that insane :D ) In fact fp numbers are structured like... (Sign)(Exponent)(Mantissa) If you can fold the mantissa preserving the exponent you can get a fractal fold :evil1: It is definitely not as easy as it seems too bad. But I was able to do it! Now suppose to define some constants. If you use doubles, they must have the same size. But you set directly their bits not their value! SEXP contains the bits of Sign and Exp. all on. If you use double they are dwords in 32 bit machines. So SEXP = 0xFFF00000 00000000 SEXP_parity is its "parity bit"= 0x00100000 00000000 Nbits is the number of bits turned on in SEXP... but - 1. Count them :P Okay so... the code is this Code: x = x / foldl; // user defined Very hackish. And proud :) enjoy! Title: Re: Infinitized (Sierpinski) fold using bitwise operators Post by: cKleinhuis on January 27, 2015, 11:40:24 AM so, where is the pretty picture ???
Title: Re: Infinitized (Sierpinski) fold using bitwise operators Post by: DarkBeam on January 27, 2015, 11:43:14 AM :tease:
Too bad I haven't got it because MB is not a function plotter ;) I cannot even post a picture of the fractal because I am using my tablet now ;) Btw it's the fold used in Amazing Surf 2 (latest version) Title: Re: Infinitized (Sierpinski) fold using bitwise operators Post by: KRAFTWERK on January 27, 2015, 12:22:58 PM so, where is the pretty picture ??? I like the code! O0 Title: Re: Infinitized (Sierpinski) fold using bitwise operators Post by: DarkBeam on January 28, 2015, 07:10:25 PM Here is a picture (hopefully pretty? Chris? ;D) - btw, here fold is different from the one illustrated above!
The fold center is moved to the borders before applying infinitization. The result is awe (I think) (http://nocache-nocookies.digitalgott.com/gallery/16/4162_28_01_15_7_08_06.jpeg) Title: Re: Infinitized (Sierpinski) fold using bitwise operators Post by: quaz0r on January 29, 2015, 03:18:45 AM mmm its pretty :)
Title: Re: Infinitized (Sierpinski) fold using bitwise operators Post by: knighty on February 05, 2015, 07:53:41 PM Looks good!
Title: Re: Infinitized (Sierpinski) fold using bitwise operators Post by: DarkBeam on February 06, 2015, 12:56:01 AM Thanks again fold genius :) |