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

How would I “inflate” a polygon? That is, I want to do something similar to this: The requirement is that the new (inflated) polygon’s edges/points are all at the same constant distance from the old (original) polygon’s (on the example picture they are not, since then it would have to use arcs for inflated vertices, … Read more

How do CSS triangles work?

There’re plenty of different CSS shapes over at CSS Tricks – Shapes of CSS and I’m particularly puzzled with a triangle: #triangle-up { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red; } <div id=”triangle-up”></div> How and why does it work? 2 22 CSS Triangles: A Tragedy in … Read more