Profile cover photo
Profile photo
Sylvain Soliman
« Je vaux ce que je veux. » -- Paul Valéry
« Je vaux ce que je veux. » -- Paul Valéry
About
Sylvain's posts

Post has attachment
So much truth in today's SMBC…

Post has attachment
Unfortunately very true…

Post has attachment
Practical Vim was the best source I've ever found on #vim, no doubt Modern Vim will be nice too as it is specifically oriented towards serious users…

Post has attachment

Post has attachment
This is the first phishing campaign that I know that was organised by credit company itself!

Post has shared content
The actual problem of how to check whether one (possibly non-convex) polygon is contained in another is a bit messy but straightforward. The posted answers (check for boundary crossings) are more or less correct, but you need to be very careful of special cases where a vertex of one polygon lands on a vertex or edge of the other. It can be solved in linear time (theoretically) by Chazelle triangulation rather than the slower plane sweep methods suggested.

I'm linking this here, though, because the answers also contain some nice counterexamples to the overly-naive approach suggested by the original poster. In particular, it's natural to hope that one only has to check whether one polygon's vertices are contained inside the other polygon, but the rightmost of the two examples below shows that's not good enough.

Post has shared content

Post has shared content
Le 22 avril, des scientifiques ont défilé dans 600 villes de toute la planète, contre l'idéologie liberticide et antidémocratique propagée par Donald Trump, et pour la préservation de la planète. Ils étaient 5 000 à Paris, 40 000 à Washington. Ils dénoncent la montée d’une idéologie du mensonge, du mépris des faits et de l’obscurantisme qui s’exprime désormais à la Maison Blanche.

Post has shared content

Post has shared content
Wait while more posts are being loaded