- #1
LMHmedchem
- 20
- 0
Hello,
I have some simple 3d data like,
I need to be able to extend the line from point 1 through point 2 to some additional distance.
There are a few posts on stackexchange, but they are all in c++ code and I couldn't get results in excel that look correct. Maybe it's just too late in the day. What I found was more or less,
For the example I gave above, this gives me a point that is no where near anything that resembles an extension of the line from point 1 to point 2.
Maybe I just got the parenthesis wrong or something lame like that. This seems like it should be very simple but I'm not sure if I need to find the slope first or if something like the above will work.
Can someone point me to the correct formula?
Thanks,
LMHmedchem
I have some simple 3d data like,
Code:
point 1: x1 = 5.8573375, y1 = -4.17885, z1 = 2.338175
point 2: x2 = -3.26132, y2 = 1.28276, z2 = 0.931583
I need to be able to extend the line from point 1 through point 2 to some additional distance.
There are a few posts on stackexchange, but they are all in c++ code and I couldn't get results in excel that look correct. Maybe it's just too late in the day. What I found was more or less,
Code:
x3 = x2 * M - x1, y3 = y2 * M - y1, z3 = z2 * M - z1 where M is a multiplier
For the example I gave above, this gives me a point that is no where near anything that resembles an extension of the line from point 1 to point 2.
Code:
x3 = 2.92866875, y3 = 4.82023, z3 = -1.8723835
Maybe I just got the parenthesis wrong or something lame like that. This seems like it should be very simple but I'm not sure if I need to find the slope first or if something like the above will work.
Can someone point me to the correct formula?
Thanks,
LMHmedchem