# LabVIEW

cancel
Showing results for
Did you mean:

## Intersection point between plane and straight line in 3D space

Hello dear colleagues!

Excuse me ))) maybe someone found an example of finding the point of intersection of a plane and a straight line in 3D space?

The plane is defined by 4 corner with known points (no equation), i.e. this is a kind of parallelepiped, and the line is defined by 2 points with known coordinates

I personally found the code for finding the intersection point of two straight lines in 2D space - thank you very much for it to MGI

Message 1 of 16
(1,287 Views)

## Re: Intersection point between plane and straight line in 3D space

@Curr93 wrote:

Excuse me ))) maybe someone found an example of finding the point of intersection of a plane and a straight line in 3D space?

e.g. :

Line–plane intersection - Wikipedia

3D Line-Plane Intersection - Stack Overflow

Message 2 of 16
(1,281 Views)

## Re: Intersection point between plane and straight line in 3D space

@Curr93 wrote:

The plane is defined by 4 corner with known points (no equation), i.e. this is a kind of parallelepiped, and the line is defined by 2 points with known coordinates

To define a plane in 3D, you need only 3 points. If you have four points, it is not necessarily a flat plane, but something else. Do you know the formula of the plane and how it depends on the  four (x,y,z) points? Or, alternatively, do you want a simple plane that best fits the four points (e.g. if you know the plane is a first order 2D polynomial, no quadratic or higher terms)?

Message 3 of 16
(1,244 Views)

## Re: Intersection point between plane and straight line in 3D space

Thank you very much for your attention dear Altenbach.

This is definitely the flattest plane. I know that enough 3 points for standard case but I'm more comfortable with 4 points. Formula of the plane is unknown to me, I know coordinates all 4 points coordinates (X,Y,Z).

I don't want a simple plane, I want to find the coordinates (X,Y,Z) of only one point of intersection of a straight line and a perfectly flat plane.

Message 4 of 16
(1,239 Views)

## Re: Intersection point between plane and straight line in 3D space

@Curr93 wrote:

The plane is defined by 4 corner with known points (no equation), i.e. this is a kind of parallelepiped, and the line is defined by 2 points with known coordinates

That doesn't sound like Parallelepiped - Wikipedia.

Do you mean Paraboloid - Wikipedia?

Message 5 of 16
(1,231 Views)

## Re: Intersection point between plane and straight line in 3D space

No 😊 Let it be simple flat rectangle, i.e. no paraboloid )))

Message 6 of 16
(1,227 Views)

## Re: Intersection point between plane and straight line in 3D space

@Curr93 wrote:

This is definitely the flattest plane. I know that enough 3 points for standard case but I'm more comfortable with 4 points. Formula of the plane is unknown to me, I know coordinates all 4 points coordinates (X,Y,Z).

I don't want a simple plane, I want to find the coordinates (X,Y,Z) of only one point of intersection of a straight line and a perfectly flat plane.

3 points uniquely define a plane iff they are s not on a line. 4 points make the definition of a plane harder, not easier.

You don't want a simple plane? But a perfectly flat plane? It doesn't make much sense.

Do you mean there's a flat plane, and the 4 points are corners on that plane? So you want to know if the line is in the area defined by the points?

Message 7 of 16
(1,222 Views)

## Re: Intersection point between plane and straight line in 3D space

@Curr93 wrote:

No 😊 Let it be simple flat rectangle, i.e. no paraboloid )))

It would help if we knew better what you're trying to do.

Whether a line intersects a rectangle defined by 4 points is a different problem than finding the intersection of a line and a plane (defined by 3 points).

Intersection of a Line and a Rectangle - Game Development Stack Exchange

Message 8 of 16
(1,218 Views)

## Re: Intersection point between plane and straight line in 3D space

Yes it is a flat plane and the 4 points are corners on that plane. A straight line intersects this plane somewhere in the area between these 4 points.

Message 9 of 16
(1,217 Views)

## Re: Intersection point between plane and straight line in 3D space

The formula for a flat plane is z=ax+by+c, so you just need to solve the overdetermined linear system using your four xyz points to get the best fit a, b, c. Then find the intersection. See how far you get.

(lets assume that the four points are independent (e.g. not all four along one line in space, etc.), and that the plane is reasonable, e.g. not vertical or such)

Message 10 of 16
(1,204 Views)