Results 1 to 3 of 3

Math Help - I forgot everything since highschool. Need help with this simple equation

  1. #1
    Newbie
    Joined
    Jul 2010
    Posts
    2

    I forgot everything since highschool. Need help with this simple equation

    Hello,

    I have a dynamic picture that could be any arbitrary size. I also have a picture frame, that is 567pixels wide and 360pixels high (pixels can be inches, or any other measurement. I chose pixels for this scenario). The dynamic picture needs to fit within the frame, but at the same time, fit within it at its proper scale. So if the dyanmic picture is 1000pixels x 1000pixels, for it to properly fit to scale in this scenario, it would have to be 360pixels wide x 360pixels high (can't be more than 360 high cause it has to fit in the frame). If I decided to make it 567 x 360 (to fit the frame), then obviously the picture would be stretched, which is a no go.

    Can anybody help me with this simple equation?
    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    May 2010
    Posts
    1,030
    Thanks
    28
    define:
    x_p,y_p the horizontal and vertical sizes of your picture
    x_f,y_f the horizontal and vertical sizes of your frame
    s a scale factor we will apply to your picture to make it fit in the frame.

    Lets find a scale factor s to apply to your picture to make it fit in the frame

    suppose you wanted to change the height so that it would just fit in the vertical dimension;
    s_y = \frac{y_f}{y_p}


    now suppose you you wanted to change the width so that it would just fit in the horizontal dimension
    s_y = \frac{x_f}{x_p}

    We want it to fit in both dimensions, and apply the same factor to height and width
    s = min(s_x,s_y,1) = min \left( \frac{x_f}{x_p}, \frac{y_f}{y_p},1 \right)


    Note: The ",1" will prevent the image being blown up to fill the frame if it is smaller than both dimensions of the frame

    The final dimensions of your picture are
    sx_p \times sy_p
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jul 2010
    Posts
    2
    Interesting! Thanks for the help! I am going to try to make this work now.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Pre-ap algebra 2 highschool
    Posted in the Algebra Forum
    Replies: 3
    Last Post: November 29th 2010, 07:53 AM
  2. simple question but forgot how to solve
    Posted in the Algebra Forum
    Replies: 5
    Last Post: April 1st 2010, 02:54 AM
  3. Norwegian Integral Highschool task
    Posted in the Calculus Forum
    Replies: 5
    Last Post: April 22nd 2009, 05:59 AM
  4. College/Highschool algebra
    Posted in the Algebra Forum
    Replies: 1
    Last Post: August 23rd 2007, 10:49 AM
  5. forgot simple tri question! need help
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: August 13th 2007, 03:49 PM

Search Tags


/mathhelpforum @mathhelpforum