Fidn intersection of two points parametrically, with two variables

Click For Summary

Homework Help Overview

The discussion revolves around finding the intersection point of two lines represented parametrically using two variables. The lines are defined by their endpoints, and participants are exploring methods to derive the intersection point through algebraic manipulation of the parametric equations.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss setting the parametric equations equal to each other to find the intersection, with some confusion about the correct approach to equate the coordinates. There are attempts to derive expressions for the parameters s and t, but uncertainty remains about the correct formulation and steps to take.

Discussion Status

Some participants have provided guidance on correcting the approach to setting the equations equal, while others express ongoing confusion and seek further clarification. Multiple interpretations of the problem are being explored, and there is no clear consensus on the method to solve for the parameters.

Contextual Notes

Participants note that the problem is part of a homework assignment and that the solution needs to be adaptable for any given values of the endpoints. There is also mention of a programming context, specifically using MATLAB, which may influence the approach to the problem.

sognostella
Messages
4
Reaction score
0
1. A better way to find the point of intersection of two lines is parametrically as two linear interpolations b/w inital and final points.

x=(1-s)x1+sx2
y=(1-s)y1+sy2

where x1 and y1 are the inital points and x2,y2 are the final points.
(-6,-6) (5,2)

x=(1-t)x3+tx4
y=(1-t)y3+ty4
where x3 and y3 are the inital points and x4 &y4 are the final points.
(3,-3) (1,3)




2. how do you find intersection with these two variables



3. The Attempt at a Solution
set x(t)=y(t) and solve for t
t= (x3-y3)/(x3-x4-y3-y4)
set t into the x(t) & y(t)

x(s)=y(s)
s= (x1-y1)/(x1-x2-y1-y2)
set s into the x(s) & y(s)

then set x(s)=x(t) and y(s)=y(t)


What did i do wrong?

Another attempt:
setting set x(s)=x(t) and y(s)=y(t), gives me two equations with unknown (s &t) after i find s and t i can plug one into the equations to find intersection. but how do i find s or t?
 
Physics news on Phys.org
You don't set "x(t)= y(t)"- the x and y coordinates of the point of intersection are not necessarily the same!

Instead, set the x(t)= x(s) and y(t)= y(s). That is, at the point of intersection, the x values from the two equations are the same and the y values of the two equations are the same.

Also, you should go ahead and replace the coeffients in the equations with the actual values. You are told, for example, that the first line is given by
"x=(1-s)x1+sx2
y=(1-s)y1+sy2

where x1 and y1 are the inital points and x2,y2 are the final points.
(-6,-6) (5,2)"
So put those in: x= (1-s)(-6)+ s(5), y= (1- s)(-6)+ s(2)
which reduce to x= -6+ 6s+ 5s= 11s- 6, y= -6+6s+ 2s= 8s- 6.

and you are told that, for the second line,
"x=(1-t)x3+tx4
y=(1-t)y3+ty4
where x3 and y3 are the inital points and x4 &y4 are the final points.
(3,-3) (1,3)
so that x= (1- t)(3)+ t(1) and y= (1- t)(-3)+ t(3) which reduce to
x= 3- 3t+ t= 3- 2t and y= -3+ 3t+ 3t= 6t- 3.

The point of intersection lies on both lines of course, so must satisfy both sets of equations:
x= 11s- 6= 3- 2t and y= 8s- 6= 6t+ 3.

That gives you two equations to solve for s and t which you can then put back into either set of equations to find the point.
 
the values I'm given are for checking that you have solved correctly. I'm have to make a program on matlab, that while work for any values of x1,x2,x3,x4,y1,y2,y3 or y4.

Sorry for not being more specific.

And thank you for your reply!
 
My friend is doing this same problem and his way of solving got him this:

s = (y3-y1+(-x1*y3+x3*y3+x1*y4-x3*y4)/(x4-x3))/(y2-y1+(-x1*y3+x2*y3+x1*y4-x2*y4)/(x4-x3));
t = (x1-s*x1+s*x2-x3)/(x4-x3)

he's not here to explain, but i can't seem to get similar answer for s equal.
I get how he for t. but...
 
I still can't figure this out.. .anyone out there... know how to solve this??
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 17 ·
Replies
17
Views
5K