×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

3D Line intersection coordinates

3D Line intersection coordinates

3D Line intersection coordinates

(OP)
How to determined that two lines in 3D are intersecting or not? and if intersecting then at which point ? How to find coordinates of intersection point?

Coordinates of two lines are furnished in cells like
a1 contain x1 of line1
b1 contain y1 of line1
c1 contain z1 of line1

a2 contain x2 of line1
b2 contain y2 of line1
c2 contain z2 of line1


like for other line 2 ...

Thanks

Nitin

 

RE: 3D Line intersection coordinates

Rotate the coordinates so that any 3 points are in the XY plane.

If the the Z coordinate of the fourth point is zero, then the lines intersect.

If so, you now have 2D coordinates for the two lines, so you can fins the intersection point in the usual way.

 

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
 

RE: 3D Line intersection coordinates

The PLOT3 command in Matlab (Or Octave) will allow you to visualize the lines.
You can use the FZERO command to find intersections within a given range (f3 = f1 - f2, find f3 = 0 for the intersection). This may only work for functions of two variables, though. If that's the case you can look at intersections in the x-y, x-z, and y-z planes separately. If you get an intersection in all three planes, then the curves intersect.

RE: 3D Line intersection coordinates

(OP)
Thanks everybody for helping.

iv63 & yakpol thanks for sharing excel sheet, I think excel formula in excel sheet attached is tobe used for line and not for line segment, How to determined that intersection point is on line segment only ?

Thanks

Nitin

RE: 3D Line intersection coordinates

When the solutions are all within their corresponding ranges of the segment.

Let your acquaintances be many, but your advisors one in a thousand'  ...  Book of Ecclesiasticus

RE: 3D Line intersection coordinates

Write the three lines as a slope intersect set of equations.  Check to see that they are solvable, and if so, then the solution is the point of intersection

Dikl

RE: 3D Line intersection coordinates

That would tell you if there is an intersection, but what he really wants to know is if there is an intersection of line segments, so you must still check to ensure that the solutions for x, y, z are within the ranges of the segments.

Let your acquaintances be many, but your advisors one in a thousand'  ...  Book of Ecclesiasticus

RE: 3D Line intersection coordinates

Intersection will be within length of the segments when two conditions satisfied:
min(x1,x2) <= xo <= max(x1,x2)  and
min(x3,x4) <= xo <= max(x3,x4)

 

RE: 3D Line intersection coordinates

The iv63 spreadsheet gives the wrong answer, and the yakpol spreadheet (which is otherwise very nice) does not give an answer with the iv63 data, because the lines are parallel when projected onto the XY plane.

My original suggestion works Ok, but is unnecessarily complicated.

In the attached spreadsheet the intersection of the two lines is found in the XY, XZ, and YZ planes.  If an intersection exists in any two planes it checks that the coordinates in common are equal, and if so it returns these as the coordinates of the 3D intersection point.  It then checks that this point is within the length of the line segment.

 

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close