All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Intersecting lines (Posted on 2003-07-01) Difficulty: 3 of 5
You are given two straight line segments, each defined by the coordinates of its endpoints. Segment AB goes from (Ax,Ay) to (Bx,By) and segment CD - from (Cx,Cy) to (Dx,Dy).

How would you determine if the two line segments intersect?

(Assume that you can't just draw the lines and see)

See The Solution Submitted by levik    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts re: No Code, just theory | Comment 11 of 20 |
(In reply to No Code, just theory by nikki)

The dictionary definition of an algorithm is that it is a process or set of rules for performing a calculation. What you've given is exactly that - ie a process for performing a calculation that gives the required solution. Just because it's less formal than some of the previous answers doesn't mean it's less valid.

For what it's worth, I used exactly the same method as you - to be honest I didn't even understand half of what Charlie and fried were describing!

Happy floobling :-)
  Posted by fwaff on 2003-07-02 23:20:57

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information