Competitive programming has always been a thrilling blend of logic, creativity, and the joy of discovering solutions that feel almost magical once they fall into place. As you progress through different topics—dynamic programming, number theory, graph algorithms—you eventually hit a point where standard tricks no longer feel enough. Problems start appearing that ask you to measure distances, detect intersections, maximize areas, simulate movement, or compute boundaries. They feel different, almost geometric in nature. That’s exactly where computational geometry steps in, and that’s where this course begins.
Computational geometry is one of the most elegant branches of competitive programming because it sits at the intersection of pure mathematical intuition and algorithmic ingenuity. It teaches you how to look at space, shapes, and quantities not just as figures on paper, but as entities you can manipulate, compute, and interrogate using code. When you understand computational geometry, you suddenly see patterns in problems that previously felt intimidating or impossibly abstract. You begin to visualize not just data, but spatial behavior. You start to interpret lines, angles, and polygons the way you once interpreted arrays and graphs. And more importantly, you become capable of solving some of the most creative and rewarding problems in competitive programming.
This course of 100 articles is designed to bring you into that world gently, steadily, and deeply. This introduction is your entry point—not into a set of rigid rules or overly formal proofs, but into a mindset. Geometry in programming is not just something you memorize; it’s something you learn to think with. And when you get comfortable thinking in geometric terms, entire categories of problems that once felt distant suddenly become familiar.
Many beginners mistakenly believe that computational geometry is meant only for mathematicians or people naturally inclined toward visualization. That’s not the case at all. In practice, geometry in competitive programming is a matter of patterns, invariants, and careful implementation. You’re not expected to become a master of Euclidean theory or to dive deep into abstract geometry. Instead, you’re learning practical, problem-solving-oriented geometry—the kind that shows up in contests, interviews, and algorithmic challenges all around the world.
At the heart of competitive geometry lies a handful of key ideas: points, vectors, lines, distances, intersections, orientations, angles, and polygons. It sounds simple, almost too simple. But from these basic concepts emerge entire toolkits of techniques used to solve surprisingly complex problems. You’ll see how a simple cross product suddenly becomes the answer to determining which direction a point turns around another, or how computing the orientation of a triplet of points can detect whether two segments intersect. You'll see how something as mundane as projecting a point onto a line opens the door to measuring distances between shapes, or how understanding convexity transforms brute force complexity into elegant optimality.
What makes computational geometry especially fascinating is that every concept is rooted in physical intuition. You can feel geometry—you can imagine it in your mind, draw it on a piece of paper, watch it unfold. Yet implementing these concepts requires precision, careful handling of edge cases, and awareness of numerical behavior. Competitive programmers encounter issues like floating-point errors, precision loss, and boundary cases more often in geometry than in almost any other topic. Learning how to write robust geometric code is a skill in itself, and a valuable one.
As you journey through this course, you’ll develop not only the theoretical understanding required to interpret geometric problems, but also the implementation discipline that allows your solutions to pass even the trickiest hidden tests. Geometry teaches patience, accuracy, and the ability to reason about continuous space while coding in a discrete world. It’s a duality that becomes second nature once you spend enough time with the subject.
One of the biggest rewards of learning computational geometry is realizing how often it appears disguised in problems that might not seem geometric at first glance. A question about maximizing profits becomes a convex hull trick optimization. A problem about arranging objects turns out to require line sweeping. A simulation problem reveals a hidden need for angle sorting. After a while, geometry is no longer just a niche topic—it becomes one of the lenses you naturally use to approach complex problems.
This course aims to help you build that intuitive lens. The first articles will focus on the absolute basics: understanding points as data structures, interpreting vectors as differences of points, and learning how operations like dot products and cross products define geometric behavior. These are your foundational tools, and while they sound mathematical, you’ll quickly see that your code starts feeling more expressive once you master them. A single cross product can tell you orientation, area, intersection behavior, the nature of a polygon—almost like a multi-purpose tool for spatial computation.
As your understanding deepens, you’ll explore lines, segments, and rays—each with subtle differences in behavior. You'll learn how to compute distances between them, how to detect whether two segments intersect, and what to do when intersection endpoints overlap. You’ll also explore circles, tangents, arcs, and the kinds of problems where circular geometry plays a defining role.
From there, the articles will take you into polygons and their properties—convexity, triangulation, area computation, point-in-polygon tests, and the construction of convex hulls. The convex hull, in particular, becomes a recurring concept that unlocks some of the most powerful geometric techniques in competitive programming. It transforms scattered points into a minimal boundary that reflects the shape’s outer profile. It also forms the basis for optimizing computations such as rotating calipers, a beautiful technique that lets you solve problems about farthest distances, minimum bounding rectangles, or diameter calculations with surprisingly little effort.
You’ll also get familiar with line sweep algorithms, which are like taking a broom and sweeping across the plane—tracking events, merging shapes, and detecting critical intersections as you move. Problems that once seemed impossibly complicated suddenly become manageable when broken down into a sequence of sweep-line events. Geometry often rewards this kind of perspective shift, where visualizing movement leads to clarity.
Another core topic that often surprises beginners is the importance of handling floating-point precision correctly. The real world is continuous. Variables in code are not. Understanding how to deal with small epsilons, rounding techniques, and integer-based formulations when possible will help you avoid the pitfalls that trap even experienced programmers. Geometry teaches humility; you learn not to trust floating-point numbers blindly, and you begin to appreciate exact arithmetic whenever it’s available.
By the time you progress through the course, you will find yourself solving geometry problems with the same natural ease you once applied to arrays or graphs. You’ll understand how to combine classic techniques—DP, greedy approaches, binary search—with geometric intuition to solve hybrid problems. You’ll see geometry show up in unexpected places, from game theory to string manipulation, whenever spatial reasoning gives you an advantage.
This course is not about memorizing complicated formulas or relying on abstract mathematical jargon. It’s about shaping your intuition to recognize geometric structure in problems and writing clean, reliable code that reflects that understanding. As you move through the 100 articles, you’ll gradually experience a shift in how you think about space, motion, and boundaries in programming.
Computational geometry might have a reputation for being difficult, but it's difficult in the most rewarding way—where every solved problem feels like you’ve peeled back a layer of how shapes behave in the world of algorithms. It teaches you how to see more deeply, reason more carefully, and craft solutions that feel simultaneously artistic and precise.
By starting this course, you're stepping into one of the most timeless and beautiful areas of competitive programming. Geometry is not just about points and shapes—it’s about learning how to think spatially, reason with clarity, and trust your logic even when the figures become complex. And as you progress, you’ll discover that geometry problems are not just challenges, but opportunities to practice creativity, discipline, and elegance in algorithm design.
Welcome to the world of computational geometry. Let’s explore the shapes, spaces, and structures that will transform not only your problem-solving skills but also the way you think as a competitive programmer.
I. Foundations (20 Chapters)
1. Introduction to Computational Geometry: What and Why?
2. Points, Vectors, and Coordinate Systems
3. Basic Geometric Objects: Lines, Segments, Rays
4. Representing Geometric Objects in Code
5. Distance Calculations: Point-to-Point, Point-to-Line
6. Area of Triangles and Polygons
7. Angles and Trigonometric Functions
8. Cross Product: Geometric Interpretation and Applications
9. Dot Product: Geometric Interpretation and Applications
10. Line Equations: Parametric and Implicit Forms
11. Intersection of Lines and Line Segments
12. Checking if a Point Lies on a Line/Segment
13. Orientation of Three Points: Clockwise or Counterclockwise?
14. Convex and Concave Polygons
15. Simple Polygons: Definition and Properties
16. Representing Polygons: Vertex Lists
17. Basic Geometric Transformations: Translation, Rotation, Scaling
18. Implementing Geometric Transformations in Code
19. Introduction to Floating-Point Arithmetic and Precision Issues
20. Handling Precision Errors in Geometric Computations
II. Intermediate Techniques (25 Chapters)
21. Point in Polygon Test: Ray Casting Algorithm
22. Point in Polygon Test: Winding Number Algorithm
23. Area of a Polygon: Shoelace Formula
24. Centroid of a Polygon
25. Convex Hull: Introduction and Definitions
26. Graham Scan Algorithm: Convex Hull Construction
27. Jarvis' March (Gift Wrapping) Algorithm: Convex Hull
28. Divide and Conquer Algorithm for Convex Hull
29. Line Segment Intersection: Bentley-Ottmann Algorithm
30. Closest Pair of Points: Divide and Conquer Approach
31. Diameter of a Polygon
32. Width of a Polygon
33. Minimum Bounding Box of a Polygon
34. Polygon Clipping: Sutherland-Hodgman Algorithm
35. Triangulation of Polygons: Ear Clipping Method
36. Monotone Polygons: Definition and Properties
37. Trapezoidal Decomposition: Polygon Triangulation
38. Voronoi Diagrams: Introduction and Properties
39. Delaunay Triangulation: Relationship with Voronoi Diagrams
40. Line Arrangements: Introduction and Properties
41. Duality in Geometric Transformations
42. Half-Plane Intersection: Efficient Algorithms
43. Arrangement of Lines: Zone Theorem
44. Geometric Data Structures: Segment Trees for Intervals
45. Range Searching in Geometric Space
III. Advanced Strategies (30 Chapters)
46. Convex Hull: Chan's Algorithm (Optimal)
47. Linear Programming in 2D: Geometric Interpretation
48. Simplex Algorithm: Geometric Intuition
49. Point Location in a Planar Subdivision
50. Persistent Data Structures for Geometric Problems
51. Dynamic Convex Hull Maintenance
52. Kinetic Data Structures: Moving Points
53. Geometric Intersection Problems: Line-Line, Line-Circle, Circle-Circle
54. Minkowski Sum: Geometric Operations
55. Geometric Optimization: Finding the Optimal Solution
56. Rotating Calipers Technique: Applications
57. Smallest Enclosing Circle: Algorithm and Implementation
58. Minimum Area Enclosing Rectangle
59. Geometric Packing Problems: Introduction
60. Geometric Covering Problems: Introduction
61. Visibility Problems: Point Visibility in a Polygon
62. Art Gallery Problem: Introduction
63. Motion Planning: Basic Concepts
64. Robot Motion Planning: Geometric Approaches
65. Computational Geometry Libraries: CGAL, Boost.Geometry
66. Implementing Geometric Algorithms: Code Optimization
67. Handling Degeneracies in Geometric Algorithms
68. Robust Geometric Computation: Techniques
69. Geometric Predicates: Exact Computation
70. Interval Trees: Efficient Range Searching
71. Kd-Trees: Multi-Dimensional Data Structures
72. R-Trees: Spatial Data Structures
73. Quadtrees and Octrees: Hierarchical Spatial Data Structures
74. Geometric Hashing: Efficient Data Retrieval
75. Randomized Algorithms in Computational Geometry
IV. Expert Level & Applications (25 Chapters)
76. Computational Geometry in Higher Dimensions
77. Arrangements of Hyperplanes
78. Convex Polytopes: Properties and Algorithms
79. Geometric Duality: Advanced Concepts
80. Geometric Transformations: Advanced Topics
81. Geometric Data Structures: Advanced Topics
82. Geometric Algorithms: Parallel Implementations
83. Computational Geometry in Practice: Case Studies
84. Applications in Computer Graphics
85. Applications in Robotics
86. Applications in Geographic Information Systems (GIS)
87. Applications in Computer-Aided Design (CAD)
88. Applications in Image Processing
89. Applications in Machine Learning
90. Competitive Programming Strategies: Geometric Problems
91. Debugging Geometric Algorithms: Common Pitfalls
92. Performance Tuning: Geometric Code Optimization
93. Advanced Topics in Voronoi Diagrams and Delaunay Triangulation
94. Mesh Generation: Triangulation and Tetrahedralization
95. Surface Reconstruction: From Point Clouds
96. Computational Geometry Research: Open Problems
97. Quantum Computational Geometry: Introduction
98. The Future of Computational Geometry: Emerging Trends
99. Geometric Deep Learning: Applications
100. Advanced Topics in Geometric Optimization