Results 1 to 2 of 2

Math Help - Keeping line insede a rectangle

  1. #1
    Newbie
    Joined
    Oct 2009
    Posts
    1

    Keeping line insede a rectangle

    Hi

    Can somebody please help me out. I need to find a solution for this problem:
    I've got to POINTS- A(x1,y1) and B(x2,y2) that make a LINE and a RECTANGLE (left upper corner point C (xmin,ymin) right botom corner point D(xmax,ymax) on a two dimensional graph.
    LINE can be drawn everywhere on a graph.
    RECTANGLE can be drawn everywhere on a graph.
    I need to get Points E and F that are starting point and ending point of line AB in side the RECTANGLE.

    EXAMPE:
    A(1,1)
    B(5,5)
    C(2,2)
    D(6,6)
    in this case A is outside rectangle while B is inside so E becomes (2,2) and F is B

    P.S. My biggest pbroblem is that i cant deal with all the possibilities. Im able to check say A to find out if its y is too small and then adjust it using line formua for tangent, but if i do that i end up with 16 different situations for each end of line and i know there must be a easier way. But since i havent done this type of thing in a while it takes me forever.

    Really looking forward from hearing you people.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    skeeter's Avatar
    Joined
    Jun 2008
    From
    North Texas
    Posts
    12,056
    Thanks
    894
    Quote Originally Posted by naurispunk View Post
    Hi

    Can somebody please help me out. I need to find a solution for this problem:
    I've got to POINTS- A(x1,y1) and B(x2,y2) that make a LINE and a RECTANGLE (left upper corner point C (xmin,ymin) right botom corner point D(xmax,ymax) on a two dimensional graph.
    LINE can be drawn everywhere on a graph.
    RECTANGLE can be drawn everywhere on a graph.
    I need to get Points E and F that are starting point and ending point of line AB in side the RECTANGLE.

    EXAMPE:
    A(1,1)
    B(5,5)
    C(2,2)
    D(6,6)
    in this case A is outside rectangle while B is inside so E becomes (2,2) and F is B

    P.S. My biggest pbroblem is that i cant deal with all the possibilities. Im able to check say A to find out if its y is too small and then adjust it using line formua for tangent, but if i do that i end up with 16 different situations for each end of line and i know there must be a easier way. But since i havent done this type of thing in a while it takes me forever.

    Really looking forward from hearing you people.
    duplicate post ...

    http://www.mathhelpforum.com/math-he...rectangle.html
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: June 2nd 2011, 05:56 PM
  2. Elementary Book-keeping question!
    Posted in the Business Math Forum
    Replies: 0
    Last Post: October 25th 2010, 08:36 AM
  3. Replies: 1
    Last Post: November 23rd 2009, 07:41 PM
  4. Keeping same X & Y when size has changed.
    Posted in the Trigonometry Forum
    Replies: 0
    Last Post: June 9th 2009, 06:09 AM
  5. Fitting rectangle in a rectangle.
    Posted in the Geometry Forum
    Replies: 1
    Last Post: October 11th 2008, 07:31 PM

Search Tags


/mathhelpforum @mathhelpforum