Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Curr93

Member

01-05-2022 08:23 AM - edited 01-05-2022 08:57 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

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

wiebe@CARYA

Knight of NI

01-05-2022 08:35 AM - edited 01-05-2022 08:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

@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?

Google "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

LabVIEW Programming ((make LV more popular, read this)

altenbach

Knight of NI

01-05-2022 10:20 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

@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)?

01-05-2022 10:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

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.

wiebe@CARYA

Knight of NI

01-05-2022 11:11 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

@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?

LabVIEW Programming ((make LV more popular, read this)

01-05-2022 11:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

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

wiebe@CARYA

Knight of NI

01-05-2022 11:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

@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?

LabVIEW Programming ((make LV more popular, read this)

wiebe@CARYA

Knight of NI

01-05-2022 11:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

@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

LabVIEW Programming ((make LV more popular, read this)

01-05-2022 11:33 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

altenbach

Knight of NI

01-05-2022 12:01 PM - edited 01-05-2022 12:07 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report to a Moderator

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)*