ANSWERS: 1
-
The equation of a line in 3 dimensional space can be represented by 3 (1 by 3) matrices A, B, and C and a scaling parameter (t) A = B + C(t) The A matrix is a 1 by 3 matrix that is the point (X, Y, Z) that results from selecting the value of the scaling parameter (t) Therefore, the A matrix looks like this: |X| |Y| |Z| The B matrix is a 1 by 3 matrix that is one of the given points, P = (X0, Y0, Z0) Therefore, the B matrix looks like this: |X0| |Y0| |Z0| The C matrix is a 1 by 3 matrix is a vector that is created from the difference between the two points , P = (X0, Y0, Z0) and Q = (X1, Y1, Z1) Therefore, the C matrix looks like this: |X1 - X0| |Y1 - Y0| |Z1 - Z0| This vector matrix can be made into a unit vector by dividing by the matrix magnitude of the vector but, because the scaling parameter (t) multiplies this matrix, it is not really necessary. For completeness, I will tell you how to compute the magnitude (m) of the vector: m = √[(X1 - X0)² + (Y1 - Y0)² + (Z1 - Z0)²] This would make the C matrix become: |(X1 - X0)/m| |(Y1 - Y0)/m| |(Z1 - Z0)/m| But we will not be writing the equation of the line using a unit vector, because it will make the problem easier to solve, if we leave the vector as is. An equation of a line between points P = (X0, Y0, Z0) and, Q = (X1, Y1, Z1) can be written as the following matrix equation: |X| |X0| |X1 - X0| |Y|=|Y0|+|Y1 - Y0|t |Z| |Z0| |Z1 - Z0| This means that: X = X0 + (X1 - X0)t Y = Y0 + (Y1 - Y0)t Z = Z0 + (Z1 - Z0)t To find the point, (X, Y, Z), one fifth of the distance from point P to Q let t = 1/5 and evalute the above 3 equations. Here is the URL of a Java applet that will draw your line segment for you: http://www.ies.co.jp/math/java/vector/chok3D/chok3D.html
Copyright 2023, Wired Ivy, LLC

by 