Results 1 to 2 of 2

Math Help - Retreieve X & Y Values based on which side of the square you are closer to?

  1. #1
    Newbie
    Joined
    Jan 2011
    Posts
    1

    Retreieve X & Y Values based on which side of the square you are closer to?

    So i have a problem that i dont really know how to figure out per se.
    I have a Box on a X/Y plane but for the sake of the conversation im going to say i have 4 points on an X/Y plane. There will be a dot at random place somewhere in this box how do i figure out which dot this random dot is close to?

    Im producing a game that if an object intersects this box its going to send it outside of the box based on which side its closer to;
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    You can find the distance from the point to each of the sides, take the minimum, and go from there. Here's a link to a page that shows you how to compute the distance from a point to a line.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 3
    Last Post: July 2nd 2011, 08:03 PM
  2. square based pyramid angle
    Posted in the Trigonometry Forum
    Replies: 4
    Last Post: December 10th 2010, 06:49 PM
  3. to set values based on x values
    Posted in the Algebra Forum
    Replies: 0
    Last Post: June 11th 2010, 04:58 AM
  4. Replies: 1
    Last Post: April 20th 2009, 05:52 PM
  5. Problem based on square root
    Posted in the Algebra Forum
    Replies: 3
    Last Post: March 30th 2009, 09:39 PM

Search Tags


/mathhelpforum @mathhelpforum