This week, I will be hosting a session on Geometry at the IIIT-H programming club, where I plan to discuss a few techniques and problems.
At first sight, computational geometry might seem very hard and intimidating. But once you familiarize yourself with some basic tools and tricks, you’ll become a geometry expert! Let’s break the myth “geometry is hard” together!
It is very important to have a clean, well-tested geometry library/template. It is very easy to make minor errors when coding up geometry solutions - precision issues, edge cases, division by zero etc. So a easy-to-use, modular library helps a lot in writing quick and painless solutions.
You do not have to make your own library from scratch. You can just use an existing one (I just use KACTL, with few tweaks), or you can modify them to adapt to your style, add more primitives etc.
Also, using vector geometry makes life a lot simpler, compared to co-ordinate geometry. Dot and cross products etc. make your derivations super simple and clean.
Warning: These are from team contests. If you plan to practice them virtually later, avoid opening the problem/solution links.
Problem: ICPC WF 2020, Problem C. Domes
Solution: My Blog
Problem: ICPC WF 2020, Problem F. Ley Lines
Solution: My Blog
Problem: 2020-2021 ICPC Latin American Regional Programming Contest, Problem I. Impenetrable Wall
(full contest)
Solution: Editorial Blog, Full Solution
Problem: ICPC WF 2020, Problem N. What’s Our Vector, Victor?
Solution: Blog by Franklin_W