Hi,

Let's say we have four points: $\displaystyle \vec{p_1} = \vec{o} + w\vec{d}$, $\displaystyle \vec{p_2} = \vec{o} + x\vec{d}$, $\displaystyle \vec{p_3} = \vec{o} + y\vec{d}$, $\displaystyle \vec{p_4} = \vec{o} + z\vec{d}$
And $\displaystyle w \leq x \leq y \leq z$

I would like to find $\displaystyle \|x\|\vec{d} + \|y\|\vec{d}$ and compare it with $\displaystyle \|\vec{p_4} - \vec{p_1}\|$, however, I do not know the values of the variables that make up the points.

An example in 1-D:
$\displaystyle \vec{o} = 0,\ \vec{d} = 1,\ w = -3,\ x = -1,\ y = 4,\ z = 5$
$\displaystyle \vec{p_1} =-3,\ \vec{p_2} = -1,\ \vec{p_3} = 4,\ \vec{p_4} = 5$

$\displaystyle \|\vec{p_4} - \vec{p_1}\| = \sqrt{(5 - (-3))^2} = 8,\ \|x\|\vec{d} + \|y\|\vec{d} = \|-1\| + \|4\| = 5$

Can this be done with points in higher dimensions and where $\displaystyle \vec{o}$ is not necessarily a zero vector? How would I go about calculating $\displaystyle \|x\|\vec{d} + \|y\|\vec{d}$? The euclidean distance part is easy.

Thanks.