To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 5191
5190  |  5192
Subject: 
Re: Intersection of 2 3D lines?
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 13 Sep 2000 20:23:09 GMT
Viewed: 
405 times
  
Thanks to both of you.  Given that this newsgroup covers both part
development and cad program development (with part development getting more
posts for obvious reasons), I probably should have specified that I needed
to do this programatically.  (On the other hand, since the spreadsheet DOES
contains the formula to do the work, I could have extracted it for my
purposes anyway.)

If you're interested, I'm using this in my sphere tesselation.  Given the
outline of a triangle, with subdivided edges, I needed to find the
intersection of the lines between the subdivisions.

      A



    D   E



  F   u   G



B   H   I   C

I wanted point u above, given points A-I.  So u would be the intersection of
D-I, E-H, and F-G.  The three lines only intersect in the same place if the
points along the edges are evenly spaced, though.

In my actual situation, it is more complicated, because points D through I
are pushed away from the corners, in order to get the desired final result
once I project the points onto the surface of a sphere.  This means that D-I
intersected with E-H produces one point, D-I intersected with F-G produces a
second point, and E-H intersected with F-G produces a third point.  It's
straightforward to get the center of the triangle produced by these points,
though, and use that.

Interestingly enough, I found that I could determine this final center point
(or at least a visually pleasing approximation) by summing B through I,
subtracting the sum of A through C, and then adjusting the magnitude to get
it back into the right plane.  This presumably only works due to the fact
that the plane that all of the above points are in is fairly special (X + Y
+ Z = 1).

In any event, I now have the arbitrarily complex sphere tesselation working,
so now all I have to do is go about determining the correct surface normals.
Unfortunately, while each point on the sphere is its own surface normal as
long as the X, Y, and Z scale factors are equal, this does not work when the
scale factors are not equal.


--Travis Cobbs (tcobbs@san.REMOVE.rr.com)

"Rui Martins" <Rui.Martins@link.pt> wrote in message
news:Pine.GSU.4.10.10009131746440.14479-100000@is-sv...
On Wed, 13 Sep 2000, Steve Bliss wrote:

In lugnet.cad.dev, Travis Cobbs wrote:

If I have two co-planar lines in 3-space, does anyone know how I can
determine their intersection?

If it makes the equations easier, the plane that they are in is:

Z = 1 - X - Y
otherwise written
X + Y + Z = 1

Anyone?

You can use the "Line Intersect" tab on my rotate.xls spreadsheet (get • it
from <http://www.geocities.com/partsref/>).  It's only 2D, but you can • do
XY first, then XZ.  The resulting XYZ values will be your intersection.

Not as elegant as Rui's solution, but it works for me...

Well, thanks Steve.
But you could easilly make it 3D couldn't you ?!  8)

See ya




Message is in Reply To:
  Re: Intersection of 2 3D lines?
 
(...) Well, thanks Steve. But you could easilly make it 3D couldn't you ?! 8) See ya (24 years ago, 13-Sep-00, to lugnet.cad.dev)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR