Need a Algorithm for Getting the border of a shape
I have a problem...I want a pseudocode..for the following problem
Aim:
I need the lines to be ordered first and then also it should be in anticlockwise directions (if the points are also not ordered for these
ordered lines ..order them too... in anti clockwise direction)
Specification:
I have a vector of lines and arcs to form a shape....
...the lines are not ordered (say for example line 1 followed by 2 ,3 and so
on... but the vector contains lines in random order say 1 3 5 2 4 so
on...please note the vector contains points for the line only and no
identification for the order.)
The lines will combine to form any shape (eg rectangle ..rhombus or any
polygon or shape.) the shape can also contain lines along diagonal too.. or
some lines intersecting the polygon at any of the sides...but within the
boundary
for example..
new java.awt.Point(10, 20));
new java.awt.Point(10, 50)); //line 4
new java.awt.Point(40, 50));
new java.awt.Point(10, 50)); //line 3
new java.awt.Point(40, 50));
new java.awt.Point(40, 20)); //line 1
new java.awt.Point(10, 20));
new java.awt.Point(40, 20)); //line 2
new java.awt.Point(10, 25));
new java.awt.Point(40, 35)); //line 5
new java.awt.Point(40, 25));
new java.awt.Point(10, 45)); //line 6
kindly if any one knows the solution for this or any site which has a
solution for this...please send it or find the solution at the earliest.
Thanking u in advance.
Oliver

