## Equable Shapes

A shape is equable if its area is equal to its perimeter. Given ordered coordinates of polygon find whether the shape is equable or not.… Read More »

## LS3/NS3 sphere generation algorithm and its implementation

Given center of the sphere and its radius. your task is to store efficiently all the integer points required to show a sphere on the… Read More »

## Number of Triangles that can be formed given a set of lines in Euclidean Plane

Given a set L = {l1, l2, ………, ln} of ‘n’ distinct lines on the Euclidean Plane. The ith line is given by an equation… Read More »

## Find the Missing Point of Parallelogram

Given three coordinate points A, B and C, find the missing point D such that ABCD can be a parallelogram. Examples : Input : A… Read More »

## Find points at a given distance on a line of given slope

Given the co-ordinates of a 2-dimensional point p(x0, y0). Find the points at a distance L away from it, such that the line formed by… Read More »

## Rotation of a point about another point in C++

We have already discussed the rotation of a point P about the origin in the Set 1 and Set 2. The rotation of point P… Read More »

## Reflection of a point about a line in C++

Let’s first consider a general case where the line is nothing but the X-Axis. We can now definitely say that the conjugate of a point… Read More »

## Program to find Circumcenter of a Triangle

Given 3 non-collinear points in the 2D Plane P, Q and R with their respective x and y coordinates, find the circumcenter of the triangle.… Read More »

## Program to find line passing through 2 Points

Given two points P and Q in the coordinate plane, find the equation of the line passing through both the points. This kind of conversion… Read More »

## Find Corners of Rectangle using mid points

Consider a rectangle ABCD, we’re given the co-ordinates of the mid points of side AD and BC (p and q respectively) along with their length… Read More »

## Find number of diagonals in n sided convex polygon

Given n > 3, find number of diagonals in n sided convex polygon. According to Wikipedia, In geometry, a diagonal is a line segment joining… Read More »

## Represent a given set of points by the best possible straight line

Find the value of m and c such that a straight line y = mx + c, best represents the equation of a given set… Read More »

## Program for Point of Intersection of Two Lines

Given points A and B corresponding to line AB and points P and Q corresponding to line PQ, find the point of intersection of these… Read More »

## Regular polygon using only 1s in a binary numbered circle

Given an array of binary integers, suppose these values are kept on the circumference of a circle at an equal distance. We need to tell… Read More »

## Deleting points from Convex Hull

Given a fixed set of points. We need to find convex hull of given set. We also need to find convex hull when a point… Read More »