I have two high dimensional unit vectors vec(a) and vec(b) and the distance d between them. I want to change the vector vec(a) so that it is still a unit vector but the distance to vec(b) is now d′ . I already tried it this way: vec(a)′=vec(a) +(vec(b) −vec(a) *(1−(d′)/(d))) But then the new vector does not have unit length.

Elias Heath

Elias Heath

Answered question

2022-09-23

I have two high dimensional unit vectors a and b and the distance d between them.
I want to change the vector a so that it is still a unit vector but the distance to b is now d .
I already tried it this way:
a = a + ( b a ( 1 d d ) )
But then the new vector does not have unit length.
Anyone any idea?

Answer & Explanation

tucetiw0

tucetiw0

Beginner2022-09-24Added 12 answers

First of all, it should be clear that what you are trying to do is impossible if d > 2, since
d = a b a + b = 2
Second of all, if d 2, then any vector x = [ x 1 , , x n ] that satisfies the equation
( x 1 b 1 ) 2 + + ( x n b n ) n = d
is at a distance d from the vector b . This means that there is an entire hypersphere of possibilities for a

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?