guys i really need some to help me solve this problem i need the code urgently :) thnks aloy
----------------------------------------------------------------------
Implement a program that lets the user type in a file name that contains
information about a clipping rectangle (with edges parallel to the x- and y-axes)
and some line segments. Your program should determine the sum of the line
lengths inside the clipping rectangle. You must draw all line segments before and
after clipping along with the clipping rectangle.
Below is a sample file.
2 2 5 5
3 1 6 4
3 3 4 4
1 5 3 6
3 1 2 6

The first row contains the coordinates of two corners of the clipping rectangle.
The subsequent rows contain the start and end points of different line segments.

trinitrotoluene

11-17-2008, 08:33 PM

Look at this algorithm (http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/). Thats all you need :) .

30baz

11-18-2008, 04:26 PM

mate .. wassup buddy .. thnk fo ut time at first i still dont get what clipping is and its all [censored] in my head and i have this question as an assignment and i have to submit it tommorow so if u can solve it for me i would be grateful .. and im really sorry for being a burden on u .. but im still a beginner and need the help :)
thnks again

Best Regards,
30baz

ZbuffeR

11-19-2008, 12:40 AM

ha ha ha

IneQuation.pl

11-19-2008, 06:23 AM

Dude, if you don't undestand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find a different field.