Click here to Skip to main content
15,887,596 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Calculating a width and height, not square root. Pin
CPallini10-Mar-09 4:29
mveCPallini10-Mar-09 4:29 
GeneralRe: Calculating a width and height, not square root. Pin
Pete O'Hanlon10-Mar-09 4:34
mvePete O'Hanlon10-Mar-09 4:34 
GeneralRe: Calculating a width and height, not square root. Pin
Luc Pattyn10-Mar-09 8:19
sitebuilderLuc Pattyn10-Mar-09 8:19 
GeneralRe: Calculating a width and height, not square root. Pin
PIEBALDconsult22-Mar-09 17:52
mvePIEBALDconsult22-Mar-09 17:52 
GeneralRe: Calculating a width and height, not square root. [modified] Pin
Yusuf7-Mar-09 13:37
Yusuf7-Mar-09 13:37 
GeneralRe: Calculating a width and height, not square root. Pin
0x3c08-Mar-09 1:40
0x3c08-Mar-09 1:40 
GeneralRe: Calculating a width and height, not square root. Pin
Yusuf8-Mar-09 1:50
Yusuf8-Mar-09 1:50 
GeneralHow to calculate width and height under constraints Pin
73Zeppelin7-Mar-09 19:53
73Zeppelin7-Mar-09 19:53 
Sorry for the delay in responding. You have enough information to solve this. You have two equations and two unknowns. We know the area and the width to height ratio.
So:

1.) width * height = area
2.) height = 0.75 * width

so, substituting (2) into (1)

0.75 * width * width = area

Rearranging:

3.) width = sqrt(area/0.75)

Using your numbers as an example:

width = sqrt(480000/0.75) = 800

then putting this into the height constraint:

height = 0.75 * width = 0.75 * 800 = 600


So for the 480,000 example, width should be 800, height 600. So, just solve equation (3) for the width and then plug the width result into (2) to get the height.

modified on Saturday, March 14, 2009 8:31 AM

GeneralRe: Calculating a width and height, not square root. Pin
Cloughy8-Mar-09 4:37
Cloughy8-Mar-09 4:37 
GeneralRe: Calculating a width and height, not square root. Pin
73Zeppelin9-Mar-09 0:12
73Zeppelin9-Mar-09 0:12 
QuestionVery advanced Computer Graphics library Pin
markweber5-Mar-09 5:08
markweber5-Mar-09 5:08 
AnswerRe: Very advanced Computer Graphics library Pin
Mark Churchill9-Mar-09 13:57
Mark Churchill9-Mar-09 13:57 
GeneralRe: Very advanced Computer Graphics library Pin
markweber10-Mar-09 3:26
markweber10-Mar-09 3:26 
Questiona parellel program problem Pin
JackPuppy2-Mar-09 1:49
JackPuppy2-Mar-09 1:49 
AnswerRe: a parellel program problem Pin
JackPuppy2-Mar-09 2:43
JackPuppy2-Mar-09 2:43 
AnswerRe: a parellel program problem Pin
JackPuppy2-Mar-09 2:44
JackPuppy2-Mar-09 2:44 
QuestionGreedy problem with filling sequence Pin
proggged26-Feb-09 4:23
proggged26-Feb-09 4:23 
AnswerRe: Greedy problem with filling sequence Pin
Perisic, Aleksandar28-Feb-09 5:38
Perisic, Aleksandar28-Feb-09 5:38 
GeneralRe: Greedy problem with filling sequence Pin
Perisic, Aleksandar1-Mar-09 3:45
Perisic, Aleksandar1-Mar-09 3:45 
QuestionAnd Or and Xor with floating point Pin
PIEBALDconsult25-Feb-09 4:35
mvePIEBALDconsult25-Feb-09 4:35 
AnswerRe: And Or and Xor with floating point Pin
Dan Neely25-Feb-09 4:47
Dan Neely25-Feb-09 4:47 
GeneralRe: And Or and Xor with floating point Pin
supercat925-Feb-09 5:28
supercat925-Feb-09 5:28 
GeneralRe: And Or and Xor with floating point Pin
Dan Neely25-Feb-09 5:38
Dan Neely25-Feb-09 5:38 
GeneralRe: And Or and Xor with floating point Pin
supercat925-Feb-09 6:08
supercat925-Feb-09 6:08 
GeneralRe: And Or and Xor with floating point Pin
PIEBALDconsult25-Feb-09 6:48
mvePIEBALDconsult25-Feb-09 6:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.