ARRRG!
I was wondering why it worked before! In my first tests I had used lines of equal length and intersecting in the middle!
I now understand. I knew that you of course couldn't plug "t" into any of the two...I thought it depended to which equation you plugged it into.
Anywho, I found a...
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...
I thought of that just after I posted!
I'm going to try to parametrize my line equations by myself, but I'll definitely need help for parametric circles vs. lines and circles vs. circles...
P.
By the way, in some equations, I spot this: x = 2[ y + jh - 5] or something...what does the 2[]...
I just tested in my collision engine and it works perfectly also!
How would I plugin in the ax + by + c = 0 into the (x - h)^2 + (y - k)^2 = r^2 equation?
Supporting vertical lines would of course be a big bonus!
P.
Or, how could I parametrize this, so that x becomes a function of t?
Well, I apologize for the seemingly empty posts I've been writing, but I haven't had enough time to totally just sit down and work out the things you threw at me.
I tried to collect all like terms again, and this is what I got (Ax^2 + Bx + C = 0):
(1 + m^2)x^2 + (-2h + 2bm - 2km)x + h^2 + b^2 -...
Alright then. I guessed that much, and I realized that B would then be excluded, but I just don't understand how this form, which includes the x/y coordinates factors to only:
Ax^2 + c = 0
When if you do:
x^2 + y^2 = r^2
y = mx + b
x^2 + (mx+b)^2 = r^2
(1+m^2)x^2 + 2mbx + b^2 - r^2 =...
Alright, I'll try that!
Thank you!
Edit:
I'm still a bit confused, since I have no idea how to get that into Ax^2 + Bx + C = 0 form...?
I get to (1 + m^2)x1^2 + (b + mh - k)^2 = r^2
But I don't see how to get a B for Bx, since there's no x1 terms.
Hi!
I'm new to these forums, and a grade 10 Flash programmer. I'm currently building a collision detection library, with which I currently have Lines and Circles.
My problem is that I don't know how to get the intersection points between a circle and a line. I'm using mx+b for the line, in...