Re: Finding a point on Line Perpendicular to another Line
- From: "Michael Harrington" <mikharr@xxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 06:38:17 +1000
"ebresie" <ebresie@xxxxxxxxx> wrote in message
news:1177506403.476421.30810@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Okay...I'm sure to kick myself once I find the answer, but I haveIf you are not comfortable with vectors try this.
already been beating my head on my desk on this one.
I have two lines (line1 and line2). One is perpendicular the other
line, ending and bisecting the other line (basically a T). I know the
3 out of 4 end points on the two lines, with the missing point being
the bottom of the T (the point not at the intersection - this is
line2). So I have line1 with (a,b), (c,d) and (e,f),and line2 with
(c,d) and an unknown (x,y).
I know the slope (slope1) of the head of the T which is:
slope1 = (b - f) / (a - e)
And the slope of the perpendicular line (slope 2) based on known and
unknow point which is:
slope2 = (y - d) / (x - c)
Alternatively, since line2 is perpendicular to line1, based on slope 1
I can get (using slope1 = -1 / slope2):
slope2 = -(a - e) / (b - f)
I can use these two versions and substitute to get:
(y - d) / (x - c) = - (a - e ) / (b - f)
I know the length of line2 given length l, from which I can have:
l ^ 2 = (x - c) ^ 2 + (y-d) ^ 2
I think my problem may just amount to being confused as to how the
best way to solve these two simultaneous equations, but I may have
made some poor assumptions along the way.
Can someone suggest how best to approach this (am I going about this
the wrong way?) or provide some additional suggestion as to what to do
next?
Many thanks ahead of time.
Eric
Let theta be the angle line 1 makes with x axis.
theta = atan( (y1-y2)/(x1-x2))
Let (mx,my) be the point on line 1 you want perpendicular
to spring from and d be the known distance along line 2
delta_y = d*sin(theta)
delta_x = d*cos(theta)
Your desired point on line 2 is
(mx + delta_x , my + delta_y) or (mx - delta_x , my - delta_y)
hth Mick.
.
- Prev by Date: Re: is circle a multi polygon
- Next by Date: Re: Question re: r=cos[sqrt(2) * theta] on Unit Disk
- Previous by thread: Re: Finding a point on Line Perpendicular to another Line
- Next by thread: Obituary
- Index(es):
Relevant Pages
|