A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Calculating the aspect ratio



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old June 6th 19, 10:25 PM posted to alt.comp.os.windows-10
Ken Springer[_2_]
external usenet poster
 
Posts: 3,817
Default Calculating the aspect ratio

Does anyone know the underlying mathematical formula used in this webpage?

https://andrew.hedges.name/experiments/aspect_ratio/

I'm afraid my algebraic skills have dwindled to almost nil in the 65
years since high school algebra! LOL


--
Ken
MacOS 10.14.5
Firefox 67.0
Thunderbird 60.7
"My brain is like lightning, a quick flash
and it's gone!"
Ads
  #2  
Old June 7th 19, 12:44 AM posted to alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Calculating the aspect ratio


"Ken Springer" wrote

| Does anyone know the underlying mathematical formula used in this webpage?
|
| https://andrew.hedges.name/experiments/aspect_ratio/
|

He gives it right below the text inputs.

x / y * y2 = x2

1080 / 1920 = .5625
..5625 * 800 = 450

His sample is for a 16/9 monitor, so you can also
do it that way:

800 / 16 = 50
50 * 9 = 450


  #3  
Old June 7th 19, 01:26 AM posted to alt.comp.os.windows-10
Keith Nuttle
external usenet poster
 
Posts: 1,844
Default Calculating the aspect ratio

On 6/6/2019 7:44 PM, Mayayana wrote:
50 * 9 = 450


The basic formula is a simple direct proportions calculation

X1 X2
------ = ------
Y1 Y2


Which is calculated as
X1 * Y2 = Y2 * X3

and finally

X1 * Y2
------- = Y2
X3





--
2018: The year we learn to play the great game of Euchre
  #4  
Old June 7th 19, 01:41 AM posted to alt.comp.os.windows-10
Ken Springer[_2_]
external usenet poster
 
Posts: 3,817
Default Calculating the aspect ratio

On 6/6/19 3:25 PM, Ken Springer wrote:
Does anyone know the underlying mathematical formula used in this webpage?

https://andrew.hedges.name/experiments/aspect_ratio/

I'm afraid my algebraic skills have dwindled to almost nil in the 65
years since high school algebra! LOL


OK, I screwed up. What I wrote isn't in any way clear for what I'm
looking for. Not the first time I've done that! LOL

W1... Enter 1280
H1... Enter 600

How does he calculate the aspect ratio, just above the Example
rectangle, to be 32:15? This is the math I don't remember. LOL



--
Ken
MacOS 10.14.5
Firefox 67.0
Thunderbird 60.7
"My brain is like lightning, a quick flash
and it's gone!"
  #5  
Old June 7th 19, 02:23 AM posted to alt.comp.os.windows-10
😉 Good Guy 😉
external usenet poster
 
Posts: 1,483
Default Calculating the aspect ratio

On 07/06/2019 01:41, Ken Springer wrote:
On 6/6/19 3:25 PM, Ken Springer wrote:
Does anyone know the underlying mathematical formula used in this
webpage?

https://andrew.hedges.name/experiments/aspect_ratio/

I'm afraid my algebraic skills have dwindled to almost nil in the 65
years since high school algebra! LOL


OK, I screwed up. What I wrote isn't in any way clear for what I'm
looking for. Not the first time I've done that! LOL

W1... Enter 1280
H1... Enter 600

How does he calculate the aspect ratio, just above the Example
rectangle, to be 32:15? This is the math I don't remember. LOL




do you know what common factors are? In your example, 10 is a common
factor of 1280 and 600. therefore divide them by 10 to give: 128 and 60

Now the common factor is 4 in both numbers so divide them by 4 to give:
32 and 15

In 32 and 15 there aren't any more common factors to give exact whole
numbers when divided by a number so the final result is: 32:15

At your age, you should really not be concerned by primary school
mathematics because children are better at that and they enjoy doing
them. I did these things when I was only 8.

You can learn these things from Indian teachers because Mathematics is
their forte. they are driving the IT industry these days because of
their good education system.



--
With over 950 million devices now running Windows 10, customer
satisfaction is higher than any previous version of windows.

  #6  
Old June 7th 19, 02:57 AM posted to alt.comp.os.windows-10
😉 Good Guy 😉
external usenet poster
 
Posts: 1,483
Default Calculating the aspect ratio

On 07/06/2019 01:26, Keith Nuttle wrote:
On 6/6/2019 7:44 PM, Mayayana wrote:
50 * 9 = 450


The basic formula is a simple direct proportions calculation

X1 X2
------ = ------
Y1 Y2


Which is calculated as
X1 * Y2 = Y2 * X3


