Loading ...
Sorry, an error occurred while loading the content.

Re: Seed 514 in feTurbulence causes squares

Expand Messages
  • Ryan Richards
    14783, 14862, 14921, 18607, 19537, 19852, and 19955 cause it too. Thirteen found bad seeds should been enough, right?
    Message 1 of 7 , Apr 25, 2013
    • 0 Attachment
      14783, 14862, 14921, 18607, 19537, 19852, and 19955 cause it too. Thirteen found bad seeds should been enough, right?

      --- In svg-developers@yahoogroups.com, "Ryan Richards" <everetthigh@...> wrote:
      >
      > I make game cards ( http://アニメイヘム.com/ ) and use the card's ID number at the seed. Up to about 1800 so far. I was just looking through them one day and saw number 514. I thought it might have been something to do with the JPEG transcoding of the SVG so I redid it. It wouldn't go away. I submitted a bug report to Batik and nothing happened, so I gave up on it. After success in reporting a different bug in Firefox I thought I'd give this one a try. I did test 0 - 9999, and transcoded to PNG. Sorting by file size yielded the culprits. Checking the next 10,000 today. ASV is affected. Thanks for the response.
      >
      > --- In svg-developers@yahoogroups.com, "David Dailey" <ddailey@> wrote:
      > >
      > > Wow! That is very odd. Firefox and Chrome show the squares in the same
      > > locations.
      > >
      > >
      > >
      > > Opera, which, along with IE/ASV, for years has had the most stable and
      > > complete implementation of filters, does not show the oddity, making me
      > > think it is an implementation problem. The last time I looked at Perlin
      > > noise (e.g., [1]), I didn't see anything that should cause those
      > > discontinuities.
      > >
      > >
      > >
      > > Safari doesn't seem to like SVG, as a general principle and, like IE9 shows
      > > a black rectangle. I haven't been able to test in ASV yet.
      > >
      > >
      > >
      > > That FF and Chrome and Inkscape would all behave the same way, suggest that
      > > they all just plugged in the same slightly flawed chunk of underlying source
      > > code. I would suggest submitting a bug report to Firefox and see what those
      > > folks think about the issue.
      > >
      > >
      > >
      > > Interestingly, it happens at all values of numOctaves.
      > >
      > >
      > >
      > > How did you find these funny numbers: 514, 1977, 2337, 4777, 8032, 9615 ?
      > > (They are not a sequence in the Encyclopedia of sequences [2] - I tried just
      > > on a whim.) Did you really try all 10,000 values of seed? A lot of times
      > > with things involving seeds, there is also a modulus, m, and if Euler's
      > > totient function of the seed and the modulus is other than m-1, then you get
      > > funky holes in the periodicity, but, from my experience, those holes are
      > > usually more numerous.
      > >
      > >
      > >
      > > Cheers
      > >
      > > David
      > >
      > >
      > >
      > > [1]
      > > http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselinks/perlin-noise-
      > > math-faq.html
      > >
      > > [2] http://oeis.org/
      > >
      > >
      > >
      > > From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
      > > On Behalf Of Ryan Richards
      > > Sent: Thursday, April 25, 2013 5:30 AM
      > > To: svg-developers@yahoogroups.com
      > > Subject: [svg-developers] Seed 514 in feTurbulence causes squares
      > >
      > >
      > >
      > >
      > >
      > > Seeds 514, 1977, 2337, 4777, 8032, 9615 (only checked 0-10000) cause blank
      > > squares in feTurbulence in Firefox, Inkscape, and Batik. Is it the algorithm
      > > itself or the implementations?
      > >
      > > <svg version="1.1" width="338" height="488"
      > > xmlns="http://www.w3.org/2000/svg">
      > > <defs>
      > > <filter id="Seed">
      > > <feTurbulence type="turbulence" baseFrequency="0.1 0.1" numOctaves="5"
      > > seed="514"/>
      > > </filter>
      > > </defs>
      > > <path d="m0,0 h338 v488 h-338 v-488" filter="url(#Seed)"/>
      > > </svg>
      > >
      > >
      > >
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      >
    • Arif Burhan
      Anyone, Is there a quick way of inverting this image ? ... From: Ryan Richards Subject: [svg-developers] Seed 514 in feTurbulence
      Message 2 of 7 , May 29, 2013
      • 0 Attachment
        Anyone,

        Is there a quick way of inverting this image ?

        --- On Thu, 25/4/13, Ryan Richards <everetthigh@...> wrote:

        From: Ryan Richards <everetthigh@...>
        Subject: [svg-developers] Seed 514 in feTurbulence causes squares
        To: svg-developers@yahoogroups.com
        Date: Thursday, 25 April, 2013, 10:29
















         









        Seeds 514, 1977, 2337, 4777, 8032, 9615 (only checked 0-10000) cause blank squares in feTurbulence in Firefox, Inkscape, and Batik. Is it the algorithm itself or the implementations?



        <svg version="1.1" width="338" height="488" xmlns="http://www.w3.org/2000/svg">

        <defs>

        <filter id="Seed">

        <feTurbulence type="turbulence" baseFrequency="0.1 0.1" numOctaves="5" seed="514"/>

        </filter>

        </defs>

        <path d="m0,0 h338 v488 h-338 v-488" filter="url(#Seed)"/>

        </svg>



























        [Non-text portions of this message have been removed]
      • Arif
        A better attempt -
        Message 3 of 7 , May 29, 2013
        • 0 Attachment
          A better attempt -

          <svg version="1.1" width="600" height="488" xmlns="http://www.w3.org/2000/svg">
          <defs>
          <filter id="Seed">
          <feTurbulence type="turbulence" baseFrequency=".009,.009" numOctaves="15" seed="7"/>
          </filter>
          <path id="pond" d="M 105 250 S 50 150 350 250
          S 250 250 300 290 S 50 350 105 250 " fill="aqua"/>
          </defs>

          <path id="pond" d="M 105 250 S 50 150 350 250
          S 250 250 300 290 S 50 350 105 250 " fill="aquamarine"/>

          <path d="M 105 250 S 50 150 350 250
          S 250 250 300 290 S 50 350 105 250 " filter="url(#Seed)"/>
          </svg>

          --- In svg-developers@yahoogroups.com, "Ryan Richards" <everetthigh@...> wrote:
          >
          > Seeds 514, 1977, 2337, 4777, 8032, 9615 (only checked 0-10000) cause blank squares in feTurbulence in Firefox, Inkscape, and Batik. Is it the algorithm itself or the implementations?
          >
          > <svg version="1.1" width="338" height="488" xmlns="http://www.w3.org/2000/svg">
          > <defs>
          > <filter id="Seed">
          > <feTurbulence type="turbulence" baseFrequency="0.1 0.1" numOctaves="5" seed="514"/>
          > </filter>
          > </defs>
          > <path d="m0,0 h338 v488 h-338 v-488" filter="url(#Seed)"/>
          > </svg>
          >
        • everett_svg
          It was the algorithm. At line 50 of the reference code there needs to be a check to make sure that both [k][i][0] and [k][i][1] are not zero. fix for Batik if
          Message 4 of 7 , Jan 2
          • 0 Attachment
            It was the algorithm. At line 50 of the reference code there needs to be a check to make sure that both [k][i][0] and [k][i][1] are not zero.

            fix for Batik
            if (u == 0 && v == 0) u=v=1;

            or the fix for my JS port of the spec code

                                if (fGradient[k][i][0] == 0 && fGradient[k][i][1] == 0)
                                    {
                                        fGradient[k][i][0] = 1;
                                        fGradient[k][i][1] = 1;
                                    }
          Your message has been successfully submitted and would be delivered to recipients shortly.