Geometry has always held a certain quiet charm in the world of competitive programming. It doesn’t roar like graph theory, nor does it have the elegant mathematical polish of number theory, yet it consistently stands its ground as a topic that rewards clarity of thought and a strong visual imagination. Whenever you encounter a geometry problem in a contest, it feels as though the problem is inviting you to pause for a moment, step back, and observe the world differently—shapes, distances, angles, intersections, symmetrical patterns, and boundaries suddenly become tools you must wield with precision. And at the center of that entire universe of geometric reasoning lie the simplest entities of all: the basic shapes and their properties.
Despite appearing elementary, these shapes—circles, triangles, rectangles, squares, polygons, lines, segments, and points—quietly carry a surprising amount of depth. They appear in problems involving distances, coverings, minimal paths, collision detection, coordinate geometry, optimization, simulation, and even in advanced computational geometry algorithms. Sometimes, they show up explicitly, like in a problem asking for the area of a strange polygon or the radius of a circle passing through specific points. Other times, they hide subtly behind the scenes in problems whose statements don’t mention geometry at all, yet the solution emerges only when you “see” the geometry within the data.
This course begins at the true foundation—basic shapes and the properties that define them—not because they are the easiest part of geometry, but because almost every higher-level concept relies on these fundamentals. In competitive programming, a strong foundation isn’t optional. It’s the difference between wrestling with a geometry problem for hours and solving it with calm confidence. As you progress through these articles, you’ll discover that understanding the geometry of simple shapes unlocks an entire world of computational techniques and strategies.
At first glance, a shape like a triangle seems almost too basic to require detailed study. After all, triangles are probably one of the first things you learned to draw as a child. But in competitive programming, a triangle becomes a remarkably powerful entity. The sum of its angles, the relationships between its sides, the presence of special points like the centroid or circumcenter, and formulas like Heron’s aren’t just theoretical facts—they become tools you might rely on in countless challenges. Whether you're calculating the area of a region formed by multiple triangles, determining possible point positions from distances, or ensuring that a path does not intersect a triangular boundary, the properties of triangles remain indispensable.
The same goes for circles. Circles appear in problems about sensors, communication ranges, covering points, computing intersections, analyzing motion, or determining whether paths collide. A circle’s radius, center, chord lengths, tangents, sectors, arcs, and the delicate relationship between angles and arcs become part of your daily problem-solving vocabulary. Even something as simple as the formula for distance between two centers of circles can become the decisive step in a multi-testcase problem where you must determine how many circles intersect or touch.
Rectangles and squares, though they seem banal, are the backbone of many grid-based or axis-aligned problems. Bounding boxes, overlapping areas, coordinate compression, spatial partitioning, and collision detection often come down to how well you understand these shapes. Many problems that at first seem purely combinatorial or simulation-based turn out to hinge on whether you can model interactions within axis-aligned rectangles or detect whether a set of points lies within a particular region.
Polygons, meanwhile, open the door to some of the most wide-ranging applications in computational geometry. From simple convex or concave polygons to more intricate shapes, the properties you learn early on—edges, vertices, internal angles, traversal directions, orientations, area formulas, and winding direction—will later help you tackle tasks involving convex hulls, point-in-polygon checks, triangulation, or computing intersections. Much of competitive geometry is built on translating a complex scenario into a polygonal representation and then analyzing its structure.
But before you race ahead into the more sophisticated topics, it’s important to cultivate a certain mindset: geometry in competitive programming is not calculation-driven; it’s insight-driven. The beauty of geometric thinking lies in its ability to transform a raw problem into a visual story. A good geometric solution often begins by sketching out the shape—mentally or on paper—and asking the right questions. What’s the most important property of this shape? Which relationships matter? Is symmetry present? Can distance or projection simplify the expression? Are there invariants that hold even if the shape becomes part of a dynamic process?
One of the motives behind building this 100-article course is to help you internalize these patterns of thought. Instead of memorizing formulas, you’ll start to understand the relationships that give these formulas meaning. Instead of fearing geometric transformations, you’ll grow comfortable visualizing rotations, translations, reflections, or scalings in the coordinate plane. Instead of feeling overwhelmed by the wordiness of typical geometry problem statements, you’ll learn to see the underlying shapes and decode what the problem wants from you.
In competitive programming, the geometry portion often tests both your analytical precision and your ability to avoid errors. A small oversight—like mixing up orientation in a polygon, forgetting to handle collinear points, or misinterpreting a boundary condition—can lead to a wrong answer even if the main idea is correct. This is why learning the properties of basic shapes from the ground up matters: the stronger your grasp of the basics, the smaller your margin of error becomes. Many participants avoid geometry problems altogether because they believe the domain is prone to tricky edge cases or floating-point inaccuracies. But those difficulties become manageable once you deeply understand how shapes behave and how geometric computations should be approached algorithmically.
Throughout this learning journey, you will explore each shape not merely as a mathematical object but as a computational entity. You will learn how to represent them using coordinates, vectors, and equations. You will understand how precision must be handled—especially when working with floating-point arithmetic—and why sometimes integer geometry or rational representations offer safer alternatives. You will see why orientation tests, dot products, and cross products play such a significant role. You’ll learn how to determine if shapes intersect, how to measure distances and angles efficiently, how to compute areas robustly, and how to reason about spatial relationships in two dimensions.
These fundamental skills will later empower you to solve advanced tasks: constructing convex hulls, detecting collisions, clipping polygons, simulating movements, performing range queries on geometric structures, analyzing visibility, or computing minimal enclosures. Each of those higher-level techniques emerges naturally from the understanding you build right at the beginning.
Another unique strength of geometry problems is their ability to draw you into a slow, deliberate form of reasoning. Unlike dynamic programming or graph algorithms, where patterns sometimes reveal themselves through experience, geometry relies heavily on visualization. And visualization improves steadily with practice. This course aims to build that practice layer by layer. You’ll work with triangles until they feel like old friends whose behavior you can predict. You’ll handle circles with ease, understanding their every property. You’ll treat lines and segments not as abstract notions but as consistent computational tools for solving problems of direction, projection, and intersection.
One of the most interesting and underrated aspects of geometric reasoning is that it can change how you perceive real-world problems too. Many competitive-programming problems are inspired by real models—mapping regions, analyzing the movement of robots, partitioning land, measuring coverage, detecting obstacles, or arranging objects efficiently. Basic geometric shapes sit quietly behind all of them. When you begin to see how these shapes behave in theoretical problems, you simultaneously start understanding how they might behave in real physical scenarios. And that makes you not just better at solving contest problems but also better at appreciating mathematical structure in the world around you.
As you move through this course, you’ll also encounter a gentle mix of intuition-building and computational rigor. Some articles will guide you through tangible intuition—imagining how a shape responds when rotated or scaled—while others introduce precise, formal approaches for calculating properties like area, perimeter, distance, or intersections. Both aspects are essential and inseparable. Good geometry solutions rarely rely solely on intuition or solely on formulas; they blend the two gracefully.
In essence, beginning with basic geometric shapes is not a simplistic start—it is the most strategic one. Everything that comes later will be easier, clearer, and more enjoyable once you’ve absorbed the core properties and learned to think geometrically with them. The entire discipline of computational geometry is built upon these foundations, and competitive programming, with its diverse set of challenges, rewards those who master them.
This course invites you to strengthen your fundamentals, expand your capacity for visual reasoning, and develop a calm confidence when facing geometry problems. It will guide you across a landscape of shapes and properties, revealing how even the simplest figures can lead to elegant and effective solutions. As you progress, you’ll find yourself not only solving geometry problems more efficiently but also experiencing a newfound appreciation for the subtle relationships that govern shapes.
Ultimately, mastering basic geometric shapes and their properties offers far more than just another topic to check off your list. It gives you a deeper understanding of the spatial world, improves your clarity of thought, and equips you with tools that remain useful across countless problems and contexts. Whether a contest problem asks you to compute the area of a complicated region, detect whether objects overlap, trace the motion of points, or simply understand how boundaries interact, your knowledge of these basic shapes will be your most reliable companion.
This journey through 100 articles begins with the essentials not because they are easy, but because they are indispensable. And once the basics become part of your natural thinking, you’ll find that geometry—once seen as intimidating—turns into one of the most delightfully logical and rewarding domains in competitive programming.
1. Introduction to Geometry in Competitive Programming
2. The Importance of Geometric Shapes in Algorithm Design
3. Basic Geometric Shapes: A Quick Overview
4. Points: The Building Blocks of Geometry
5. Basic Properties of Points in 2D and 3D
6. Understanding Line Segments and Their Properties
7. Basic Terminology in Geometry: Angles, Lengths, and Areas
8. Euclidean Distance and Its Applications
9. Introduction to 2D Geometry in Competitive Programming
10. Understanding the Cartesian Coordinate System
11. Basic Geometric Shapes: Circles, Triangles, and Squares
12. Perimeter and Area of Simple Shapes
13. Simple Geometry Problems: Point Inside a Circle or Square
14. Understanding Triangles: Sides, Angles, and Area
15. Types of Triangles: Equilateral, Isosceles, and Scalene
16. Properties of Rectangles and Squares
17. The Pythagorean Theorem and Its Applications
18. Area of a Triangle Using Base and Height
19. Calculating the Area of a Circle
20. Basic Coordinate Geometry: Midpoint, Slope, and Distance
21. Slope of a Line: Definition and Calculation
22. Equation of a Line: General Form and Slope-Intercept Form
23. The Role of Geometry in 2D Algorithms
24. Symmetry in Geometric Shapes
25. Perimeter of Polygonal Shapes: A Basic Introduction
26. Angle Calculation in Geometric Shapes
27. Introduction to Convex and Concave Polygons
28. Area of Polygons: The Shoelace Theorem
29. Basic Geometric Shapes in 3D: Spheres, Cubes, and Rectangular Prisms
30. Volume of Geometric Shapes in 3D
31. Point-in-Polygon Problem: Introduction and Basic Algorithms
32. Line Intersection in 2D Geometry
33. Basic Geometric Shapes in Competitive Programming Problems
34. Orientation of Points in 2D Space
35. Introduction to Convex Hulls in 2D
36. Angle Between Two Lines in 2D
37. Computing Distance from a Point to a Line
38. Geometry on a Grid: Integer Coordinates
39. Dealing with Precision in Floating Point Geometry
40. Computational Geometry for Basic Shape Analysis
41. Applications of Basic Geometric Shapes in Algorithms
42. Introduction to Convex Polygons
43. Finding the Circumcenter of a Triangle
44. Angle Bisectors and Their Importance
45. Understanding Diagonal Lengths in Rectangles and Squares
46. The Convex Hull Algorithm: Theory and Applications
47. Properties of Convex Shapes and Convex Hulls
48. Introduction to 2D Sweep Line Algorithms
49. Finding the Closest Pair of Points in 2D Space
50. Area of a Triangle Using Coordinates (Shoelace Formula)
51. Geometry and Search Algorithms in Competitive Programming
52. Advanced Triangle Area Calculations (Heron’s Formula)
53. Geometric Transformations: Scaling, Rotation, and Translation
54. Reflection and Rotation of Geometric Shapes
55. Geometrical Properties of Regular Polygons
56. Understanding and Computing the Incenter of a Triangle
57. Computational Geometry in the Plane: An Overview
58. Circle-Circle and Line-Circle Intersection Problems
59. Point-in-Polygon Problem: Efficient Algorithms
60. Computational Geometry and the Line Sweep Technique
61. Geometric Search: Range Queries and Querying 2D Space
62. Finding the Intersection of Two Segments
63. Efficient Calculation of the Angle Between Two Vectors
64. Convex Hull Algorithms: Graham Scan vs. Andrew’s Algorithm
65. Geometry in Higher Dimensions: Beyond 2D and 3D
66. Bounding Boxes and Their Applications
67. Finding the Closest Pair of Points in Higher Dimensions
68. Handling Precision Issues in Geometric Calculations
69. Polygon Triangulation: Basics and Algorithms
70. Area of Complex Polygons Using Geometric Algorithms
71. Algorithms for Finding Geometrically Valid Points in a Polygon
72. Geometric Properties of Ellipses and Their Applications
73. Geometric Properties of Parabolas and Hyperbolas
74. Rotating Calipers: Applications and Algorithms
75. Duality in Computational Geometry: Introduction and Basics
76. Geometric Algorithms for Point Set Problems
77. Understanding Voronoi Diagrams and Delaunay Triangulation
78. Line Intersection Algorithms: Bentley-Ottmann Algorithm
79. Handling Collinearity in Geometry Problems
80. Geometric Algorithms for Polygon Intersection and Union
81. Geometric Properties of Conic Sections
82. Understanding Centroids in Geometry
83. Point Location Algorithms in Geometrical Space
84. Computational Geometry for Spatial Data Structures
85. Efficient Search for Geometrical Range Queries
86. Circle-Polygon Intersection Problem
87. Geometric Data Structures: Quadtrees and K-D Trees
88. Computing the Area of a Polygon Using Trapezoidal Decomposition
89. Point Location in Triangulated Polygons
90. Triangulation of Polygons: Algorithms and Applications
91. Advanced Convex Hull Algorithms: Chan’s Algorithm
92. Computational Geometry with Uncertainty: Robust Algorithms
93. Geometric Range Queries in Multi-Dimensional Spaces
94. Complex Geometrical Operations in 3D: Intersection, Distance, and Volume
95. Solving Geometric Problems with Linear Programming
96. Efficient Algorithms for Geometrical Query Processing in 3D
97. Minkowski Sum and Geometrical Operations on Polygons
98. Computational Geometry in Higher Dimensions: Theoretical Foundations
99. Geometric Algorithms for Motion Planning in Robotics
100. Applications of Geometric Algorithms in Machine Learning