Donate SIGN UP

Square grid formula

Avatar Image
David H | 20:26 Thu 03rd May 2012 | Science
17 Answers
I know roughly the formula for counting distances on a square grid, but not exactly. If counting say 5 squares east and 2 squares south, the total distance is 5 plus what? I know it's the sum of the diagonal addition per south square, so something like 5 + (2x), where x is the extra distance covered per diagonal, which by memory is about 0.31, so a trip of 5 miles east and 2 miles south would be about 5.6 miles in a dead straight line.

Is there an exact formula and tidier and more precise than this?
Gravatar

Answers

1 to 17 of 17rss feed

Best Answer

No best answer has yet been selected by David H. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
If you're going in a straight line, is the answer not the square root of (east squared + south squared)?
Of course this assumes a flat grid, in real life hills or even the curvature of the Earth will affect the result.
As TheCorbyloon indicates, if you walked diagonally in a straight line and the ground was flat you would walk a distance equal to the square root of 29 (5² + 2²), which is 5.39 miles
Question Author
I realised it was triangular geometry so can do it with square roots, but there is also a very simple fractional relationship between the height/width and diagonal of a square which means you ought to be able to avoid multiplication squaring altogether and simply use the horizontal figure plus the multiple of the vertical times the factor (as I said, I think it's about 0.31, quite similar to Pi in fact) as a method not requiring a calculator or as hard to remember as I struggle beyond basic arithmetic. I did ask the diagonal question which I've just found but the figure is 1.414...., the reciprocal being 0.707...

That should mean if you just want a rough distance (as I do using the OS map grid) you go say 10Y horizontal=10 and X vertical, using the formula 0.71X + 10Y.

A working example would be my latest journey which I want to measure from Chelmsford to Passingford Bridge (my photos all go on the OS map when I load them up). That is a total of 21 squares (KM) horizontal and 8 squares vertical = (8 X 0.71) = 5.65, meaning the total distance to Passingford Bridge is 26.65 km/ X 0.625 =16.65 miles. I know the squares formula gives an exact answer but I can't do it in my head, or probably without a calculator and I think my short cut seems to work nicely, and can always use 0.7 for a close enough idea. If I was an architect I'd have to use the other method of course but for simple distances the difference will only be a fraction of a mile so sufficient for a good idea. Thanks everyone.
That's fine for a square but not for other rectangles
I agree with factor. This 0.7 approximation comes from root(2)/2=approx 1.414/2= approx 0.7
You just have to use good old Pythagoras. Don't make a big deal out of this David - its not that difficult a calculation given today's technology of spreadsheets and calculators:
Just square each number, add them together and take the square root to get the answer you want.
Question Author
Being almost maths illiterate I see the formula I used provided the correct diagonal for a square (as someone else told me) but did not represent the actual proportion per square downwards. I just used some squared paper and turned out that the measurement to the centre of two squares along was 6 units, and two and a square down was still only a little over 6 units. I can do the square root formula with a) the formula written down (no, impossible to remember it) and b) a calculator. If not then I can handle simply using the squares in the longer direction plus a fraction of the others, as that is within middle primary school level where my own abilities stopped. Given a few days and lots of graph paper I could probably figure it out by trial and error but sure most people using maths in everyday work would know this instantly, come on guys, do we have a figure or have I made a mistake and it changes per unit added and isn't a constant in which case I will carry a copy of the square root formula in my wallet so I can always find it.
There is no constant other than when we are talking about a square in which case the total distance is 1.414 x the horizontal or vertical distance.

For other rectangles the multiplier varies considerably depending on their shape. For example if it is a 10 x 1 rectangle the diagonal distance is 10.05 so the multiplier is much smaller.

Maybe you need to draw up a table showing horizontal distances of perhaps 1-10 along the top and 1-10 down the side and then fill the table in with the results of using Pythagoras. I'm sure we could provide such a table for you using Excel. Or you could put it on your phone
Am I missing the point? Why not just use a piece of string between the two points and check it off against the map scale if you just want a rough distance?
Dont send David II out to post a letter !

His rule doesnt even work for a one-mile square:
One mile vertical and one mile horisontal - we are all agreed the distance is 1.41.4 miles
his rule: one horisontal and 0.7 times one vertical give a mouth wateringly inaccurate 1.7 miles -

Does this fella want to become my bank manager
I am sure we could wring out some very mutually acceptable deals

also observe readers if the 0,7 rule were any good then it should be summetrical
so in the passingford chelmsofrd example

0.7 times 21 plus 8 should give a near approximation

but the total is 22 miles - 4 miles off the 26 got by the same example

the errors for sensible distances look as tho they will be in the region of 20 to 25 percent much much greater by a factor of 5 or 10 then a fraction of a mile

cave in a get a calculator !
Obviously it makes a difference where things are measured from but using Google Earth the distance from Chemsford Social Club to Passingford Bridge (roundabout) is 22.83km (14.18 miles).

This was using a straight line that takes into account the curvature of the Earth.
Hey I am getting into this

Take the larger square so in the passingford example that is a square of 21 hroiz and 21 vert
we know th diag is 28 miles (1.4 times one side)

and since one side is 21 miles, you know the diag of any vertical distance less than 21 miles is between 21 and 28

but think for those who are abstract that if you go 20 horiz and then half of that vertical
then you find that the square is a-squared plus half-a-squared
which is five fourths a squared
and taking the sqr root is root 5 over 2 - sort of 1.1 times one side

simples
"mouth wateringly inaccurate"
Gotta remember that one!
Question Author
Being a maths drop out I am now learning these basics from scratch simply if I need them (and it doesn't often happen). I have indeed made a table and found the additional amount per square downwards is indeed a curved function and not a constant causing a straight line, so you have to use Pythagoras. I don't remember being told that at school so there you go, it's never too late!
True, I'm always "learning" new things. Now if I could only remember what they were.

1 to 17 of 17rss feed

Do you know the answer?

Square grid formula

Answer Question >>