in reply to Re^5: searching polygons not merged
in thread searching polygons not merged

...the circle is trivially easy to compute.

Quite on the contrary, I'd say that it is the bounding box which is trivially easy to compute, whereas the circle is rather straightforward but still needs quite a couple of floating point operations. Both are linear with the number of points, but you just need to write down the subs for both algorithms for a triangle and you'll easily spot the difference.

Regarding performance, I guess that floating point operations are slow compared to if/then/else branching.

Replies are listed 'Best First'.
Re^7: searching polygons not merged
by hippo (Archbishop) on Oct 28, 2018 at 22:52 UTC

    Given a vertex and centre of a regular polygon you have all you need for the circle. Can you explain how it isn't trivial?

      Indeed, this case is trivial. For that you need to know in advance that the polygons are regular - I was still stuck with a general list of polygons, some of which might turn out to be better represented by a circle because they're regular.

        When exactly did we reduce the problem to regular polygons?

        We didn't. But you started the discussion about whether or not circles would be better for regular polygons (octagons was the example you chose). The rest of my posts in this sub-thread have followed from that. HTH.