Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, HN front page! Ok, will describe the algorithm. One moment...


Ok, I have put a description of the algorithm above the comment section.


How do you calculate that percentage, do you brute force it or do you have a formula that estimates or exactly gives the percentage?

Also, do you allow the result of the division to be near a gaussian integer, or do you do an exact floating point equals?


I brute force it up to n sample points. For the first image n was 100.

Yes, I allow the result to be near a gaussian integer. For the first image I counted everything as a gaussian integer where (real%1<0.1 && imaginary%1<0.1)


Cool, how high up the gaussian integers do you go to get that sort of detail?


For the first image up to 100+100i. Please be aware, that I only use gaussian integers of the form x+xi where the real and imaginary part are the same. Im not sure if that is clear from my description. If there is demand, I can put up the source. Its Javascript.


yes please, put the javascript source.


You have the 4000x4000 file with a jpg suffix but it is actually a png? I ran the image through pngcrush and it decreased the file size by 50%. You might want to do the same and save on bandwidth / page loading...

  $ du -sh fractal* 
  14M	fractal-optim.png
  27M	fractal.png


You are right! I had a png and a jpg version and uploaded the wrong one. Now the jpg is up. Thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: