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

rounding error in cubic Beziers?

Expand Messages
  • David Dailey
    Hi folks, In the file at http://cs.sru.edu/~ddailey/SwirlRoundPat.svg , I think there should have no gaps between the tiles in the four-tile tessellation. Do
    Message 1 of 3 , Feb 27, 2014

      Hi folks,

       

      In the file at http://cs.sru.edu/~ddailey/SwirlRoundPat.svg , I think there should have no gaps between the tiles in the four-tile tessellation. Do make the gaps visible and truly annoying, I’ve animated a pattern underneath. You’ll note that, as probably expected, the gaps are most pronounced at points of maximum change in slope of the curve.

       

      Before I raise this question of whether or not these gaps should be “acceptable” (I rather think they shouldn’t be, since they are wider than a pixel and reflect rounding error, I think, in the calculation of the coordinates of the Bezier curves) I wanted to see if there are magical controls that could be applied to minimize the problem.

       

      I tried shape-rendering="geometricPrecision" on the single path (re-used rotated, grouped and reused again) thinking that that might tell browsers that I really don’t want the gaps in my tiling, but I haven’t used that before and am not sure I did it right, or if, in fact, it actually does anything.

       

      See also http://cs.sru.edu/~ddailey/fading/slides/animSwirl2c.svg for a fun use of this  particular tessellation.

       

      Cheers

      David

       

       

    • David Dailey
      Oh by the way, both examples are all SMIL (no JavaScript) so the animation is not working in IE (alas), though the gaps between the curves are still visible in
      Message 2 of 3 , Feb 27, 2014
        Oh by the way, both examples are all SMIL (no JavaScript) so the animation
        is not working in IE (alas), though the gaps between the curves are still
        visible in IE.



        D



        From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
        On Behalf Of David Dailey
        Sent: Thursday, February 27, 2014 8:49 AM
        To: svg-developers@yahoogroups.com
        Subject: [svg-developers] rounding error in cubic Beziers?





        Hi folks,



        In the file at http://cs.sru.edu/~ddailey/SwirlRoundPat.svg , I think there
        should have no gaps between the tiles in the four-tile tessellation. Do make
        the gaps visible and truly annoying, I've animated a pattern underneath.
        You'll note that, as probably expected, the gaps are most pronounced at
        points of maximum change in slope of the curve.



        Before I raise this question of whether or not these gaps should be
        "acceptable" (I rather think they shouldn't be, since they are wider than a
        pixel and reflect rounding error, I think, in the calculation of the
        coordinates of the Bezier curves) I wanted to see if there are magical
        controls that could be applied to minimize the problem.



        I tried shape-rendering="geometricPrecision" on the single path (re-used
        rotated, grouped and reused again) thinking that that might tell browsers
        that I really don't want the gaps in my tiling, but I haven't used that
        before and am not sure I did it right, or if, in fact, it actually does
        anything.



        See also http://cs.sru.edu/~ddailey/fading/slides/animSwirl2c.svg for a fun
        use of this particular tessellation.



        Cheers

        David









        [Non-text portions of this message have been removed]
      • israel_eisenberg
        Hi David, d= M 0,384 C 0,-128 1028,384 512,384 C 512,895 1024,-128 512,-128 L 0,-128 z Try replacing 1028 with 1024. Cheers, Israel
        Message 3 of 3 , Feb 27, 2014
          Hi David,

          d="M 0,384 C 0,-128 1028,384 512,384 C 512,895 1024,-128  512,-128 L 0,-128 z"

          Try replacing 1028 with 1024.

          Cheers,
          Israel
        Your message has been successfully submitted and would be delivered to recipients shortly.