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

Re: [svg-developers] Re: Computing the convex hull of a set of points

Expand Messages
  • Cameron McCormack
    ... I’m not sure what you mean. Using a transform= on the should work just fine. And if you want to transform the point values themselves, then
    Message 1 of 51 , Jan 31, 2010
    • 0 Attachment
      Francis Hemsher:
      > Looking down the road a bit; where we now want to translate/rotate
      > convex polygons. I cannot find a way to redraw an SVG polygon
      > with new set of points that reflect the translation/rotation.

      I’m not sure what you mean. Using a transform="" on the <polygon>
      should work just fine. And if you want to transform the point values
      themselves, then that should be straightforward. (Just apply the
      transformation matrix that corresponds to the translation/rotation to
      each of the coordinate pairs in points="".)

      > Consequently I use SVG straight path elements as a preferred option.
      > Could you perhaps point me in the right direction that addresses
      > translating/rotating SVG polygons and then re-writing their points to
      > reflect the change?

      You’ll have to elaborate on the problem.

      --
      Cameron McCormack ≝ http://mcc.id.au/
    • HelderMagalhaes
      Hi everyone, ... Just stumbled upon an alternative proposal for doing just that, both in 2D and 3D. According to the author, it seems quite fast when compared
      Message 51 of 51 , Aug 25, 2012
      • 0 Attachment
        Hi everyone,


        --- In svg-developers@yahoogroups.com, Cameron McCormack <cam@...> wrote:
        > Today I had to write some code to determine the convex hull of a set of
        > points (and then inflate that polygon by a small amount) for my project.

        Just stumbled upon an alternative proposal for doing just that, both in 2D and 3D. According to the author, it seems quite fast when compared to other algorithms, so here it is:

        http://mindthenerd.blogspot.co.uk/2012/05/fastest-convex-hull-algorithm-ever.html


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