-1
$\begingroup$

P is the point (1,1,1) and the line L is given by the equation

x ¯ = t ( 1 0 - 1 )

$\endgroup$
1
  • $\begingroup$ Assume that $Q$ lies on the line, with parameter value $t_0$. Then you know the two lines. What is the angle between them? You can calculate their dot product. $\endgroup$
    – Matti P.
    Jan 22, 2019 at 11:39

2 Answers 2

0
$\begingroup$

Point Q is a projection of point P onto line L. You can find it calculating dot product of vector L and P:

L = (1 0 -1)

Lnorm = L / length(L)

P = (1 1 1)

Q = Lnorm * dot(P, Lnorm)

P.S. But this is not universal. I simplified formula because you line L starts at point (0 0 0). In general case formula will be Q = A + Lnorm * dot(P - A, Lnorm), where A is some point on line L.

$\endgroup$
1
  • $\begingroup$ I'm confused about why you need Lnorm and can't just use L, and why you multiply Lnorm with the dot product of Lnorm and P. $\endgroup$
    – S Khan
    Jan 22, 2019 at 23:28
0
$\begingroup$

For $a,b,c,d,e,f\in \Bbb R$ and $t\in \Bbb R,$ let $v(t)=(at+b,ct+d,et+f).$ If $L=\{v(t):t\in \Bbb R\}$ and $P=(x,y,z)$ then the square of the distance from $P$ to any $v(t)\in L$ is $G(t)=(at+b-x)^2+(ct+d-y)^2+(et+f-z)^2,$ which is a quadratic function of $t$. When $G(t_0)=\min \{G(t):t\in \Bbb R\}$ we have $v(t_0)=Q.$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .