Skip to content
Simple C++ program for basic geometry
C++ C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Computational Geometry Library

C++ program for performing computational geometry on circles and rectangles. My functions take in parameters which represent points on the shapes. My program can find circumference, area, perimeter, the distance between two points, and the distance squared between two points. The distance squared function is necessary to make finding the area of the circle more efficient.


  • xc: x-value of circle's center
  • yx: y-value of circle's center
  • xe: x-value of a point on the circle
  • ye: y-value of the same point on the circle


  • xu: x-value of lower-left point on rectangle
  • yu: y-value of lower-left point on rectangle
  • xur: x-value of upper-right point on rectangle
  • yur: y-value of upper right point on rectangle


  • x1: x-value of point 1
  • y1: y-value of point 1
  • x2: x-value of point 2
  • y2: y-value of point 2
You can’t perform that action at this time.