## Find the original coordinates whose Manhattan distances are given

Given the Manhattan distances of three coordinates on a 2-D plane, the task is to find the original coordinates. Print any solution if multiple solutions… Read More »

## Equation of straight line passing through a given point which bisects it into two equal line segments

Given a straight line which passes through a given point (x0, y0) such that this point bisects the line segment in two equal line segments.… Read More »

## Length of the normal from origin on a straight line whose intercepts are given

Given the intercepts of a straight line on both the axes as m and n. The task is to find the length of the normal… Read More »

## Slope of the line parallel to the line with the given slope

Given an integer m which is the slope of a line, the task is to find the slope of the line which is parallel to… Read More »

## Find foot of perpendicular from a point in 2 D plane to a Line

Given a point P in 2-D plane and equation of a line, the task is to find the foot of the perpendicular from P to… Read More »

## Check whether two straight lines are orthogonal or not

Given two line segments AB and CD having A(x1, y1), B(x2, y2), C(x3, y3) and D(x4, y4). The task is to check whether these two… 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 »

## 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 »

## Given n line segments, find if any two segments intersect

We have discussed the problem to detect if two given line segments intersect or not. In this post, we extend the problem. Here we are… Read More »

## How to check if two given line segments intersect?

Given two line segments (p1, q1) and (p2, q2), find if the given line segments intersect with each other. Before we discuss solution, let us… Read More »