Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: fractower on October 04, 2011, 04:34:10 AM




Title: Share your interesting mistakes
Post by: fractower on October 04, 2011, 04:34:10 AM
Hi All

Maybe you made an odd number of sign errors, maybe you mis-declared a float as an int... The real question is why are mistakes often more interesting than successes. Please share your interesting failures. Also try to explain your mistake so we can laugh at you.

To start off the process, I mis-copied the icosahedron coords from Google to produce this  faux pas.


Title: Re: Share your interesting mistakes
Post by: David Makin on October 04, 2011, 03:55:20 PM
Here are a couple of images that came from a mistake with respect to periodicity colouring - for some obscure reason I used abs(|z|-|older value|) instead of |z-older value| and these are a couple of the results (just z^2+c Julias):

An Orchid:
(http://skyscraper.fortunecity.com/terabyte/966/gallery/maing/orchid.jpg)

Orchid 2:
(http://skyscraper.fortunecity.com/terabyte/966/gallery/oldg/orchid2.jpg)


Title: Re: Share your interesting mistakes
Post by: DarkBeam on October 04, 2011, 04:58:52 PM
Probably all my formulas are mistakes (some neither interesting... :evil1: :-\ :D )


Title: Re: Share your interesting mistakes
Post by: lkmitch on October 04, 2011, 05:21:32 PM
Dave, did you make a mistake in posting your image?  A mistake on a mistake thread--does that mean you did it right?   :)


Title: Re: Share your interesting mistakes
Post by: knighty on October 04, 2011, 05:24:15 PM
Inverse iteration julia that gone wrong!  :D
Here is the evaldraw wersion. The original version was in turbo pascal done a loooong time ago ;D.
Code:
() 
{
enum {SIZE=512,PRECALC=100, PARTNUM=10};
static tab[SIZE][SIZE];
static extabr[10000],extabg[10000],extabb[10000];
static expo,HSIZE,QSIZE,i1,j1;

if (numframes==0){
   HSIZE=SIZE/2;
   QSIZE=SIZE/4;
   expo=1.0;expor=0.5;expog=0.5;expob=0.025;
   for (i=0; i<1000;i++){
      extabr[i]=256*(exp(-expor*i/256));
      extabg[i]=256*(exp(-expog*i/256));
      extabb[i]=256*(exp(-expob*i/256));
   }
   i1=0;j1=0;
}

al=alpha(); be=beta();

for(i=0;i<SIZE;i++)
   for(j=0;j<SIZE;j++) tab[i][j]=0;

//cls(255,255,255);
cls(255,255,255);

x=100; y=100; INFRM=-1/1000;
   for (i=0;i<PRECALC;i++)
   {
      a=x-al;
      b=y-be;
      x=sqrt(a*a+b*b);
      y=sqrt((x-a)*0.5);
      x=sqrt((x+a)*0.5);
      if (b<0) y=-y;
      a=rdm();b=rdm();
      x*=a; y*=b;//we should do y*=a instead :)
   }
   do
   {
      for (i=0;i<PARTNUM;i++)
      {
         a=x-al;
         b=y-be;
         x=sqrt(a*a+b*b);
         y=sqrt((x-a)*0.5);
         x=sqrt((x+a)*0.5);
         if (b<0) y=-y;
         a=rdm();b=rdm();
         x*=a; y*=b;//we should do y*=a instead :)
         
         //putpixel(x,y);
         i1=x*QSIZE+HSIZE;
         j1=y*QSIZE+HSIZE;
         tab[i1][j1]+=1;
         c=(1-exp(INFRM*tab[i1][j1]))*1000;
         setcol(extabr[c],extabg[c],extabb[c]);
         setpix(i1,j1);
      };
   }while((al==alpha())&&(be==beta()));
}

rdm()
{
   a=RND;
   if (a>0.5) return 1;
   return -1;
}

alpha()
{
   return 4*(mousx-0.5*xres)/xres;
}

beta()
{
   return 4*(mousy-0.5*yres)/xres;
}

putpixel(x,y)
{
   setpix(x*0.25*xres+0.5*xres,y*0.25*xres+0.5*yres);
}


Title: Re: Share your interesting mistakes
Post by: fractower on October 04, 2011, 05:58:42 PM
David's broken links prove that two wrongs don't make a right, but they do add the humor value. Therefore I am awarding you the "Null Pointer" award. It's after midnight and somewhere in the 2000 lines of code you just wrote in a caffeine induced frenzy is a run away link list. Bless your heart (A colloquialism in the Southern US that translates to "Sucks to be you.")

Darkbeam, Darkbeam, Darkbeam. Bless your heart. Honesty is not the best policy.

Knight gets the "Nan" award. I was originally going to rename it the "Not a nerd" award, but I have been reading your posts. I suspect you could quote the IEEE definition of a nan then argue that the square root of negative one is a perfectly good number in the complex scalar field.



Title: Re: Share your interesting mistakes
Post by: kronikel on October 04, 2011, 06:35:37 PM
I had plenty of these, I'll have to start saving them now.
A mistake in the diamond square algorithm recently carved the sierpenski triangle into my mountainside  :o


Title: Re: Share your interesting mistakes
Post by: Yesiamjames on October 04, 2011, 08:47:35 PM
This is the result of my first attempt at programming a mandelbrot rendering program. I have no freaking idea what this is.

(http://i228.photobucket.com/albums/ee260/m22england/wtf.jpg)


Title: Re: Share your interesting mistakes
Post by: fractower on October 04, 2011, 09:10:24 PM
It looks vaguely familiar. I think it may be a Mandelwhat. For your effort you get the "+inf" award. It has escaped already. Give it a break.


Title: Re: Share your interesting mistakes
Post by: DarkBeam on October 04, 2011, 10:24:28 PM
I had plenty of these, I'll have to start saving them now.
A mistake in the diamond square algorithm recently carved the sierpenski triangle into my mountainside  :o

Leave it! And add also some mandelboxes around (houses) and some mandelbulbs (bushes) ;D


Title: Re: Share your interesting mistakes
Post by: fractower on October 04, 2011, 10:40:22 PM
Quote
I had plenty of these, I'll have to start saving them now.
A mistake in the diamond square algorithm recently carved the sierpenski triangle into my mountainside

Are you sure it was an artifact. It might have been a petroglyph from an ancient tribe of mathematicians.


Title: Re: Share your interesting mistakes
Post by: cKleinhuis on October 04, 2011, 11:45:57 PM
ok, here comes my bit, it happened some years ago, when playing around with hybrid/alternating combinations, and implementing the complex multiplication wrongly:

http://www.fractalforums.com/index.php?action=gallery;sa=view;id=10

(http://nocache-nocookies.digitalgott.com/gallery/0/63_13_03_08_11_22_22_3.jpg)



Title: Re: Share your interesting mistakes
Post by: Sockratease on October 05, 2011, 12:11:29 AM
I'm no programmer any more, but I got this playing with Mandelbulb 3D.  I started with one of my old files and wanted to see what reflections would do to it.

Started it rendering and saw it wanted 3 hours!  So I stopped it.  Then noticed it was high resolution at 1:3 view, so when I set it back to 1:1, and got the usual distortions that causes when interrupting a render, it looked like this:

(http://www.sockrateaze.com/stuff/mistake.png)

Wow.


Title: Re: Share your interesting mistakes
Post by: kronikel on October 05, 2011, 12:34:14 AM
Quote
Are you sure it was an artifact. It might have been a petroglyph from an ancient tribe of mathematicians.
It's all becoming so clear now... ancient mathematicians must have embedded the sierpenski triangle into my mind causing me to subliminally write it into my algorithm!
o.O

@cKleinhuis - That looks like some crazy evil face wearing an upside down cowboy hat


Title: Re: Share your interesting mistakes
Post by: lycium on October 05, 2011, 02:55:12 AM
(http://fc02.deviantart.net/fs30/i/2008/056/6/2/glitch_by_lyc.jpg) (http://lyc.deviantart.com/art/glitch-78435073)

(http://fc08.deviantart.net/fs71/f/2011/023/7/5/ghost_in_the_machine_by_lyc-d37wyxj.jpg) (http://lyc.deviantart.com/art/ghost-in-the-machine-194694103)

(http://fc06.deviantart.net/fs16/f/2007/146/3/e/scaffolding_by_lyc.png) (http://lyc.deviantart.com/art/scaffolding-56214412)


Title: Re: Share your interesting mistakes
Post by: David Makin on October 05, 2011, 05:51:05 AM
I had plenty of these, I'll have to start saving them now.
A mistake in the diamond square algorithm recently carved the sierpenski triangle into my mountainside  :o

I managed that one in about 20 different forms when trying to get my random access location diamond-square formula working ;)


Title: Re: Share your interesting mistakes
Post by: David Makin on October 05, 2011, 05:57:44 AM
David's broken links prove that two wrongs don't make a right, but they do add the humor value. Therefore I am awarding you the "Null Pointer" award. It's after midnight and somewhere in the 2000 lines of code you just wrote in a caffeine induced frenzy is a run away link list. Bless your heart (A colloquialism in the Southern US that translates to "Sucks to be you.")


That's really strange, both images appear for me OK.
But here they are re-posted to my gallery here (I'm not putting the links to the original page because that's on Fortunecity and the pop-ups are most annoying for anyone):

An Orchid
(http://nocache-nocookies.digitalgott.com/gallery/8/141_05_10_11_5_56_17_0.jpeg)

An Orchid2
(http://nocache-nocookies.digitalgott.com/gallery/8/141_05_10_11_5_56_17_1.jpeg)


Title: Re: Share your interesting mistakes
Post by: Adam Majewski on October 23, 2011, 09:19:36 PM
Hi,

http://fraktal.republika.pl/images/mandel_ArgPhi_error2.jpg
It should be external argument
code is  here :
http://fraktal.republika.pl/images/mandel_ArgPhi_error2.bmp.txt
Regards


Title: Re: Share your interesting mistakes
Post by: real_het on December 09, 2011, 12:25:17 AM
Hi!

While playing around with a realime mandelbrot 'fake' zoomer, I've just ran into this interesting side effect:
(http://x.pgy.hu/~worm/het/mandel/Rev/RevMandel_Astronaut.PNG)
(coordinates are on the 'fractaljourneys' blog under the name 'Astronaut')

The thing works like:
At every frame:
- calculate N mandelbrot points on the outline of a small circle (the radius is relative to the current zoom level)
- insert those resulting iterationcount values as a row into a texture (deal with the texture rows like they were a circular buffer)
- map the texture cylindricaly onto a cone
- draw the scene while looking inside that cone

For this 'reverse' effect:
- offset the y texture coordinate into the opposite direction
- decrease the zoom level between the frames

While animating this will look like it zooms in, but for the Mandelbrot calculations it will zoom out (sampling bigger and bigger circles in the set).

There are a few more pictures with the same effect-> http://x.pgy.hu/~worm/het/mandel/Rev (http://x.pgy.hu/~worm/het/mandel/Rev)


Title: Re: Share your interesting mistakes
Post by: Fractal Ken on December 09, 2011, 03:41:35 AM
I misdimensioned the 2d array in a recursive subprogram for computing a Sierpinski carpet. The array needed to be a constant 729x729 in size. Depending on the level of the recursive call, I had it at 729x729, 243x243, 81x81, 27x27, 9x9, 3x3, or 1x1.

(http://i1122.photobucket.com/albums/l540/Fractal_Ken/BotchedSierpCarpet729.png)


Title: Re: Share your interesting mistakes
Post by: woronoi on December 16, 2011, 06:04:32 AM
(http://img-fotki.yandex.ru/get/5603/nik-v-voronin.3/0_6eb44_ab621b47_L.jpg)

(http://img-fotki.yandex.ru/get/5903/nik-v-voronin.4/0_6eb46_51f3268e_XL.jpg)


Title: Re: Share your interesting mistakes
Post by: kronikel on December 20, 2011, 09:50:02 PM
(http://i200.photobucket.com/albums/aa143/kronikel/Bilinearinterpolation.jpg)
One of the more interesting things I came across while writing a simplified Perlin noise function


Title: Re: Share your interesting mistakes
Post by: fractower on December 20, 2011, 11:06:32 PM
Nice one Kronikel. Aliasing can be beautiful. Did you find any more of your Sierpinski petroglyphs?   


Title: Re: Share your interesting mistakes
Post by: Kali on December 21, 2011, 02:13:57 AM
I got this trying to render a 3D Ducks-like formula with a linear combination of two orthogonal 2D, using Trafasel's Gestaltlupe.
I later discovered a mistake in the bailout checking sentence, but I can't remember exactly what it was (I make a lot of mistakes so it's hard to remember an specific one  ;D)

(http://img197.imageshack.us/img197/3846/data21pic10280.jpg)


Title: Re: Share your interesting mistakes
Post by: DarkBeam on December 21, 2011, 10:45:54 AM
Looks very cool, and it's puzzling as it's hard to see what's inside and what out :)


Title: Re: Share your interesting mistakes
Post by: kronikel on December 22, 2011, 04:03:22 AM
I haven't found any more Sierpenski petroglyphs but I found some more spiral type fractals with this new Perlin noise function.
I find it pretty cool that I find fractals even in things that are seemingly totally unrelated to fractals.