With due respect, this is completely wrong. How did you get X3 into the
equation. It wasn't in there in the first place. the correct
transformation should be:

X1 * Y2 = Y1 * X2 // this simple cross multiplying.

and finally

X1 * Y2
------- = Y2
X3


WRONG again!!!!!!!!

If you want to make Y2 as the subject of the formula then it should be:

Y2 = ( Y1 * X2) / X1

You really need to get the variables correct when doing simple
calculations. How many people did you kill when getting mixed up with
calculations in preparing drugs for patients? You were a chemists is
this correct? You must have killed many people with silly mistakes like
the one you made here.










--
With over 950 million devices now running Windows 10, customer
satisfaction is higher than any previous version of windows.

  #7  
Old June 7th 19, 03:51 AM posted to alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Calculating the aspect ratio

"Keith Nuttle" wrote

|
| The basic formula is a simple direct proportions calculation
|
| X1 X2
| ------ = ------
| Y1 Y2
|
|
| Which is calculated as
| X1 * Y2 = Y2 * X3
|

X3?


  #8  
Old June 7th 19, 04:28 AM posted to alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Calculating the aspect ratio

"Ken Springer" wrote

|
| W1... Enter 1280
| H1... Enter 600
|
| How does he calculate the aspect ratio, just above the Example
| rectangle, to be 32:15? This is the math I don't remember. LOL
|

He's not doing that. But you can do it with division.
1280 / 600 = 2.13333333:1. You need whole numbers?
I don't know how to do that with a formula.

This is the simplest I came up with, using VBScript. It first
calculates the fraction. Then it multiplies that by numbers until
it finds a whole number. In this case it's 2.1333333333333
and the first multiplier that will yield a whole number is 15.
That yields 32. The aspect ratio, expressed in the lowest
possible integer pair, is then that number with the multiplier:
32:15.

MsgBox AspectRatio(1280, 600)

Function AspectRatio(a, b)
Dim i, i2, x, a1, b1
x = a / b
For i = 1 to 100
If (x * i) - CLng(x * i) = 0 Then
i2 = i
Exit For
End If
Next
a1 = x * i2
b1 = i2
AspectRatio = a1 & ":" & b1
End Function


  #9  
Old June 7th 19, 05:05 AM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Calculating the aspect ratio

Ken Springer wrote:
On 6/6/19 3:25 PM, Ken Springer wrote:
Does anyone know the underlying mathematical formula used in this
webpage?

https://andrew.hedges.name/experiments/aspect_ratio/

I'm afraid my algebraic skills have dwindled to almost nil in the 65
years since high school algebra! LOL


OK, I screwed up. What I wrote isn't in any way clear for what I'm
looking for. Not the first time I've done that! LOL

W1... Enter 1280
H1... Enter 600

How does he calculate the aspect ratio, just above the Example
rectangle, to be 32:15? This is the math I don't remember. LOL


An aspect ratio is a "ratio" after all.

A ratio is the relationship, sorta percentage wise,
between two things. You're comparing them, by
dividing one by the other.

I'll make up a silly example, to keep it simple. Let
say I've taken a liking to these dimensions somewhere.
And someone asks me to make their smaller picture,
have the "same aspect ratio" as this reference image.

1600
----
900

Now, to make an "aspect" ratio, we want to reduce it
to the smallest possible ratio of simple integers.

This is a "convention" for aspect ratios. Note that
people working in the roofing trade, don't always
use the smallest possible ratio, so their conventions
are different. (2 in 12 is low rise, 1 in 16 is "flat" etc,
a roofer would never say "1 in 6", because another
roofer would give him a strange look.)

By inspection, you can see that if I were to divide
each of those numbers by 100, something interesting
happens. To "preserve" the ratio, I do the same to both.

16
--- or restated 16:9
9

The factors of 16 are 2*2*2*2
The factors of 9 contain 3*3
Notice that since they now share *no*
common factors, I can't divide each number
by a common number, any further. It's not reducible,
therefore my reduction process is done/completed.

2*2*2*2
------- or 16:9, nothing can be canceled and it's
3*3 as small as we can make it

The only reason we refer to 16:10 (a reducable ratio)
is because 16:10 and 16:9 are frequently compared in
speech, and the "16's" are preserved to make comparison
easier. We in that case, don't reduce the left one to
8:5, because it would be silly and hard to compare to
16:9.

Now, if you want to apply some ratio like that or even
a percentage, you have to choose a number for one
dimension, then work out the number of the second dimension.

