1. ## Simple answer for intersecting lines?

I am scratching my head trying to figure out how to display a XY pixel value for 2 intersecting lines.

I am working on a 2d graphical application that deals with lines or slopes.

> Both lines always intersect

> I have line "CD" which pixel values are known for both C and D

> I know the pixel location of A

> the application is dynamic in that I can grab point B and move it vertically (assuming that CD is somewhat horizontal)

> I am attempting to display the pixel values in which AB and CD intersect

Can anybody lead me in the right direction? I appreciate your help!

2. This post is very vague.

Do you need help with the formula to find the intersection point of two lines?
Or, do you need help with the code to display a pixel?
And, what platform and what GUI?
And the really big question is... why does you head itch?

Todd

3. Searching on this brings up this

4. Usually to see if two lines are intersecting you would set them equal to one another and solve.

5. Originally Posted by Todd Burch
This post is very vague.

Do you need help with the formula to find the intersection point of two lines?
Or, do you need help with the code to display a pixel?
And, what platform and what GUI?
And the really big question is... why does you head itch?

Todd
Just need help with the equation. - My head itches b/c I have no idea what I am doing :>)

6. See here for a good explanation:

http://id.mind.net/~zona/mmts/inters...TwoLines1.html

And here for sample source code:

http://local.wasp.uwa.edu.au/~pbourk...ry/lineline2d/

Todd

7. Thanks Todd and everyone else!!!