An algorithm for inflating/deflating (offsetting, buffering) polygons

I thought I might briefly mention my own polygon clipping and offsetting library – Clipper. While Clipper is primarily designed for polygon clipping operations, it does polygon offsetting too. The library is open source freeware written in Delphi, C++ and C#. It has a very unencumbered Boost license allowing it to be used in both … Read more

How to determine if a list of polygon points are in clockwise order?

Some of the suggested methods will fail in the case of a non-convex polygon, such as a crescent. Here’s a simple one that will work with non-convex polygons (it’ll even work with a self-intersecting polygon like a figure-eight, telling you whether it’s mostly clockwise). Sum over the edges, (x2 − x1)(y2 + y1). If the … Read more

How can I determine whether a 2D Point is within a Polygon?

For graphics, I’d rather not prefer integers. Many systems use integers for UI painting (pixels are ints after all), but macOS, for example, uses float for everything. macOS only knows points and a point can translate to one pixel, but depending on monitor resolution, it might translate to something else. On retina screens half a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)