Geometric Algorithms

  • Last Updated : 21 Mar, 2023

Learn more about Geometric Algorithms in DSA Self Paced Course
Practice Problems on Geometric Algorithms
Recent Articles on Geometric Algorithms

These algorithms are designed to solve Geometric Problems. They require in-depth knowledge of different mathematical subjects like combinatorics, topology, algebra, differential geometry, etc.

For Example: Comparing Slopes of two lines, Finding Equation of a plane etc.


Pattern Printing:

  1. Print lower triangle with alternate ‘*’ and ‘#’
  2. Print the pattern 1*2*5*6 –3*4
  3. Python Program to print the pattern ‘G’
  4. Pascal’s Triangle
  5. Program to print pyramid pattern
  6. Program to print the diamond shape
  7. Hour-glass Pattern
  8. Program to print V and inverted-V pattern
  9. Program to print hollow pyramid, diamond pattern and their modifications
  10. Code to Generate the Map of India (With Explanation)


  1. Program to find the mid-point of a line
  2. Section formula (Point that divides a line in given ratio)
  3. Program to find slope of a line
  4. Program to find line passing through 2 Points
  5. Program for Point of Intersection of Two Lines
  6. Reflection of a point about a line in C++
  7. Find points at a given distance on a line of given slope
  8. Given n line segments, find if any two segments intersect
  9. Count maximum points on same line
  10. Minimum lines to cover all points


  1. Check whether triangle is valid or not if sides are given
  2. Check whether a given point lies inside a triangle or not
  3. C program to find area of a triangle
  4. Check if right triangle possible from given area and hypotenuse
  5. Count Integral points inside a Triangle
  6. Find all angles of a given triangle
  7. Program to find Circumcenter of a Triangle
  8. Number of Triangles that can be formed given a set of lines in Euclidean Plane
  9. Program to calculate area of Circumcircle of an Equilateral Triangle
  10. Program to find third side of triangle using law of cosines

Rectangle | Square | Circle:

  1. Check whether a given point lies inside a rectangle or not
  2. Program for Area And Perimeter Of Rectangle
  3. Find if two rectangles overlap
  4. How to check if given four points form a square
  5. Number of rectangles in N*M grid
  6. Program to find Circumference of a Circle
  7. Program to find area of a circle
  8. Check whether a point exists in circle sector or not
  9. Check if two given circles touch or intersect each other
  10. Program to find area of a Circular Segment
  11. Check if a line touches or intersects a circle
  12. Area of a Circumscribed Circle of a Square
  13. Find minimum radius such that atleast k point lie inside the circle
  14. Angular Sweep (Maximum points that can be enclosed in a circle of given radius)


  1. Number of parallelograms when n horizontal parallel lines intersect m vertical parallellines
  2. Program for Circumference of a Parallelogram
  3. Program to calculate area and perimeter of Trapezium
  4. Program to find area of a Trapezoid
  5. Find all possible coordinates of parallelogram
  6. Maximum area of quadrilateral
  7. Check whether four points make a parallelogram
  8. Find the Missing Point of Parallelogram

3D Objects:

  1. Find the perimeter of a cylinder
  2. Program for Volume and Surface area of Frustum of Cone
  3. Program to calculate volume of Ellipsoid
  4. Program for volume of Pyramid
  5. Calculate volume and surface area of a cone
  6. Calculate Volume and Surface area Of Sphere
  7. Program for Volume and Surface Area of Cuboid
  8. Program for Volume and Surface Area of Cube
  9. Pythagorean Quadruple
  10. LS3/NS3 sphere generation algorithm and its implementation

Polygon and Convex Hull:

  1. How to check if a given point lies inside or outside a polygon?
  2. Area of a polygon with given n ordered vertices
  3. Tangents between two Convex Polygons
  4. Find number of diagonals in n sided convex polygon
  5. Convex Hull using Jarvis’ Algorithm or Wrapping
  6. Quickhull Algorithm for Convex Hull
  7. Deleting points from Convex Hull
  8. Minimum area of a Polygon with three points given

Standard Problems on Geometric Algorithm:

  1. Finding the vertex, focus and directrix of a parabola
  2. Find Simple Closed Path for a given set of points
  3. Number of Integral Points between Two Points
  4. Optimum location of point to minimize total distance
  5. Find perimeter of shapes formed with 1s in binary matrix
  6. Draw geometric shapes on images using OpenCV
  7. Find if it’s possible to rotate the page by an angle or not
  8. Equable Shapes

Quick Links :

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up