Let's say for the new image we're working on, the width is X
and the height is 45, and the requirement is, that the new image
has the same aspect ratio. We equate the two ratios because
we've stated "we want them the same". They are thus, "equal".
The term in the center is there, just as a reminder of how the
aspect ratio is the ratio of X to Y for this example. (In
the Cartesian coordinate system, X being the width on the
graph and Y being the height.) I drew the image here, just
as a reminder, to make it easier to visualize.

Y 9 _ _ _ _ _ _
| |
| |
| |
| |
+-------------- X
0,0 16

Aspect Details of
ratio new image (to have same aspect ratio)

16 X X
---- = --- = ---
9 Y 45

To solve an equation, you need to manipulate the two sides,
until the unknown ("X") is all by itself on one side. How
can we do that ? The trick is, you have to do the "same thing"
to both sides (and using the rules of algebra, which are
unforgiving to the making of mistakes). We're not using
the entire "rules of algebra" here, and a decidedly small
subset. First, we rewrite the things we know. There is
"one equation and one unknown".

16 X
---- = ---
9 45

If I multiply the entire equation, on both sides, by
45, let's see what happens.

45* ( 16 ) 45 * ( X )
---- = ---
9 45

The 45 in the numerator cancels with the
45 in the denominator, on the right hand one.
Let's pencil that in and see what it looks like.

45* ( 16 )
---- = X
9

Nine goes into 45, 5 times, then times 16 gives 80

X = 80

So the new image I wanted is 80 where 80 is the width X and
---- 45 is the height Y, and
45 the picture is wider than
it is tall.

And then if you stare at the final equality again,
depending on your ratiometric brain, you might notice
"it makes sense". I pencil in "80" in place of "X" and
admire my handiwork.

16 80
---- = ---
9 45

And I own this all, to being forced to learn my times
tables at the age of 7. Drill, drill, drill. At the
time, I kinda whined just a little bit, with some
"why do I have to learn these again?" comments :-)
Never knowing that June7, 2019, the drill would
come in handy. My parents strategy has finally
paid off.

Paul
  #10  
Old June 7th 19, 05:31 AM posted to alt.comp.os.windows-10
Keith Nuttle
external usenet poster
 
Posts: 1,844
Default Calculating the aspect ratio

On 6/6/2019 10:51 PM, Mayayana wrote:
"Keith Nuttle" wrote

|
| The basic formula is a simple direct proportions calculation
|
| X1 X2
| ------ = ------
| Y1 Y2
|
|
| Which is calculated as
| X1 * Y2 = Y2 * X3
|

X3?


Would you believe X2


Fingers on the key board sometimes write what they think I want not what
I intend.

--
2018: The year we learn to play the great game of Euchre
  #11  
Old June 7th 19, 11:49 AM posted to alt.comp.os.windows-10
Ammammata
external usenet poster
 
Posts: 209
Default Calculating the aspect ratio

Il giorno Thu 06 Jun 2019 11:25:54p, *Ken Springer* ha inviato su
alt.comp.os.windows-10 il messaggio .
Vediamo cosa ha scritto:


https://andrew.hedges.name/experiments/aspect_ratio/



just note the Common ratios list is missing the well known 1280x1024,
typical on many monitors several years ago

--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
http://www.bb2002.it

............ [ al lavoro ] ...........
  #12  
Old June 7th 19, 02:23 PM posted to alt.comp.os.windows-10
Mayayana
external usenet poster
 
Posts: 6,438
Default Calculating the aspect ratio

"Keith Nuttle" wrote

| | The basic formula is a simple direct proportions calculation
| |
| | X1 X2
| | ------ = ------
| | Y1 Y2
| |
| |
| | Which is calculated as
| | X1 * Y2 = Y2 * X2
| |
|
| X3?
|
|
| Would you believe X2
|
|
Ah. I still don't see the answer here, though.
You have:

X1 * Y2
------- = Y2
X2

But Y2 is on both sides. So I tried putting Y1
on the left, thinking maybe you intended that.
But that doesn't work either. I thought maybe
there's an easier method than mine. I'm not
a math whiz. But so far we don't seem to have
a 1-step solution.


  #13  
Old June 7th 19, 02:42 PM posted to alt.comp.os.windows-10
Ken Springer[_2_]
external usenet poster
 
Posts: 3,817
Default Calculating the aspect ratio

On 6/6/19 7:23 PM, 😉 Good Guy 😉 wrote:
On 07/06/2019 01:41, Ken Springer wrote:
On 6/6/19 3:25 PM, Ken Springer wrote:
Does anyone know the underlying mathematical formula used in this
webpage?

https://andrew.hedges.name/experiments/aspect_ratio/

I'm afraid my algebraic skills have dwindled to almost nil in the 65
years since high school algebra!Â* LOL


