- #1
Snoopey
- 6
- 0
Hi all,
I am a little stuck on a problem I'm trying to solve for something I'm programming.
I'm trying to find the point at which a line meets a plane.
The line is defined as [itex]\vec{x} = \vec{a}+d\vec{l}[/itex]
where [itex]\vec{a}[/itex] is a point on the line, [itex]\vec{l}[/itex] is a unit vector defining the direction of the line and d is the distance along the line.
The plane is defined using a point [itex]\vec{x_{0}}[/itex] and normal [itex]\vec{n}[/itex] as [itex]\vec{n}.\left(\vec{x}-\vec{x_{0}}\right)=0[/itex]
I want to sub in my line equation into my plane equation and solve for [itex]d[/itex] to get [itex]\vec{x}[/itex] but my vector algebra is very rusty and I can't for the life of me figure out how to get my [itex]d[/itex] out.
The funny thing is I used a similar method to find where a line intersects a sphere with equation [itex]\left|\vec{x}-\vec{c}\right|^{2}=R^{2}[/itex] ([itex]\vec{c}[/itex] = centre, [itex]R[/itex] = radius) and subbed in no problems. But that dot product in the plane equation is just confusing me.
Has anyone got any suggestions for me to follow?
Many thanks!
I am a little stuck on a problem I'm trying to solve for something I'm programming.
I'm trying to find the point at which a line meets a plane.
The line is defined as [itex]\vec{x} = \vec{a}+d\vec{l}[/itex]
where [itex]\vec{a}[/itex] is a point on the line, [itex]\vec{l}[/itex] is a unit vector defining the direction of the line and d is the distance along the line.
The plane is defined using a point [itex]\vec{x_{0}}[/itex] and normal [itex]\vec{n}[/itex] as [itex]\vec{n}.\left(\vec{x}-\vec{x_{0}}\right)=0[/itex]
I want to sub in my line equation into my plane equation and solve for [itex]d[/itex] to get [itex]\vec{x}[/itex] but my vector algebra is very rusty and I can't for the life of me figure out how to get my [itex]d[/itex] out.
The funny thing is I used a similar method to find where a line intersects a sphere with equation [itex]\left|\vec{x}-\vec{c}\right|^{2}=R^{2}[/itex] ([itex]\vec{c}[/itex] = centre, [itex]R[/itex] = radius) and subbed in no problems. But that dot product in the plane equation is just confusing me.
Has anyone got any suggestions for me to follow?
Many thanks!