You're given a list of lines in the plane (which don't intersect) and a point.

The question is, which lines are seen from the point. (We can see the line if we can see more than 1 point of it.)

Any-one any idea???

## Lines and a point

**Moderator:** Board moderators

1. First convert all the points into polar co-ordinate system taking the given point as origin.

2. Sort all the points by their angles.

3. Now between two consecutive points, draw a big enough line segment from the origin and determine which line it intersects first. Mark that line.

There may be some special cases to take care of, I guess.

Regards

Sanny

if no 2 lines intersect, they are all paralell

if u have your lines in form y=m

if u have your lines in form y=m

*x+n**(if not u can get to this from other forms). lines are paralell so m[0]=m[1]=...=m[max-1] = (notation) mm.*

there is only one line y=mm*x+a that contains your point (use x,y coordinates of point to find a=?).

the lines seen are the greatest nthere is only one line y=mm*x+a that contains your point (use x,y coordinates of point to find a=?).

the lines seen are the greatest n

*smaller then a and the smallest n**greater then a.*

if there is a line that has nif there is a line that has n

*==a, i guess it has two visible points (the ones just near your point) and the other two lines mentioned above.*Understanding a problem in a natural way will lead to a natural solution