Advanced Math/Geometry

Advertisement


Question
I'm having a problem understanding the theory behind determining if a set of coordinates lies with a rectangle. The rectangle can of course be on an angle so simply checking if the Coord X / Y is greater then the max Rectangle X / Y won't cut it.
Thank you.

Answer
Hi Micheal,

Thank you for asking me this question. I must say this is very interesting. I found many ways of doing this, but one of the ways seemed the easiest. First you must find the equation of each of the sides in the form Ax + By = C. Next, for each side, simply take the coordinates of your point lets say (a,b) and find Aa + Bb. if this value is higher than C, then it is on the upper region of the side, if its is lower than C, then it is on the lower region of the side. Once you have done this for each side, you should know whether or not the point is in the rectangle. If you cannot picture where the point is, then what you could do is draw a very, very rough graph of the rectangle (all you need is to know which line is where). Then, if the test gave lower region, you draw an arrow downward. If the test gave higher, you draw an arrow upward. Do this for each side of the rectangle. If the point is inside the rectangle, all the arrows should point into the rectangle.

To sum this answer up, all you basically have to do is figure out which side of each rectangle side the point is on. You can do this by A*a + B*b where a,b is the coordinates of the point and A, and B are constants from the equation of the line. Then, if your sum is greater than C its on the upper side and if your sum is less than C its on the lower side.

I hope this helps

Robi

Feel free to ask if anything wasn't clear

Advanced Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Robi Bhattacharjee

Expertise

I can answer a variety of questions on mathematics. Questions on trigonometry, calculus(preferably single variable), algebra, geometry, and number theory will be answered. I cannot answer questions on abstract branches of mathematics such as group theory. I also cannot answer questions on statistics. In number theory, I can answer questions on congruences, prime numbers, units, functions, and the riemann-zeta function.

Experience

I have studied advanced math my entire life. I started calculus in sixth grade. I have attended numerous math competitions and I am attending math organizations such as the San-Diego math circle. Also, this year I have been invited to the USAMO which is a prestigious math competition (Every year the USAMO invites 500 students from across the USA to participate in this competition. The top 6 go to represent the USA in the International Math Olympiad).

Organizations
I am in the San Diego Math Circle

Education/Credentials
I am entering high school and have received a perfect score and the STAR test 5 times in a row. I also have gotten recognitions in the AMC 10, AIME, Math Counts, and ARML. Additionally, I have won the San Diego Math Olimpiad twice in a row.

©2012 About.com, a part of The New York Times Company. All rights reserved.