- #1
Pazil
- 8
- 0
Hello!
I'm having a pretty big problem intersecting parametric lines. I'm using the equations:
x = x1 + t(x2 - x1)
y = y1 + t(y2 - y1)
Given the 2 lines:
x = x1 + t(x2 - x1)
y = y1 + t(y2 - y1)
x = x3 + t(x4 - x3)
y = y3 + t(y4 - y3)
I calculate the intersection, using this:
t = ( x3 - x1 ) / ( (x2 - x1) - (x4 - x3) )
And then I would plug it into the first line...
For some odd reason...it doesn't work! And the funny thing is, that it used to work in my program. I'm not sure if I made any changes, but it's really screwing things up...
Please help!
P.
I'm having a pretty big problem intersecting parametric lines. I'm using the equations:
x = x1 + t(x2 - x1)
y = y1 + t(y2 - y1)
Given the 2 lines:
x = x1 + t(x2 - x1)
y = y1 + t(y2 - y1)
x = x3 + t(x4 - x3)
y = y3 + t(y4 - y3)
I calculate the intersection, using this:
t = ( x3 - x1 ) / ( (x2 - x1) - (x4 - x3) )
And then I would plug it into the first line...
For some odd reason...it doesn't work! And the funny thing is, that it used to work in my program. I'm not sure if I made any changes, but it's really screwing things up...
Please help!
P.