OK, I screwed up.Â* What I wrote isn't in any way clear for what I'm
looking for.Â* Not the first time I've done that!Â* LOL

W1...Â* Enter 1280
H1...Â*Â* Enter 600

How does he calculate the aspect ratio, just above the Example
rectangle, to be 32:15?Â* This is the math I don't remember.Â* LOL




do you know what common factors are?Â* In your example, 10 is a common
factor of 1280 and 600.Â* therefore divide them by 10 to give: 128 and 60

Now the common factor is 4 in both numbers so divide them by 4 to give:
32 and 15

In 32 and 15 there aren't any more common factors to give exact whole
numbers when divided by a number so the final result is: 32:15


Now, write the math formula to do that, and remember you can only input
the 1280 and 600, or any other pair of numbers. You do not get to
choose a common factor for input.

At your age, you should really not be concerned by primary school
mathematics because children are better at that and they enjoy doing
them.Â*Â* I did these things when I was only 8.


The senility of that statement sill proves I'm many years younger than you.


--
Ken
MacOS 10.14.5
Firefox 67.0
Thunderbird 60.7
"My brain is like lightning, a quick flash
and it's gone!"
  #14  
Old June 7th 19, 02:45 PM posted to alt.comp.os.windows-10
Bucky Breeder[_7_]
external usenet poster
 
Posts: 19
Default Calculating the aspect ratio

Ken Springer posted this via
:

On 6/6/19 7:23 PM, 😉 Good Guy 😉 wrote:
On 07/06/2019 01:41, Ken Springer wrote:
On 6/6/19 3:25 PM, Ken Springer wrote:
Does anyone know the underlying mathematical formula used in this
webpage?

https://andrew.hedges.name/experiments/aspect_ratio/

I'm afraid my algebraic skills have dwindled to almost nil in the 65
years since high school algebra!Â* LOL

OK, I screwed up.Â* What I wrote isn't in any way clear for what I'm
looking for.Â* Not the first time I've done that!Â* LOL

W1...Â* Enter 1280
H1...Â*Â* Enter 600

How does he calculate the aspect ratio, just above the Example
rectangle, to be 32:15?Â* This is the math I don't remember.Â* LOL




do you know what common factors are?Â* In your example, 10 is a common
factor of 1280 and 600.Â* therefore divide them by 10 to give: 128 and
60

Now the common factor is 4 in both numbers so divide them by 4 to give:
32 and 15

In 32 and 15 there aren't any more common factors to give exact whole
numbers when divided by a number so the final result is: 32:15


Now, write the math formula to do that, and remember you can only input
the 1280 and 600, or any other pair of numbers. You do not get to
choose a common factor for input.

At your age, you should really not be concerned by primary school
mathematics because children are better at that and they enjoy doing
them.Â*Â* I did these things when I was only 8.


The senility of that statement sill proves I'm many years younger than
you.



The nice thing about the age of Google is we don't need no steenkeen math!

Hope this helps.

--

I AM Bucky Breeder, (*(^;

Resolve conflicts the American way :

Rock - Paper - Scissors - Blame It All On The Russians

.... and I approve this message!
  #15  
Old June 7th 19, 02:54 PM posted to alt.comp.os.windows-10
Ken Springer[_2_]
external usenet poster
 
Posts: 3,817
Default Calculating the aspect ratio

On 6/6/19 9:28 PM, Mayayana wrote:
"Ken Springer" wrote

|
| W1... Enter 1280
| H1... Enter 600
|
| How does he calculate the aspect ratio, just above the Example
| rectangle, to be 32:15? This is the math I don't remember. LOL
|

He's not doing that. But you can do it with division.
1280 / 600 = 2.13333333:1. You need whole numbers?
I don't know how to do that with a formula.

This is the simplest I came up with, using VBScript. It first
calculates the fraction. Then it multiplies that by numbers until
it finds a whole number. In this case it's 2.1333333333333
and the first multiplier that will yield a whole number is 15.
That yields 32. The aspect ratio, expressed in the lowest
possible integer pair, is then that number with the multiplier:
32:15.

MsgBox AspectRatio(1280, 600)

Function AspectRatio(a, b)
Dim i, i2, x, a1, b1
x = a / b
For i = 1 to 100
If (x * i) - CLng(x * i) = 0 Then
i2 = i
Exit For
End If
Next
a1 = x * i2
b1 = i2
AspectRatio = a1 & ":" & b1
End Function


I remember enough of my Basic from 8 bit days to follow what you're doing.

but how do we get this into a math formula.? :-)


--
Ken
MacOS 10.14.5
Firefox 67.0
Thunderbird 60.7
"My brain is like lightning, a quick flash
and it's gone!"
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 02:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.