## Calculating a position a specific magnitude away

Discuss the language of the universe.

Moderators: kiore, Blip, The_Metatron

### Calculating a position a specific magnitude away

I'm doing a little thing because I've got some spare times on my hands, but I've come across a small problem. I'm stuck as to what the equations I need are.

I need to check is a position is a specific magnitude away from another position in a 2D space, and as well for a 3D space (or alternatively generate a random position a specific magnitude away in a 2D space as well as for a 3D space).

Any Ideas?
LjSpike

Posts: 89
Age: 22

Print view this post

### Re: Calculating a position a specific magnitude away

What's the "magnitude"? Are you referring to a log scale of some sort?

Bernoulli
Banned Sockpuppet

Posts: 901

Print view this post

### Re: Calculating a position a specific magnitude away

When you mentioned 'magnitude', I thought that this was an astronomy question. Then you started talking about 2D 'space'...
I have NO BELIEF in the existence of a God or gods. I do not have to offer evidence nor do I have to determine absence of evidence because I do not ASSERT that a God does or does not or gods do or do not exist.

Alan B

Posts: 9999
Age: 86

Country: UK (Birmingham)
Print view this post

### Re: Calculating a position a specific magnitude away

I assume LJSpike means the magnitude or norm of the vector connecting the two points.

If you know the coordinates of the two points it's straightforward to work out that vector, and then you work out its magnitude as the root of the sum of the squares.
How extremely stupid not to have thought of that - T.H. Huxley

Evolving

Name: Serafina Pekkala
Posts: 12320

Country: Luxembourg
Print view this post