Article View: osu.graphics
Article #3Re: Simple question on Line Intersections.
From: Brian Adkins
Date: Sat, 08 Aug 1992 13:52
Date: Sat, 08 Aug 1992 13:52
34 lines
1453 bytes
1453 bytes
In article <1992Aug8.012801.17993@cis.ohio-state.edu> paranand@cis.ohio-state.edu (murahi paranandi) writes: >Hi, > >Is there a formula for the point of intersection (x,y,z) of lines >(x1,y1,z1), (x2,y2,z2) and (x3,y3,z3), (x4,y4,z4) ? > >Thanks for you help! 1) Parameterize the line equations: Line 1 = P1 + t (P2 - P1) Line 2 = P3 + t (P4 - P3) Separating the components: x1 + t (x2 - x1) x3 + t (x4 - x3) y1 + t (y2 - y1) y3 + t (y4 - y3) z1 + t (z2 - z1) z3 + t (z4 - z3) 2) Pick one of the above and solve for t eg. set the equations for x to be equal: x1 + t (x2 - x1) = x3 + t (x4 - x3) ===> t (x2 - x1) - t (x4 - x3) = x3 - x1 ===> t (x2 - x1 - x4 + x3) = x3 - x1 ===> t = (x3 - x1) / (x2 - x1 - x4 + x3) 3) Use this value of t and substitute into one of the line equations. Brian
Technical Details
Message-ID:
<1992Aug8.135208.29325@cis.ohio-state.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gecko.cis.ohio-state.edu!adkinsReferences:
<1992Aug8.012801.17993@cis.ohio-state.edu>Show Full Headers
Complete Article Headers
Newsgroups: osu.graphics,alt.3d Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gecko.cis.ohio-state.edu!adkins From: adkins@gecko.cis.ohio-state.edu (Brian Adkins) Subject: Re: Simple question on Line Intersections. Message-ID: <1992Aug8.135208.29325@cis.ohio-state.edu> Sender: news@cis.ohio-state.edu (NETnews ) Organization: The Ohio State University, Department of Computer and Information Science References: <1992Aug8.012801.17993@cis.ohio-state.edu> Date: Sat, 8 Aug 1992 13:52:08 GMT Lines: 35