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

RE: [svg-developers] Path Animation II

Expand Messages
  • Mathias FATENE
    Hi Alexander, Do you want to normalize the animated or the fixed path ? Can you send me your code. I ll see what i can do. Mathias ... De : Alexander Adam
    Message 1 of 23 , Nov 2, 2003
    • 0 Attachment
      Hi Alexander,
      Do you want to normalize the animated or the fixed path ?
      Can you send me your code. I'll see what i can do.

      Mathias

      -----Message d'origine-----
      De : Alexander Adam [mailto:evolgrafix_aadam@...]
      Envoyé : dimanche 2 novembre 2003 19:45
      À : svg-developers@yahoogroups.com
      Objet : [svg-developers] Path Animation II


      hi!

      I'm still fighting with that animating of a path.
      Is there any script or so out there that lets me "normalize" two
      pathes to each other so that I could animate from the first one to
      the second one by using the d="" attribute .. ?

      thanks,
      alex



      -----
      To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
      -or-
      visit http://groups.yahoo.com/group/svg-developers and click "edit my
      membership"
      ----

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • Alexander Adam
      hi, ... I have a two pathes with a different amount of commands and need to normalize them to be able to animate between them with
      Message 2 of 23 , Nov 2, 2003
      • 0 Attachment
        hi,

        > Hi Alexander,
        > Do you want to normalize the animated or the fixed path ?
        > Can you send me your code. I'll see what i can do.

        I have a two pathes with a different amount of commands and need to
        normalize them to be able to animate between them with <animate
        dur="5s" attributeName="d" from="path 1 points" to="path 2 points"/>

        alex
      • mfatene
        Hi, Since your example is secret, i give you mine : SVG do the job of normalization for you. ...
        Message 3 of 23 , Nov 2, 2003
        • 0 Attachment
          Hi,

          Since your example is secret, i give you mine :

          SVG do the job of normalization for you.

          ------------------------------
          <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
          <!DOCTYPE svg>
          <svg>

          <desc>
          Author : Mathias FATENE
          Object : Path animation
          </desc>

          <g transform="translate(100,50)">
          <path style="fill:green; stroke:rgb(0,0,0); stroke-width:5" d="M 295
          250 L 250 350 L 350 350 L 305 250 z" >
          <animate attributeName="visibility" begin="1s" dur="1s"
          from="visible" to="hidden" fill="freeze"/>
          </path>

          <!-- animation -->
          <path style="fill:red; stroke:rgb(0,0,0); stroke-width:5" d="M 295
          250 L 250 350 L 350 350 L 305 250 z">
          <animate attributeName="d" begin="1s" dur="2s" values="
          M 90 0 L 0 200 L 200 200 L 110 0 z;
          M 295 250 L 250 350 L 350 350 L 305 250 z;" />
          </path>
          </g>
          </svg>
          ---------------------------------------------

          If this is not what you want, i'm sorry, i can't help.

          Mathias

          --- In svg-developers@yahoogroups.com, "Alexander Adam"
          <evolgrafix_aadam@y...> wrote:
          > hi,
          >
          > > Hi Alexander,
          > > Do you want to normalize the animated or the fixed path ?
          > > Can you send me your code. I'll see what i can do.
          >
          > I have a two pathes with a different amount of commands and need to
          > normalize them to be able to animate between them with <animate
          > dur="5s" attributeName="d" from="path 1 points" to="path 2 points"/>
          >
          > alex
        • mfatene
          Another way to have animations smoother, is to user opacity and from= to= rather than values. ==========================
          Message 4 of 23 , Nov 2, 2003
          • 0 Attachment
            Another way to have animations smoother, is to user opacity and
            from="" to="" rather than values.
            ==========================
            <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
            <!DOCTYPE svg>
            <svg>

            <desc>
            Author : Mathias FATENE
            Object : Path animation
            </desc>

            <g transform="translate(100,50)">
            <path style="fill:green; stroke:rgb(0,0,0); stroke-width:5" d="M 295
            250 L 250 350 L 350 350 L 305 250 z" >
            <animate attributeName="opacity" begin="1s" dur="1.99s" from="1"
            to="0" fill="freeze"/>
            </path>

            <!-- animation -->
            <path style="fill:red; stroke:rgb(0,0,0); stroke-width:5" d="M 295
            250 L 250 350 L 350 350 L 305 250 z">
            <animate attributeName="d" begin="1s" dur="2s" from="M 90 0 L 0 200 L
            200 200 L 110 0 z" to ="M 295 250 L 250 350 L 350 350 L 305 250 z" />
            </path>
            </g>
            </svg>

            ===========================
            Mathias




            --- In svg-developers@yahoogroups.com, "mfatene"
            <mathias.fatene@w...> wrote:
            > Hi,
            >
            > Since your example is secret, i give you mine :
            >
            > SVG do the job of normalization for you.
            >
            > ------------------------------
            > <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
            > <!DOCTYPE svg>
            > <svg>
            >
            > <desc>
            > Author : Mathias FATENE
            > Object : Path animation
            > </desc>
            >
            > <g transform="translate(100,50)">
            > <path style="fill:green; stroke:rgb(0,0,0); stroke-width:5" d="M
            295
            > 250 L 250 350 L 350 350 L 305 250 z" >
            > <animate attributeName="visibility" begin="1s" dur="1s"
            > from="visible" to="hidden" fill="freeze"/>
            > </path>
            >
            > <!-- animation -->
            > <path style="fill:red; stroke:rgb(0,0,0); stroke-width:5" d="M 295
            > 250 L 250 350 L 350 350 L 305 250 z">
            > <animate attributeName="d" begin="1s" dur="2s" values="
            > M 90 0 L 0 200 L 200 200 L 110 0 z;
            > M 295 250 L 250 350 L 350 350 L 305 250 z;" />
            > </path>
            > </g>
            > </svg>
            > ---------------------------------------------
            >
            > If this is not what you want, i'm sorry, i can't help.
            >
            > Mathias
            >
            > --- In svg-developers@yahoogroups.com, "Alexander Adam"
            > <evolgrafix_aadam@y...> wrote:
            > > hi,
            > >
            > > > Hi Alexander,
            > > > Do you want to normalize the animated or the fixed path ?
            > > > Can you send me your code. I'll see what i can do.
            > >
            > > I have a two pathes with a different amount of commands and need
            to
            > > normalize them to be able to animate between them with <animate
            > > dur="5s" attributeName="d" from="path 1 points" to="path 2
            points"/>
            > >
            > > alex
          • Alexander Adam
            hi Mathias, No, in your sample there s no nomalization (and viewers are not doing that automatically, that s my problem here), your pathes are all having the
            Message 5 of 23 , Nov 2, 2003
            • 0 Attachment
              hi Mathias,

              No, in your sample there's no nomalization (and viewers are not
              doing that automatically, that's my problem here), your pathes are
              all having the same amount (and even the same types) of commands:

              M 295 250 L 250 350 L 350 350 L 305 250 z
              M 90 0 L 0 200 L 200 200 L 110 0 z
              M 295 250 L 250 350 L 350 350 L 305 250 z

              Alex
            • mfatene
              and yours ?
              Message 6 of 23 , Nov 2, 2003
              • 0 Attachment
                and yours ?

                --- In svg-developers@yahoogroups.com, "Alexander Adam"
                <evolgrafix_aadam@y...> wrote:
                > hi Mathias,
                >
                > No, in your sample there's no nomalization (and viewers are not
                > doing that automatically, that's my problem here), your pathes are
                > all having the same amount (and even the same types) of commands:
                >
                > M 295 250 L 250 350 L 350 350 L 305 250 z
                > M 90 0 L 0 200 L 200 200 L 110 0 z
                > M 295 250 L 250 350 L 350 350 L 305 250 z
                >
                > Alex
              • Alexander Adam
                ... they can have *any* kind and *any* amount of commands.. so they need to be normalized with each other to be used in a smooth animation. alex
                Message 7 of 23 , Nov 2, 2003
                • 0 Attachment
                  --- In svg-developers@yahoogroups.com, "mfatene"
                  <mathias.fatene@w...> wrote:
                  > and yours ?

                  they can have *any* kind and *any* amount of commands.. so they need
                  to be normalized with each other to be used in a smooth animation.

                  alex
                • Mathias FATENE
                  May be you can see normalizedPathSegList at http://www.w3.org/TR/SVG/paths.html#PathElement. good luck Mathias ... De : Alexander Adam
                  Message 8 of 23 , Nov 2, 2003
                  • 0 Attachment
                    May be you can see normalizedPathSegList at
                    http://www.w3.org/TR/SVG/paths.html#PathElement.

                    good luck
                    Mathias
                    -----Message d'origine-----
                    De : Alexander Adam [mailto:evolgrafix_aadam@...]
                    Envoyé : dimanche 2 novembre 2003 23:57
                    À : svg-developers@yahoogroups.com
                    Objet : [svg-developers] Re: Path Animation II


                    --- In svg-developers@yahoogroups.com, "mfatene"
                    <mathias.fatene@w...> wrote:
                    > and yours ?

                    they can have *any* kind and *any* amount of commands.. so they need
                    to be normalized with each other to be used in a smooth animation.

                    alex



                    -----
                    To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
                    -or-
                    visit http://groups.yahoo.com/group/svg-developers and click "edit my
                    membership"
                    ----

                    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                  • Mathias FATENE
                    Hi Alexander, You can look at this axample. It s similar to path morphing. see for that http://www.carto.net/papers/svg/samples/path_morphing.shtml. As it s
                    Message 9 of 23 , Nov 3, 2003
                    • 0 Attachment
                      Hi Alexander,
                      You can look at this axample. It's similar to path morphing. see for that
                      http://www.carto.net/papers/svg/samples/path_morphing.shtml.
                      As it's said in the document :
                      [... There are some constraints for doing path-morphing: Currently you have
                      to use the same number of vertices in both path-elements, and they have to
                      be of the same type (you can't mix Bézier and non-Bézier when they don't
                      appear in the same order in the other path-description. You should also
                      orient both polygons in the same direction (left-right and right-left would
                      produce unwanted results). ...]

                      You can see that i complete the number of vertices to get the same number
                      (L200 200 L200 200). Your script can do that.
                      ----------------------------------------------------------
                      <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
                      <!DOCTYPE svg>
                      <svg style="shape-rendering:geometricPrecision;
                      text-rendering:geometricPrecision; image-rendering:optimizeQuality">

                      <desc>
                      Author : Mathias FATENE
                      Object : Path animation
                      </desc>
                      <!-- animation -->
                      <path style="fill:red; stroke:rgb(0,0,0); stroke-width:5" d="M 295 250 L 250
                      350 L 350 350 L 305 250 z">
                      <animate attributeName="d" calcMode="linear" begin="1s" dur="5s" from="M 100
                      0 L 0 200 L 200 200 L200 200 L200 200z" to ="M 295 250 L 250 350 L 350 350 L
                      310 250 L 305 220 z" />
                      </path>
                      </g>
                      </svg>
                      ------------------------------------------------------------

                      Mathias
                      -----Message d'origine-----
                      De : Mathias FATENE [mailto:mathias.fatene@...]
                      Envoyé : lundi 3 novembre 2003 00:07
                      À : svg-developers@yahoogroups.com
                      Objet : RE: [svg-developers] Re: Path Animation II


                      May be you can see normalizedPathSegList at
                      http://www.w3.org/TR/SVG/paths.html#PathElement.

                      good luck
                      Mathias
                      -----Message d'origine-----
                      De : Alexander Adam [mailto:evolgrafix_aadam@...]
                      Envoyé : dimanche 2 novembre 2003 23:57
                      À : svg-developers@yahoogroups.com
                      Objet : [svg-developers] Re: Path Animation II


                      --- In svg-developers@yahoogroups.com, "mfatene"
                      <mathias.fatene@w...> wrote:
                      > and yours ?

                      they can have *any* kind and *any* amount of commands.. so they need
                      to be normalized with each other to be used in a smooth animation.

                      alex



                      -----
                      To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
                      -or-
                      visit http://groups.yahoo.com/group/svg-developers and click "edit my
                      membership"
                      ----

                      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




                      -----
                      To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
                      -or-
                      visit http://groups.yahoo.com/group/svg-developers and click "edit my
                      membership"
                      ----

                      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                    • Kevin Lindsey
                      Alex. ... 1) Divide each path into a list of sub-paths; a sub-path being from an M/m command to the next Z/z command or to the command before the next M/m
                      Message 10 of 23 , Nov 3, 2003
                      • 0 Attachment
                        Alex.

                        > I'm still fighting with that animating of a path. Is there any
                        > script or so out there that lets me "normalize" two pathes
                        > to each other so that I could animate from the first one to
                        > the second one by using the d="" attribute .. ?

                        1) Divide each path into a list of sub-paths; a sub-path being from an M/m command to the next Z/z command or to the command before the next M/m command, whichever is first.

                        2) Convert each sub-path to a form that uses cubic Béziers or quadratic Béziers only. All path commands can be converted to either of these types, but I'm not sure which type would be better to use.

                        Lines will be easy to convert. Arcs may be a little more challenging, but you may be able to adapt the circle approximation discussion on the SVG Wiki:

                        http://www.protocol7.com/svg-wiki/ow.asp?ThePath

                        For completeness, you will need to determine how to convert quadratic Béziers to cubic or vica versa depending on which Bézier type you decide to use. There's a Perl module (I haven't used it) that shows the math involved:

                        http://www.cpan.org/authors/id/Y/YS/YSAS/ - See Math-Bezier-Convert-0.01.tar.gz

                        3) Now, your paths are in a sort of canonical form. You need to traverse each path's sub-paths (the "to" and the "from" paths) in parallel. Chances are the number of control points will differ. You will need to use a Bézier curve splitting algorithm to add control points to the path with the fewer control points. I believe this is discussed on the Wiki page I mentioned earlier. You will have to come up with some type of heuristic to determine where to add control points.

                        Other challenges involve animating between two paths with a differing number of sub-paths, but this approach sounds do-able.

                        HTH,
                        Kevin
                        KevLinDev - http://www.kevlindev.com

                        [Non-text portions of this message have been removed]
                      • Gavin Kistner
                        ... Alex, if you re just trying to make the animation happen, and the only constraint is that you need the same number of points in the two lines, how about
                        Message 11 of 23 , Nov 3, 2003
                        • 0 Attachment
                          On Nov 3, 2003, at 10:29 AM, Kevin Lindsey wrote:
                          >> I'm still fighting with that animating of a path. Is there any
                          >> script or so out there that lets me "normalize" two pathes
                          >> to each other so that I could animate from the first one to
                          >> the second one by using the d="" attribute .. ?
                          > [...a really nice and proper way to normalize paths that undoubtedly
                          > involves much math...]

                          Alex, if you're just trying to make the animation happen, and the only
                          constraint is that you need the same number of points in the two lines,
                          how about just 'padding' the line which has less points with a bunch of
                          no-movement ones at the end to get the same amount?

                          The animation results may not be what you wanted (the animation will be
                          spreading those points out) but might be Good Enough.


                          --
                          "States have been altered by liquor, by weed; and then hate gets
                          exalted as art falls to greed." -Will Smith, /Born to Reign/
                        • Kevin Lindsey
                          Gavin, ... The math isn t that hard, especially since a lot of it can be found online (in Perl modules for example). A while ago, I had been thinking about the
                          Message 12 of 23 , Nov 5, 2003
                          • 0 Attachment
                            Gavin,

                            > On Nov 3, 2003, at 10:29 AM, Kevin Lindsey wrote:
                            >>> I'm still fighting with that animating of a path. Is there any
                            >>> script or so out there that lets me "normalize" two pathes
                            >>> to each other so that I could animate from the first one to
                            >>> the second one by using the d="" attribute .. ?
                            > [...a really nice and proper way to normalize paths that undoubtedly
                            > involves much math...]

                            The math isn't that hard, especially since a lot of it can be found online
                            (in Perl modules for example).

                            A while ago, I had been thinking about the approach I outlined, so I decided
                            to go ahead and give it a try. The results aren't too bad, but I'm sure I
                            will need to tweak things. I also found that it's helpful to have some
                            utilities that let you restructure path data without altering the final
                            appearance: for instance, converting a clockwise path to a counter-clockwise
                            path.

                            I'll try to get something written up on this so others can make use of it,
                            but here are some early results for those who are interested. Each example
                            starts with two (simple) paths that get converted step by step to paths with
                            an equal number of cubic bézier commands. I still need to try this out on
                            compound paths.

                            http://www.kevlindev.com/dom/path_animation/boxArcSample.svg
                            http://www.kevlindev.com/dom/path_animation/dollarTriangleSample.svg

                            Kevin
                            KevLinDev - http://www.kevlindev.com
                          • Mathias FATENE
                            Hi Kevin, what is the rate to change $ to triangle today ? Mathias ... De : Kevin Lindsey [mailto:kevin@kevlindev.com] Envoyé : jeudi 6 novembre 2003 07:15 À
                            Message 13 of 23 , Nov 5, 2003
                            • 0 Attachment
                              Hi Kevin,
                              what is the rate to change $ to triangle today ?
                              Mathias

                              -----Message d'origine-----
                              De : Kevin Lindsey [mailto:kevin@...]
                              Envoyé : jeudi 6 novembre 2003 07:15
                              À : svg-developers@yahoogroups.com
                              Objet : Re: [svg-developers] Re: Path Animation II


                              Gavin,

                              > On Nov 3, 2003, at 10:29 AM, Kevin Lindsey wrote:
                              >>> I'm still fighting with that animating of a path. Is there any
                              >>> script or so out there that lets me "normalize" two pathes
                              >>> to each other so that I could animate from the first one to
                              >>> the second one by using the d="" attribute .. ?
                              > [...a really nice and proper way to normalize paths that undoubtedly
                              > involves much math...]

                              The math isn't that hard, especially since a lot of it can be found online
                              (in Perl modules for example).

                              A while ago, I had been thinking about the approach I outlined, so I decided
                              to go ahead and give it a try. The results aren't too bad, but I'm sure I
                              will need to tweak things. I also found that it's helpful to have some
                              utilities that let you restructure path data without altering the final
                              appearance: for instance, converting a clockwise path to a counter-clockwise
                              path.

                              I'll try to get something written up on this so others can make use of it,
                              but here are some early results for those who are interested. Each example
                              starts with two (simple) paths that get converted step by step to paths with
                              an equal number of cubic bézier commands. I still need to try this out on
                              compound paths.

                              http://www.kevlindev.com/dom/path_animation/boxArcSample.svg
                              http://www.kevlindev.com/dom/path_animation/dollarTriangleSample.svg

                              Kevin
                              KevLinDev - http://www.kevlindev.com



                              -----
                              To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
                              -or-
                              visit http://groups.yahoo.com/group/svg-developers and click "edit my
                              membership"
                              ----

                              Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                            • Kevin Lindsey
                              ... For those of you who are interested, I have posted some more information on one method for converting the path data of two paths so that you can smoothly
                              Message 14 of 23 , Nov 7, 2003
                              • 0 Attachment
                                I wrote:

                                > I'll try to get something written up on this so others can make use of it

                                For those of you who are interested, I have posted some more information on one method for converting the path data of two paths so that you can smoothly animate between the shapes of the two paths.

                                http://www.kevlindev.com/blog/index.htm
                                http://www.kevlindev.com/dom/path_parser/index.htm

                                Happy SVGin!

                                Kevin
                                KevLinDev - http://www.kevlindev.com

                                [Non-text portions of this message have been removed]
                              • Gavin Kistner
                                ... Kevin, you are too cool :) Nice work, again.
                                Message 15 of 23 , Nov 8, 2003
                                • 0 Attachment
                                  On Nov 7, 2003, at 5:20 PM, Kevin Lindsey wrote:
                                  > For those of you who are interested, I have posted some more
                                  > information on one method for converting the path data of two paths so
                                  > that you can smoothly animate between the shapes of the two paths.
                                  >
                                  > http://www.kevlindev.com/blog/index.htm
                                  > http://www.kevlindev.com/dom/path_parser/index.htm

                                  Kevin, you are too cool :)
                                  Nice work, again.
                                • Alexander Adam
                                  hi Kevin, ... Cool stuff. But I tried with the following two pathes:
                                  Message 16 of 23 , Nov 8, 2003
                                  • 0 Attachment
                                    hi Kevin,

                                    > > http://www.kevlindev.com/blog/index.htm
                                    > > http://www.kevlindev.com/dom/path_parser/index.htm

                                    Cool stuff. But I tried with the following two pathes:

                                    <path d="M150,60 h210 v90 h-210 v-90" fill="none"
                                    stroke="#000000" />
                                    <path d="M360,105 C 360,117 349,128, 329,137 C 310,145 283,150,
                                    255,150 C 227,150 200,145, 181,137 C 161,128 150,117, 150,105 C
                                    150,93 161,82, 181,73 C 200,65 227,60, 255,60 C 283,60 310,65,
                                    329,73 C 349,82 360,93, 360,105" fill="none" stroke="#000000" />

                                    And I get an exception from the script saying this._s is NaN - try
                                    it yourself. Other pathes worked well, great work, but why does the
                                    above path not work ?

                                    Alex
                                  • Alexander Adam
                                    hi kevin (again), Still playing with your stuff. Tried these two pathes:
                                    Message 17 of 23 , Nov 8, 2003
                                    • 0 Attachment
                                      hi kevin (again),

                                      Still playing with your stuff.
                                      Tried these two pathes:

                                      <path d="M60,130 L139,69 L209,119 L169,169 L220,160 L209,189
                                      L180,209 L130,169 L90,160" />
                                      <path d="M67.44,137.44 L146.44,76.44 L216.44,126.44
                                      L176.44,176.44 L227.44,167.44 L216.44,196.44 L187.44,216.44
                                      L137.44,176.44 L97.44,167.44 L81.86,226.98 L108.65,260.46
                                      L81.86,282.79 L29.02,258.23 L26.05,213.58 L10.42,155.53
                                      L11.91,117.58 L69.95,76.65 L105.67,60.28" fill="#CE4444" />

                                      --> I get d1:
                                      "M60,130 C60,130,139,69,139,69 139,69,209,119,209,119
                                      209,119,169,169,169,169 169,169,220,160,220,160
                                      220,160,209,189,209,189 209,189,180,209,180,209
                                      180,209,130,169,130,169 130,169,90,160,90,160

                                      and d2:
                                      M67.44,137.44 C67.44,137.44,146.44,76.44,146.44,76.44
                                      146.44,76.44,216.44,126.44,216.44,126.44
                                      216.44,126.44,176.44,176.44,176.44,176.44
                                      176.44,176.44,227.44,167.44,227.44,167.44
                                      227.44,167.44,216.44,196.44,216.44,196.44
                                      216.44,196.44,187.44,216.44,187.44,216.44
                                      187.44,216.44,137.44,176.44,137.44,176.44
                                      137.44,176.44,97.44,167.44,97.44,167.44
                                      97.44,167.44,81.86,226.98,81.86,226.98
                                      81.86,226.98,108.65,260.46,108.65,260.46
                                      108.65,260.46,81.86,282.79,81.86,282.79
                                      81.86,282.79,29.02,258.23,29.02,258.23
                                      29.02,258.23,26.05,213.58,26.05,213.58
                                      26.05,213.58,10.42,155.53,10.42,155.53
                                      10.42,155.53,11.91,117.58,11.91,117.58
                                      11.91,117.58,69.95,76.65,69.95,76.65
                                      69.95,76.65,105.67,60.28,105.67,60.28

                                      You see point amount is different here but shouldn't your
                                      method "normalize" them --> also set the same amount of points? I
                                      thought it does.. was I wrong or did I do something wrong with my
                                      two pathes here ?

                                      Alex
                                    • Alexander Adam
                                      hi Kevin for the third time ;) I got some cool results now with your stuff but I was finally able to replicate one BIG bug, take these two pathes as p1 and p2
                                      Message 18 of 23 , Nov 8, 2003
                                      • 0 Attachment
                                        hi Kevin for the third time ;)

                                        I got some cool results now with your stuff but I was finally able
                                        to replicate one BIG bug, take these two pathes as p1 and p2 in your
                                        dollar_triangle sample:

                                        <path id="p1"
                                        d="M125,136 L166,156 L146,115 L189,99 L146,84 L166,43
                                        L125,62 L110,19 L95,62 L53,43 L73,84 L30,99 L73,115 L53,156 L95,136
                                        L110,180 L125,136 L125,136"
                                        stroke="green" stroke-width="3" fill="none"/>
                                        <path id="p2"
                                        d="M137,128 L189,99 L137,71 L110,19 L82,71 L30,99
                                        L82,128 L110,180 L137,128 L137,128"
                                        stroke="green" stroke-width="3" fill="none"/>

                                        Now run and you should notify that the whole Internet Explorer / The
                                        ASVG Plugin stopped working!? Looks for me like an endless loop
                                        somewhere or so but couldn't find it.. could you tell me where I
                                        have to fix what to avoid that endless loop ?

                                        thanks a lot,
                                        alex
                                      • Alexander Adam
                                        Kevin, Ignore this issue! I found the solution myself, the path with more points must be always p1 and it works perfectly! Still the two other things left if
                                        Message 19 of 23 , Nov 8, 2003
                                        • 0 Attachment
                                          Kevin,

                                          Ignore this issue! I found the solution myself, the path with more
                                          points must be always "p1" and it works perfectly!
                                          Still the two other things left if you could have a look at them...

                                          alex

                                          > Still playing with your stuff.
                                          > Tried these two pathes:
                                          >
                                          > <path d="M60,130 L139,69 L209,119 L169,169 L220,160 L209,189
                                          > L180,209 L130,169 L90,160" />
                                          > <path d="M67.44,137.44 L146.44,76.44 L216.44,126.44
                                          > L176.44,176.44 L227.44,167.44 L216.44,196.44 L187.44,216.44
                                          > L137.44,176.44 L97.44,167.44 L81.86,226.98 L108.65,260.46
                                          > L81.86,282.79 L29.02,258.23 L26.05,213.58 L10.42,155.53
                                          > L11.91,117.58 L69.95,76.65 L105.67,60.28" fill="#CE4444" />
                                          >
                                          > --> I get d1:
                                          > "M60,130 C60,130,139,69,139,69 139,69,209,119,209,119
                                          > 209,119,169,169,169,169 169,169,220,160,220,160
                                          > 220,160,209,189,209,189 209,189,180,209,180,209
                                          > 180,209,130,169,130,169 130,169,90,160,90,160
                                          >
                                          > and d2:
                                          > M67.44,137.44 C67.44,137.44,146.44,76.44,146.44,76.44
                                          > 146.44,76.44,216.44,126.44,216.44,126.44
                                          > 216.44,126.44,176.44,176.44,176.44,176.44
                                          > 176.44,176.44,227.44,167.44,227.44,167.44
                                          > 227.44,167.44,216.44,196.44,216.44,196.44
                                          > 216.44,196.44,187.44,216.44,187.44,216.44
                                          > 187.44,216.44,137.44,176.44,137.44,176.44
                                          > 137.44,176.44,97.44,167.44,97.44,167.44
                                          > 97.44,167.44,81.86,226.98,81.86,226.98
                                          > 81.86,226.98,108.65,260.46,108.65,260.46
                                          > 108.65,260.46,81.86,282.79,81.86,282.79
                                          > 81.86,282.79,29.02,258.23,29.02,258.23
                                          > 29.02,258.23,26.05,213.58,26.05,213.58
                                          > 26.05,213.58,10.42,155.53,10.42,155.53
                                          > 10.42,155.53,11.91,117.58,11.91,117.58
                                          > 11.91,117.58,69.95,76.65,69.95,76.65
                                          > 69.95,76.65,105.67,60.28,105.67,60.28
                                          >
                                          > You see point amount is different here but shouldn't your
                                          > method "normalize" them --> also set the same amount of points? I
                                          > thought it does.. was I wrong or did I do something wrong with my
                                          > two pathes here ?
                                          >
                                          > Alex
                                        • Kevin Lindsey
                                          Alexander, ... I won t be able to fix this correctly until next week, but I ve put in a temporary fix that gets around the problem for now. ... It appears to
                                          Message 20 of 23 , Nov 8, 2003
                                          • 0 Attachment
                                            Alexander,

                                            > > > http://www.kevlindev.com/blog/index.htm
                                            > > > http://www.kevlindev.com/dom/path_parser/index.htm
                                            >
                                            > Cool stuff. But I tried with the following two pathes: ...
                                            > And I get an exception from the script saying this._s is NaN

                                            I won't be able to fix this correctly until next week, but I've put in a
                                            temporary fix that gets around the problem for now.

                                            > Tried these two pathes: ...
                                            > You see point amount is different here

                                            It appears to work for me now.

                                            > I got some cool results now with your stuff but I was finally able
                                            > to replicate one BIG bug, take these two pathes ...

                                            This too is related to the same code. I'm confident I've found the problem,
                                            but I need a little time to find the correct solution. Basically a root
                                            finder is taking too long to converge in certain cases. I'm not saying this
                                            is a solution, but if you wait a little while, you'll see that the
                                            conversion will complete.

                                            > the path with more points must be always "p1" and it works
                                            > perfectly

                                            Your sample appears to be working with latest revision of code.

                                            Thanks for pointing out these problems. If you run into others, please
                                            email me directly. That way we can spare the list from the line noise.

                                            Kevin
                                            KevLinDev - http://www.kevlindev.com
                                          • Alexander Adam
                                            Kevin, ... please ... noise. Thanks for the temporary Fixes. I look forward to the fix next week, could you notify me at alex.adam at evolgrafix dot com when
                                            Message 21 of 23 , Nov 9, 2003
                                            • 0 Attachment
                                              Kevin,

                                              > Thanks for pointing out these problems. If you run into others,
                                              please
                                              > email me directly. That way we can spare the list from the line
                                              noise.

                                              Thanks for the temporary Fixes. I look forward to the fix next week,
                                              could you notify me at alex.adam'at'evolgrafix'dot'com when its out?

                                              Alex
                                              http://www.svg-cafe.com
                                            • Alexander Adam
                                              Kevin, ... please ... noise. Thanks for the temporary Fixes. I look forward to the fix next week, could you notify me at alex.adam at evolgrafix dot com when
                                              Message 22 of 23 , Nov 9, 2003
                                              • 0 Attachment
                                                Kevin,

                                                > Thanks for pointing out these problems. If you run into others,
                                                please
                                                > email me directly. That way we can spare the list from the line
                                                noise.

                                                Thanks for the temporary Fixes. I look forward to the fix next week,
                                                could you notify me at alex.adam'at'evolgrafix'dot'com when its out?

                                                Alex
                                                http://www.svg-cafe.com
                                              Your message has been successfully submitted and would be delivered to recipients shortly.