I need a Maths expert to help create a Ratio Calculator

Issue: I am crap at Math. I need to …

  1. Convert raw Width and Height into RATIOs
  2. And provide a calculator that, given EITHER Width or Height in PROVIDED units, that will output the ratio in the provided units.

For instance: 16:10 Screens can be easily gridded to 64:40 cells.

BUT the A-SERIES papers?
A4, for instance, is 210mm X 297mm.
How can I calculate the simplest WHOLE NUMBER ratio in TW for A-series papers?

Many thanks for interest!
TT

  1. The ratio of two numbers is one divided by the other, so width/height or height/width.
  2. Ratios are unit-less - they don’t have units.

I’m not sure what you’re asking. The ratio of width:height of all A-series papers is not a whole number. It’s 1:sqrt(2). sqrt(2) is an irrational number (~1.414…).

I’m a mathematical idiot.

(Why does the Universal Calculator make things difficult?)

I was hoping for a practical approximation in whole numbers.

It would make design easier.

But thanks for your comment.
TT

The best whole-number approximation is 1.

If you want the closest fractional approximations for, say, A4 paper, they are

1/1
3/2
7/5
17/12
41/29
99/70

That last is exact, since 297/210 simplifies to 99/70.

You can try others by commenting/uncommenting the last lines of this, or adding your own:

http://link.sauyet.com/contfrac

This is based on the study of continued fractions. The Wikipedia page is fairly dense, but if you happen to want to learn more about them and why this works, an early college level paper is a pretty good explanation.

Note that the A-series paper sizes are designed around the square root of 2. The initial fractions for each paper size should be similar to each other and to those for √2, and will differ only because the actual sizes are rounded to the nearest millimeter.

1 Like

Brilliant! Thanks. That will work.

For input to, for instance, @EricShulman’s PasteUp grid, I’ll use 50/35, which should be close enough.

Many thanks for an A-1 answer
TT

1 Like

If the aim is to have a pasteup grid which is sheet of paper size, maybe PasteUp should have a few pre-set grid sizes to match common ratios: A-series (ISO 216), Letter and maybe ISO-7810 (credit/ID cards) and even 3:2 (photos) for print reasons, and maybe 1:1 and 16:9 for digital imagery reasons?

I agree. PasteUp can be used for any media.

I’m already making grids for postcards.

We need to encourage @EricShulman and give him suggestions and thoroughly test it too.

TT

Though my issue is solved the O/P wasn’t fully answered.

I discovered that in '23 @duarte.framos made and made public a Ratio Calculator. See …

It works for any ratios, not just screens.
Useful!

1 Like

I am no mathematics expert but would like to point out that when it comes to using ratios in maths the modulo is importiant.

in mathematics and computing, it refers to the modulo operation, which finds the remainder after division (e.g., 5 mod 3 = 2), often symbolized as the percent sign (%)

I note it here because this is effectivly what the remainder[] operator is. {{{ [[5]remainder[3]] }}}=2 ie what is the remainder/is left after dividing 5 by 3? two whole numbers.

1 Like