 My Math Forum find a point on the border of a rectangle.
 User Name Remember Me? Password

 Algebra Pre-Algebra and Basic Algebra Math Forum

 November 9th, 2011, 05:39 AM #1 Newbie   Joined: Nov 2011 Posts: 2 Thanks: 0 find a point on the border of a rectangle. Greetings, I have a question I would like to ask; is it possible to calculate the green point in the image I made below? And if so... how? Given are the blue points P1 and P2 and the pink point p3 and the width W and height H of the pink square. Thanks in advance! Marnix van Rijswijk.  November 9th, 2011, 06:44 AM #2 Global Moderator   Joined: Oct 2008 From: London, Ontario, Canada - The Forest City Posts: 7,968 Thanks: 1152 Math Focus: Elementary mathematics and beyond Re: find a point on the border of a rectangle. Are you able to calculate the equation of the line through P1 and P2? November 9th, 2011, 07:18 AM #3 Global Moderator   Joined: Oct 2008 From: London, Ontario, Canada - The Forest City Posts: 7,968 Thanks: 1152 Math Focus: Elementary mathematics and beyond Re: find a point on the border of a rectangle. I'll assume you have some sort of x-y coordinate system set up. We can use an equation in the form y = m * x + b, where m is the slope of the line, (its gradient) and b is its y-intercept, (where the line crosses the y-axis). m = (P1y - P2y)/(P1x - P2x). Now, to find b we use P1y = m * P1x + b, b = P1y - m * P1x. So, to get the coordinates of the green point (Gx, Gy), we use Gx = P3x and Gy = m * P3x + b. November 9th, 2011, 01:09 PM   #4
Global Moderator

Joined: May 2007

Posts: 6,834
Thanks: 733

Re: find a point on the border of a rectangle.

Quote:
 Originally Posted by mvrijswijk Greetings, I have a question I would like to ask; is it possible to calculate the green point in the image I made below? And if so... how? Given are the blue points P1 and P2 and the pink point p3 and the width W and height H of the pink square. Thanks in advance! Marnix van Rijswijk. You need to say something about the orientation of the rectangle. Are the sides parallel to the axes? November 10th, 2011, 01:56 AM #5 Newbie   Joined: Nov 2011 Posts: 2 Thanks: 0 Re: find a point on the border of a rectangle. Ah sorry, yes the sides are parallel to the axes, although if you know an answer to calculate this with a rectangle that's not parallel to the axes I'm all ears. And yes I'm using an x,y coordinate system. November 10th, 2011, 01:13 PM   #6
Global Moderator

Joined: May 2007

Posts: 6,834
Thanks: 733

Re: find a point on the border of a rectangle.

Quote:
 Originally Posted by mvrijswijk Ah sorry, yes the sides are parallel to the axes, although if you know an answer to calculate this with a rectangle that's not parallel to the axes I'm all ears. And yes I'm using an x,y coordinate system.
If the lines are not parallel to the axis, you need to fix the orientation, for example by defining another corner point. Once that is done, you just need to get the intersection of two lines. Tags border, find, point, rectangle Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post helpmeplease12 Algebra 2 January 27th, 2014 01:18 PM grace25 Algebra 14 November 23rd, 2012 01:53 AM tmac20 Algebra 3 November 1st, 2011 03:57 PM mhurkman Algebra 4 February 7th, 2011 10:40 AM ManuLi Algebra 2 August 20th, 2009 03:25 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      