C/C++ Programs for Geometric Algorithms
Last Updated :
31 Jul, 2024
Improve
Geometric algorithms are used to solve geometric problems in programming. These algorithms find their use in many domains such as computer graphics, computational geometry, computer vision, robotics, and simulation.
In this article, we will discuss some of the common Geometric algorithms in C/C++.
Geometrical Practice Problems in C/C++
The following is the list of C/C++ programs based on the level of difficulty:
Easy
- Check Whether a Straight Line can be Formed Using N Co-ordinate Points
- Find if Two Rectangles Overlap
- Maximum Number of 2×2 Squares that can be Fit Inside a Right Isosceles Triangle
- Minimum Lines to Cover All Points
- Find N Random Points Within a Circle
- Minimum Cuts Required to Divide the Circle into Equal Parts
- Find Perimeter of Shapes Formed with 1s in Binary Matrix
- Number of Rectangles in a Circle of Radius R
- Area of Intersection of Two Circles
- Circle and Lattice Points
Medium
- Find K Closest Points to the Origin
- Number Of Integral Points Between Two Points
- How to Check if Given Four Points Form a Square
- Check if any Point Overlaps the Given Circle and Rectangle
- Area of the Largest Rectangle Possible from Given Coordinates
- Queries on Count of Points Lie Inside a Circle
- Find Maximum Volume of a Cuboid From the Given Perimeter and Area
- Find the Missing Point of Parallelogram
- Find Corners of Rectangle Using Mid Points
- How to Check if Two Given Line Segments Intersect?
Hard
- How to Check if a Given Point Lies Inside or Outside a Polygon?
- Count Integral Points Inside a Triangle
- Closest Pair of Points | O(nlogn) Implementation
- Given N Line Segments, Find if Any Two Segments Intersect
- Count Maximum Points on Same Line
- Convex Hull Using Jarvis’ Algorithm or Wrapping
- Convex Hull Using Graham Scan
- Maximum Number of Intersections Possible for any of the N Given Segments
- Angular Sweep (Maximum Points that can be Enclosed in a Circle Of Given Radius)
- Represent a Given Set of Points by the Best Possible Straight Line