Find point at distance d perpendicular to endpoint A of given line segment AB Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Computing endpoint coordinates of point P of a line of known length d that ends perpendicularly at the known mid-point coordinates of another linecalculating perpendicular and angular distance between line segments in 3dFinding a point along a line in three dimensions, given two pointsSimple Geometry: find point from various linesDistance between a circle and a line segmentPeripendicular distance from a line segmentPeripendicular Line at distance d from point in a given directionHow to get the second point in a line segment knowing its first point, distance and perpendicular line segment?shortest distance between a point and a line segmentPossibility to construct a perpendicular to a line intervalHow to get ray to segment distance
Order between one to one functions and their inverses
How do you write "wild blueberries flavored"?
Random body shuffle every night—can we still function?
Is there a verb for listening stealthily?
NIntegrate on a solution of a matrix ODE
Is Normal(mean, variance) mod x still a normal distribution?
First paper to introduce the "principal-agent problem"
Releasing Patch File for BSD3 Licensed Project
Centre cell contents vertically
Inverse square law not accurate for non-point masses?
Why is a lens darker than other ones when applying the same settings?
Weaponising the Grasp-at-a-Distance spell
Sally's older brother
Trying to understand entropy as a novice in thermodynamics
How to ask rejected full-time candidates to apply to teach individual courses?
Why not use the yoke to control yaw, as well as pitch and roll?
The bible of geometry: Is there a modern treatment of geometries from the most primitive to the most advanced?
Noise in Eigenvalues plot
How can I prevent/balance waiting and turtling as a response to cooldown mechanics
Is there a spell that can create a permanent fire?
2018 MacBook Pro won't let me install macOS High Sierra 10.13 from USB installer
Problem with display of presentation
malloc in main() or malloc in another function: allocating memory for a struct and its members
Is it OK to use the testing sample to compare algorithms?
Find point at distance d perpendicular to endpoint A of given line segment AB
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Computing endpoint coordinates of point P of a line of known length d that ends perpendicularly at the known mid-point coordinates of another linecalculating perpendicular and angular distance between line segments in 3dFinding a point along a line in three dimensions, given two pointsSimple Geometry: find point from various linesDistance between a circle and a line segmentPeripendicular distance from a line segmentPeripendicular Line at distance d from point in a given directionHow to get the second point in a line segment knowing its first point, distance and perpendicular line segment?shortest distance between a point and a line segmentPossibility to construct a perpendicular to a line intervalHow to get ray to segment distance
$begingroup$
Given a line segment from point $A$ to point $B$, how do you find a point $A_2 $ that is perpendicular to the point $A$ at a distance $d$ from $A$? Points $A, B$ and distance $d$ are given.
I cant seem to figure out the correct way to solve this problem and my linear algebra / geometry are a bit rusty. It seems as though using Orthogonal Projection may work since I have the distance but I cant figure out the location of the point. Any ideas?
Take a look at the following Diagram for clarification.

linear-algebra geometry
$endgroup$
add a comment |
$begingroup$
Given a line segment from point $A$ to point $B$, how do you find a point $A_2 $ that is perpendicular to the point $A$ at a distance $d$ from $A$? Points $A, B$ and distance $d$ are given.
I cant seem to figure out the correct way to solve this problem and my linear algebra / geometry are a bit rusty. It seems as though using Orthogonal Projection may work since I have the distance but I cant figure out the location of the point. Any ideas?
Take a look at the following Diagram for clarification.

linear-algebra geometry
$endgroup$
$begingroup$
Orthogonality is defined for lines, not for points.
$endgroup$
– Jack D'Aurizio
Apr 18 '16 at 19:20
$begingroup$
Ah okay. If I would like the line A2B2 which has points A2 and B2 which are perpendicular to their respective A and B points, would orthogonality still apply?
$endgroup$
– user4956079
Apr 18 '16 at 19:25
$begingroup$
There are two such points. You also somehow need to decide on which side of the line $A_2$ lies.
$endgroup$
– amd
Apr 18 '16 at 20:16
$begingroup$
Well I use the following formula to find the perpendicular distance from any point (m,n) to the line. d= (Am+Bn+C) / √(A2 +B2) then depending on the sign of the distance I know which side the point (A2x, A2y) should be on. I then want to translate the points by that distance to redraw the line.
$endgroup$
– user4956079
Apr 19 '16 at 11:36
add a comment |
$begingroup$
Given a line segment from point $A$ to point $B$, how do you find a point $A_2 $ that is perpendicular to the point $A$ at a distance $d$ from $A$? Points $A, B$ and distance $d$ are given.
I cant seem to figure out the correct way to solve this problem and my linear algebra / geometry are a bit rusty. It seems as though using Orthogonal Projection may work since I have the distance but I cant figure out the location of the point. Any ideas?
Take a look at the following Diagram for clarification.

linear-algebra geometry
$endgroup$
Given a line segment from point $A$ to point $B$, how do you find a point $A_2 $ that is perpendicular to the point $A$ at a distance $d$ from $A$? Points $A, B$ and distance $d$ are given.
I cant seem to figure out the correct way to solve this problem and my linear algebra / geometry are a bit rusty. It seems as though using Orthogonal Projection may work since I have the distance but I cant figure out the location of the point. Any ideas?
Take a look at the following Diagram for clarification.

linear-algebra geometry
linear-algebra geometry
edited Apr 19 '16 at 2:32
hardmath
29.4k953101
29.4k953101
asked Apr 18 '16 at 19:18
user4956079user4956079
1
1
$begingroup$
Orthogonality is defined for lines, not for points.
$endgroup$
– Jack D'Aurizio
Apr 18 '16 at 19:20
$begingroup$
Ah okay. If I would like the line A2B2 which has points A2 and B2 which are perpendicular to their respective A and B points, would orthogonality still apply?
$endgroup$
– user4956079
Apr 18 '16 at 19:25
$begingroup$
There are two such points. You also somehow need to decide on which side of the line $A_2$ lies.
$endgroup$
– amd
Apr 18 '16 at 20:16
$begingroup$
Well I use the following formula to find the perpendicular distance from any point (m,n) to the line. d= (Am+Bn+C) / √(A2 +B2) then depending on the sign of the distance I know which side the point (A2x, A2y) should be on. I then want to translate the points by that distance to redraw the line.
$endgroup$
– user4956079
Apr 19 '16 at 11:36
add a comment |
$begingroup$
Orthogonality is defined for lines, not for points.
$endgroup$
– Jack D'Aurizio
Apr 18 '16 at 19:20
$begingroup$
Ah okay. If I would like the line A2B2 which has points A2 and B2 which are perpendicular to their respective A and B points, would orthogonality still apply?
$endgroup$
– user4956079
Apr 18 '16 at 19:25
$begingroup$
There are two such points. You also somehow need to decide on which side of the line $A_2$ lies.
$endgroup$
– amd
Apr 18 '16 at 20:16
$begingroup$
Well I use the following formula to find the perpendicular distance from any point (m,n) to the line. d= (Am+Bn+C) / √(A2 +B2) then depending on the sign of the distance I know which side the point (A2x, A2y) should be on. I then want to translate the points by that distance to redraw the line.
$endgroup$
– user4956079
Apr 19 '16 at 11:36
$begingroup$
Orthogonality is defined for lines, not for points.
$endgroup$
– Jack D'Aurizio
Apr 18 '16 at 19:20
$begingroup$
Orthogonality is defined for lines, not for points.
$endgroup$
– Jack D'Aurizio
Apr 18 '16 at 19:20
$begingroup$
Ah okay. If I would like the line A2B2 which has points A2 and B2 which are perpendicular to their respective A and B points, would orthogonality still apply?
$endgroup$
– user4956079
Apr 18 '16 at 19:25
$begingroup$
Ah okay. If I would like the line A2B2 which has points A2 and B2 which are perpendicular to their respective A and B points, would orthogonality still apply?
$endgroup$
– user4956079
Apr 18 '16 at 19:25
$begingroup$
There are two such points. You also somehow need to decide on which side of the line $A_2$ lies.
$endgroup$
– amd
Apr 18 '16 at 20:16
$begingroup$
There are two such points. You also somehow need to decide on which side of the line $A_2$ lies.
$endgroup$
– amd
Apr 18 '16 at 20:16
$begingroup$
Well I use the following formula to find the perpendicular distance from any point (m,n) to the line. d= (Am+Bn+C) / √(A2 +B2) then depending on the sign of the distance I know which side the point (A2x, A2y) should be on. I then want to translate the points by that distance to redraw the line.
$endgroup$
– user4956079
Apr 19 '16 at 11:36
$begingroup$
Well I use the following formula to find the perpendicular distance from any point (m,n) to the line. d= (Am+Bn+C) / √(A2 +B2) then depending on the sign of the distance I know which side the point (A2x, A2y) should be on. I then want to translate the points by that distance to redraw the line.
$endgroup$
– user4956079
Apr 19 '16 at 11:36
add a comment |
4 Answers
4
active
oldest
votes
$begingroup$
I would use the angles, get the slope of the line as follows:
$$
theta = arctanfracy_B-y_Ax_B-x_A
$$
Then the coordinates of $A_2$ would be
$$
x_A_2 = x_A+d cos(90+theta) \
y_A_2 = y_A+d sin(90+theta)
$$
$endgroup$
$begingroup$
This can be solved without computing trig functions and their inverses. If the slope of $AB$ is $m$, then the slope of $AA_2$ is $-1/m$, i.e., $-fracx_B-x_Ay_B-y_A$.
$endgroup$
– amd
Apr 18 '16 at 20:18
$begingroup$
How does this solution take the length d into account? The point A2 must be at a length d away from point A1.
$endgroup$
– user4956079
Apr 19 '16 at 11:19
$begingroup$
Please check the last 2 equations carefully.
$endgroup$
– user164550
Apr 19 '16 at 16:11
add a comment |
$begingroup$
So I have come to a solution. Let me know if you guys see any flaws. It's based off of Ahmed S. answer.
Since we know the length of the line AA2 and we can calculate the slope of the line AB we can find the coordinates of A2.
Find the slope of the perpendicular line AA2.
- Slope of AA2 = (1 / m) = (B.x - A.x) / (B.y - A.y)
Find theta.
- Theta = arctan (slope of AA2)
- A2.x = A.x - d * cos(theta)
- A2.y = A.y + d * sin(theta)
Find A2 image
$endgroup$
add a comment |
$begingroup$
Rephrased question: Find the end point of a right triangle, one of whose sides is the given line segment.
Let's restrict this problem in 2-Dimension space. This problem can be solved in three steps:
Find the direction of the perpendicular vector,
Find the size of a vector with specified length in that direction,
Add that vector to the starting point, namely $A$.
Step 1.
Say $AB=(x_1,y_1),$ then any other vector $(x_2,y_2)$ perpendicular to $AB$ will share the property that
$$ x_1cdot x_2 + y_1cdot y_2 = 0$$
then you will have $$fracx_2y_2 = -fracy_1x_1$$
Step 2.
While the length of the vector is defined as $l^2$-norm, i.e., if the distance in $y$ direction is 1, the length of the vector is $$sqrtleft(fracy_1x_1right)^2+1$$
If you need your distance to be $d$, then the vector should be $$pmleft(-fracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
Step 3.
If you have the position of your start point of $A = (x_a, y_a)$ then the other point of this vector would be $$left( x_ampfracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, y_a pm fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
$endgroup$
add a comment |
$begingroup$
I'm going to use "vectors" (which are just pairs of numbers in this case, which I'll write in brackets), which can be added to points termwise, so that
$$
(1, 2) + [3, 5] = (4, 7)
$$
Vectors can also be multiplied by numbers, termwise, so that
$$
frac12[3, 5] = [3/2, 5/2].
$$
You can think of vectors as representing, in the plane, movement in some direction, so that $[3, 5]$ means "move 3 units to the right, 5 units up," and when you do so, it makes a lot of sense to add a vector to a point: you take the point (which was $(1, 2)$ in my example) and move it $3$ units right and $5$ units up, and you end up at $(4, 7)$. When you multiply a vector by $frac12$, you make the displacement half as big, and so on.
One last thing: I wrote
$$
(1, 2) + [3, 5] = (4, 7)
$$
so show how to add a vector to a point, but we can do some algebra (moving the $(1,2)$ to the right hand side) and write
$$
[3, 5] = (4, 7) - (1, 2),
$$
and now you've got a really nice thing: the "difference" of two points is a vector. In fact, if you have points $P$ and $Q$, then $v = Q - P$ is exactly the vector that moves $P$ to $Q$ (which we often draw as an arrow pointing from $P$ to $Q$).
Here's a really useful fact: if you have a vector $[a, b]$, and at least one of $a$ and $b$ is nonzero, then the vector
$$
[-b, a]
$$
is perpendicular to $[a, b]$, and is rotated 90 degrees counterclockwise from $[a, b]$.
The other useful fact is that if you have a vector $[a, b]$ of some length, then
$$
frac1{sqrta^2+b^2 [a, b]
$$
is a vector pointing in the same direction, but with length $1$. (A length-1 vector is called "unit vector" sometimes.)
OK, with all that in mind, let's return to your problem. First, let's let
$$
w = B - A
$$
That's the vector that moves $A$ to $B$, or an arrow from $A$ pointing towards $B$. To make this concrete, I'm going to pick
$$
A = (1, 4)\
B = (5, 6)
$$
So now
$$
w = B - A = (5, 6) - (1, 5) = [4, 1]
$$
for our example. We can produce a unit vector in the same direction as $w$ by the trick mentioned above: we multiply by $1$ over a square root. If $w = (a, b)$, we compute
$$
v = frac1sqrta^2 + b^2 [a, b].
$$
In our example, this comes out to
$$
v = frac1sqrt4^2 + 1^2[4, 1] = [frac4sqrt17, frac1sqrt17].
$$
If we then use the first trick -- swap the two entries and negate the first, we get
$$
v^perp = [-frac1sqrt17, frac4sqrt17]
$$
which is an arrow of length $1$ pointing perpendicular to the line from $A$ to $B$.
In the general case, we get
$$
v^perp = frac1sqrta^2 + b^2 [-b, a].
$$
If we multiply this by $d$ and add it to the point $A$, we get the point $A'$:
$$
A' = A + d v^perp.
$$
In our example, picking $d = 2$, that gives us
beginalign
A'
&= (1, 4) + 2[-frac1sqrt17, frac4sqrt17 ]\
&= (1, 4) + [-frac2sqrt17, frac8sqrt17 ]\
&= (1-frac2sqrt17, 4 + frac8sqrt17).
endalign
This works perfectly as long as the vector $w$ isn't $[0,0]$ (which we need to make the "perpendicular" vector). But this just means "as long as the points $A$ and $B$ are different", which is obviously necessary -- if they're the same, the question doesn't really make sense.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1748456%2ffind-point-at-distance-d-perpendicular-to-endpoint-a-of-given-line-segment-ab%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I would use the angles, get the slope of the line as follows:
$$
theta = arctanfracy_B-y_Ax_B-x_A
$$
Then the coordinates of $A_2$ would be
$$
x_A_2 = x_A+d cos(90+theta) \
y_A_2 = y_A+d sin(90+theta)
$$
$endgroup$
$begingroup$
This can be solved without computing trig functions and their inverses. If the slope of $AB$ is $m$, then the slope of $AA_2$ is $-1/m$, i.e., $-fracx_B-x_Ay_B-y_A$.
$endgroup$
– amd
Apr 18 '16 at 20:18
$begingroup$
How does this solution take the length d into account? The point A2 must be at a length d away from point A1.
$endgroup$
– user4956079
Apr 19 '16 at 11:19
$begingroup$
Please check the last 2 equations carefully.
$endgroup$
– user164550
Apr 19 '16 at 16:11
add a comment |
$begingroup$
I would use the angles, get the slope of the line as follows:
$$
theta = arctanfracy_B-y_Ax_B-x_A
$$
Then the coordinates of $A_2$ would be
$$
x_A_2 = x_A+d cos(90+theta) \
y_A_2 = y_A+d sin(90+theta)
$$
$endgroup$
$begingroup$
This can be solved without computing trig functions and their inverses. If the slope of $AB$ is $m$, then the slope of $AA_2$ is $-1/m$, i.e., $-fracx_B-x_Ay_B-y_A$.
$endgroup$
– amd
Apr 18 '16 at 20:18
$begingroup$
How does this solution take the length d into account? The point A2 must be at a length d away from point A1.
$endgroup$
– user4956079
Apr 19 '16 at 11:19
$begingroup$
Please check the last 2 equations carefully.
$endgroup$
– user164550
Apr 19 '16 at 16:11
add a comment |
$begingroup$
I would use the angles, get the slope of the line as follows:
$$
theta = arctanfracy_B-y_Ax_B-x_A
$$
Then the coordinates of $A_2$ would be
$$
x_A_2 = x_A+d cos(90+theta) \
y_A_2 = y_A+d sin(90+theta)
$$
$endgroup$
I would use the angles, get the slope of the line as follows:
$$
theta = arctanfracy_B-y_Ax_B-x_A
$$
Then the coordinates of $A_2$ would be
$$
x_A_2 = x_A+d cos(90+theta) \
y_A_2 = y_A+d sin(90+theta)
$$
answered Apr 18 '16 at 19:49
user164550
$begingroup$
This can be solved without computing trig functions and their inverses. If the slope of $AB$ is $m$, then the slope of $AA_2$ is $-1/m$, i.e., $-fracx_B-x_Ay_B-y_A$.
$endgroup$
– amd
Apr 18 '16 at 20:18
$begingroup$
How does this solution take the length d into account? The point A2 must be at a length d away from point A1.
$endgroup$
– user4956079
Apr 19 '16 at 11:19
$begingroup$
Please check the last 2 equations carefully.
$endgroup$
– user164550
Apr 19 '16 at 16:11
add a comment |
$begingroup$
This can be solved without computing trig functions and their inverses. If the slope of $AB$ is $m$, then the slope of $AA_2$ is $-1/m$, i.e., $-fracx_B-x_Ay_B-y_A$.
$endgroup$
– amd
Apr 18 '16 at 20:18
$begingroup$
How does this solution take the length d into account? The point A2 must be at a length d away from point A1.
$endgroup$
– user4956079
Apr 19 '16 at 11:19
$begingroup$
Please check the last 2 equations carefully.
$endgroup$
– user164550
Apr 19 '16 at 16:11
$begingroup$
This can be solved without computing trig functions and their inverses. If the slope of $AB$ is $m$, then the slope of $AA_2$ is $-1/m$, i.e., $-fracx_B-x_Ay_B-y_A$.
$endgroup$
– amd
Apr 18 '16 at 20:18
$begingroup$
This can be solved without computing trig functions and their inverses. If the slope of $AB$ is $m$, then the slope of $AA_2$ is $-1/m$, i.e., $-fracx_B-x_Ay_B-y_A$.
$endgroup$
– amd
Apr 18 '16 at 20:18
$begingroup$
How does this solution take the length d into account? The point A2 must be at a length d away from point A1.
$endgroup$
– user4956079
Apr 19 '16 at 11:19
$begingroup$
How does this solution take the length d into account? The point A2 must be at a length d away from point A1.
$endgroup$
– user4956079
Apr 19 '16 at 11:19
$begingroup$
Please check the last 2 equations carefully.
$endgroup$
– user164550
Apr 19 '16 at 16:11
$begingroup$
Please check the last 2 equations carefully.
$endgroup$
– user164550
Apr 19 '16 at 16:11
add a comment |
$begingroup$
So I have come to a solution. Let me know if you guys see any flaws. It's based off of Ahmed S. answer.
Since we know the length of the line AA2 and we can calculate the slope of the line AB we can find the coordinates of A2.
Find the slope of the perpendicular line AA2.
- Slope of AA2 = (1 / m) = (B.x - A.x) / (B.y - A.y)
Find theta.
- Theta = arctan (slope of AA2)
- A2.x = A.x - d * cos(theta)
- A2.y = A.y + d * sin(theta)
Find A2 image
$endgroup$
add a comment |
$begingroup$
So I have come to a solution. Let me know if you guys see any flaws. It's based off of Ahmed S. answer.
Since we know the length of the line AA2 and we can calculate the slope of the line AB we can find the coordinates of A2.
Find the slope of the perpendicular line AA2.
- Slope of AA2 = (1 / m) = (B.x - A.x) / (B.y - A.y)
Find theta.
- Theta = arctan (slope of AA2)
- A2.x = A.x - d * cos(theta)
- A2.y = A.y + d * sin(theta)
Find A2 image
$endgroup$
add a comment |
$begingroup$
So I have come to a solution. Let me know if you guys see any flaws. It's based off of Ahmed S. answer.
Since we know the length of the line AA2 and we can calculate the slope of the line AB we can find the coordinates of A2.
Find the slope of the perpendicular line AA2.
- Slope of AA2 = (1 / m) = (B.x - A.x) / (B.y - A.y)
Find theta.
- Theta = arctan (slope of AA2)
- A2.x = A.x - d * cos(theta)
- A2.y = A.y + d * sin(theta)
Find A2 image
$endgroup$
So I have come to a solution. Let me know if you guys see any flaws. It's based off of Ahmed S. answer.
Since we know the length of the line AA2 and we can calculate the slope of the line AB we can find the coordinates of A2.
Find the slope of the perpendicular line AA2.
- Slope of AA2 = (1 / m) = (B.x - A.x) / (B.y - A.y)
Find theta.
- Theta = arctan (slope of AA2)
- A2.x = A.x - d * cos(theta)
- A2.y = A.y + d * sin(theta)
Find A2 image
answered Apr 19 '16 at 12:49
user4956079user4956079
1
1
add a comment |
add a comment |
$begingroup$
Rephrased question: Find the end point of a right triangle, one of whose sides is the given line segment.
Let's restrict this problem in 2-Dimension space. This problem can be solved in three steps:
Find the direction of the perpendicular vector,
Find the size of a vector with specified length in that direction,
Add that vector to the starting point, namely $A$.
Step 1.
Say $AB=(x_1,y_1),$ then any other vector $(x_2,y_2)$ perpendicular to $AB$ will share the property that
$$ x_1cdot x_2 + y_1cdot y_2 = 0$$
then you will have $$fracx_2y_2 = -fracy_1x_1$$
Step 2.
While the length of the vector is defined as $l^2$-norm, i.e., if the distance in $y$ direction is 1, the length of the vector is $$sqrtleft(fracy_1x_1right)^2+1$$
If you need your distance to be $d$, then the vector should be $$pmleft(-fracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
Step 3.
If you have the position of your start point of $A = (x_a, y_a)$ then the other point of this vector would be $$left( x_ampfracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, y_a pm fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
$endgroup$
add a comment |
$begingroup$
Rephrased question: Find the end point of a right triangle, one of whose sides is the given line segment.
Let's restrict this problem in 2-Dimension space. This problem can be solved in three steps:
Find the direction of the perpendicular vector,
Find the size of a vector with specified length in that direction,
Add that vector to the starting point, namely $A$.
Step 1.
Say $AB=(x_1,y_1),$ then any other vector $(x_2,y_2)$ perpendicular to $AB$ will share the property that
$$ x_1cdot x_2 + y_1cdot y_2 = 0$$
then you will have $$fracx_2y_2 = -fracy_1x_1$$
Step 2.
While the length of the vector is defined as $l^2$-norm, i.e., if the distance in $y$ direction is 1, the length of the vector is $$sqrtleft(fracy_1x_1right)^2+1$$
If you need your distance to be $d$, then the vector should be $$pmleft(-fracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
Step 3.
If you have the position of your start point of $A = (x_a, y_a)$ then the other point of this vector would be $$left( x_ampfracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, y_a pm fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
$endgroup$
add a comment |
$begingroup$
Rephrased question: Find the end point of a right triangle, one of whose sides is the given line segment.
Let's restrict this problem in 2-Dimension space. This problem can be solved in three steps:
Find the direction of the perpendicular vector,
Find the size of a vector with specified length in that direction,
Add that vector to the starting point, namely $A$.
Step 1.
Say $AB=(x_1,y_1),$ then any other vector $(x_2,y_2)$ perpendicular to $AB$ will share the property that
$$ x_1cdot x_2 + y_1cdot y_2 = 0$$
then you will have $$fracx_2y_2 = -fracy_1x_1$$
Step 2.
While the length of the vector is defined as $l^2$-norm, i.e., if the distance in $y$ direction is 1, the length of the vector is $$sqrtleft(fracy_1x_1right)^2+1$$
If you need your distance to be $d$, then the vector should be $$pmleft(-fracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
Step 3.
If you have the position of your start point of $A = (x_a, y_a)$ then the other point of this vector would be $$left( x_ampfracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, y_a pm fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
$endgroup$
Rephrased question: Find the end point of a right triangle, one of whose sides is the given line segment.
Let's restrict this problem in 2-Dimension space. This problem can be solved in three steps:
Find the direction of the perpendicular vector,
Find the size of a vector with specified length in that direction,
Add that vector to the starting point, namely $A$.
Step 1.
Say $AB=(x_1,y_1),$ then any other vector $(x_2,y_2)$ perpendicular to $AB$ will share the property that
$$ x_1cdot x_2 + y_1cdot y_2 = 0$$
then you will have $$fracx_2y_2 = -fracy_1x_1$$
Step 2.
While the length of the vector is defined as $l^2$-norm, i.e., if the distance in $y$ direction is 1, the length of the vector is $$sqrtleft(fracy_1x_1right)^2+1$$
If you need your distance to be $d$, then the vector should be $$pmleft(-fracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
Step 3.
If you have the position of your start point of $A = (x_a, y_a)$ then the other point of this vector would be $$left( x_ampfracy_1x_1fracdsqrtleft(fracy_1x_1right)^2+1, y_a pm fracdsqrtleft(fracy_1x_1right)^2+1 right)$$
edited Apr 19 '16 at 16:23
answered Apr 18 '16 at 19:50
Rax YaoRax Yao
12
12
add a comment |
add a comment |
$begingroup$
I'm going to use "vectors" (which are just pairs of numbers in this case, which I'll write in brackets), which can be added to points termwise, so that
$$
(1, 2) + [3, 5] = (4, 7)
$$
Vectors can also be multiplied by numbers, termwise, so that
$$
frac12[3, 5] = [3/2, 5/2].
$$
You can think of vectors as representing, in the plane, movement in some direction, so that $[3, 5]$ means "move 3 units to the right, 5 units up," and when you do so, it makes a lot of sense to add a vector to a point: you take the point (which was $(1, 2)$ in my example) and move it $3$ units right and $5$ units up, and you end up at $(4, 7)$. When you multiply a vector by $frac12$, you make the displacement half as big, and so on.
One last thing: I wrote
$$
(1, 2) + [3, 5] = (4, 7)
$$
so show how to add a vector to a point, but we can do some algebra (moving the $(1,2)$ to the right hand side) and write
$$
[3, 5] = (4, 7) - (1, 2),
$$
and now you've got a really nice thing: the "difference" of two points is a vector. In fact, if you have points $P$ and $Q$, then $v = Q - P$ is exactly the vector that moves $P$ to $Q$ (which we often draw as an arrow pointing from $P$ to $Q$).
Here's a really useful fact: if you have a vector $[a, b]$, and at least one of $a$ and $b$ is nonzero, then the vector
$$
[-b, a]
$$
is perpendicular to $[a, b]$, and is rotated 90 degrees counterclockwise from $[a, b]$.
The other useful fact is that if you have a vector $[a, b]$ of some length, then
$$
frac1{sqrta^2+b^2 [a, b]
$$
is a vector pointing in the same direction, but with length $1$. (A length-1 vector is called "unit vector" sometimes.)
OK, with all that in mind, let's return to your problem. First, let's let
$$
w = B - A
$$
That's the vector that moves $A$ to $B$, or an arrow from $A$ pointing towards $B$. To make this concrete, I'm going to pick
$$
A = (1, 4)\
B = (5, 6)
$$
So now
$$
w = B - A = (5, 6) - (1, 5) = [4, 1]
$$
for our example. We can produce a unit vector in the same direction as $w$ by the trick mentioned above: we multiply by $1$ over a square root. If $w = (a, b)$, we compute
$$
v = frac1sqrta^2 + b^2 [a, b].
$$
In our example, this comes out to
$$
v = frac1sqrt4^2 + 1^2[4, 1] = [frac4sqrt17, frac1sqrt17].
$$
If we then use the first trick -- swap the two entries and negate the first, we get
$$
v^perp = [-frac1sqrt17, frac4sqrt17]
$$
which is an arrow of length $1$ pointing perpendicular to the line from $A$ to $B$.
In the general case, we get
$$
v^perp = frac1sqrta^2 + b^2 [-b, a].
$$
If we multiply this by $d$ and add it to the point $A$, we get the point $A'$:
$$
A' = A + d v^perp.
$$
In our example, picking $d = 2$, that gives us
beginalign
A'
&= (1, 4) + 2[-frac1sqrt17, frac4sqrt17 ]\
&= (1, 4) + [-frac2sqrt17, frac8sqrt17 ]\
&= (1-frac2sqrt17, 4 + frac8sqrt17).
endalign
This works perfectly as long as the vector $w$ isn't $[0,0]$ (which we need to make the "perpendicular" vector). But this just means "as long as the points $A$ and $B$ are different", which is obviously necessary -- if they're the same, the question doesn't really make sense.
$endgroup$
add a comment |
$begingroup$
I'm going to use "vectors" (which are just pairs of numbers in this case, which I'll write in brackets), which can be added to points termwise, so that
$$
(1, 2) + [3, 5] = (4, 7)
$$
Vectors can also be multiplied by numbers, termwise, so that
$$
frac12[3, 5] = [3/2, 5/2].
$$
You can think of vectors as representing, in the plane, movement in some direction, so that $[3, 5]$ means "move 3 units to the right, 5 units up," and when you do so, it makes a lot of sense to add a vector to a point: you take the point (which was $(1, 2)$ in my example) and move it $3$ units right and $5$ units up, and you end up at $(4, 7)$. When you multiply a vector by $frac12$, you make the displacement half as big, and so on.
One last thing: I wrote
$$
(1, 2) + [3, 5] = (4, 7)
$$
so show how to add a vector to a point, but we can do some algebra (moving the $(1,2)$ to the right hand side) and write
$$
[3, 5] = (4, 7) - (1, 2),
$$
and now you've got a really nice thing: the "difference" of two points is a vector. In fact, if you have points $P$ and $Q$, then $v = Q - P$ is exactly the vector that moves $P$ to $Q$ (which we often draw as an arrow pointing from $P$ to $Q$).
Here's a really useful fact: if you have a vector $[a, b]$, and at least one of $a$ and $b$ is nonzero, then the vector
$$
[-b, a]
$$
is perpendicular to $[a, b]$, and is rotated 90 degrees counterclockwise from $[a, b]$.
The other useful fact is that if you have a vector $[a, b]$ of some length, then
$$
frac1{sqrta^2+b^2 [a, b]
$$
is a vector pointing in the same direction, but with length $1$. (A length-1 vector is called "unit vector" sometimes.)
OK, with all that in mind, let's return to your problem. First, let's let
$$
w = B - A
$$
That's the vector that moves $A$ to $B$, or an arrow from $A$ pointing towards $B$. To make this concrete, I'm going to pick
$$
A = (1, 4)\
B = (5, 6)
$$
So now
$$
w = B - A = (5, 6) - (1, 5) = [4, 1]
$$
for our example. We can produce a unit vector in the same direction as $w$ by the trick mentioned above: we multiply by $1$ over a square root. If $w = (a, b)$, we compute
$$
v = frac1sqrta^2 + b^2 [a, b].
$$
In our example, this comes out to
$$
v = frac1sqrt4^2 + 1^2[4, 1] = [frac4sqrt17, frac1sqrt17].
$$
If we then use the first trick -- swap the two entries and negate the first, we get
$$
v^perp = [-frac1sqrt17, frac4sqrt17]
$$
which is an arrow of length $1$ pointing perpendicular to the line from $A$ to $B$.
In the general case, we get
$$
v^perp = frac1sqrta^2 + b^2 [-b, a].
$$
If we multiply this by $d$ and add it to the point $A$, we get the point $A'$:
$$
A' = A + d v^perp.
$$
In our example, picking $d = 2$, that gives us
beginalign
A'
&= (1, 4) + 2[-frac1sqrt17, frac4sqrt17 ]\
&= (1, 4) + [-frac2sqrt17, frac8sqrt17 ]\
&= (1-frac2sqrt17, 4 + frac8sqrt17).
endalign
This works perfectly as long as the vector $w$ isn't $[0,0]$ (which we need to make the "perpendicular" vector). But this just means "as long as the points $A$ and $B$ are different", which is obviously necessary -- if they're the same, the question doesn't really make sense.
$endgroup$
add a comment |
$begingroup$
I'm going to use "vectors" (which are just pairs of numbers in this case, which I'll write in brackets), which can be added to points termwise, so that
$$
(1, 2) + [3, 5] = (4, 7)
$$
Vectors can also be multiplied by numbers, termwise, so that
$$
frac12[3, 5] = [3/2, 5/2].
$$
You can think of vectors as representing, in the plane, movement in some direction, so that $[3, 5]$ means "move 3 units to the right, 5 units up," and when you do so, it makes a lot of sense to add a vector to a point: you take the point (which was $(1, 2)$ in my example) and move it $3$ units right and $5$ units up, and you end up at $(4, 7)$. When you multiply a vector by $frac12$, you make the displacement half as big, and so on.
One last thing: I wrote
$$
(1, 2) + [3, 5] = (4, 7)
$$
so show how to add a vector to a point, but we can do some algebra (moving the $(1,2)$ to the right hand side) and write
$$
[3, 5] = (4, 7) - (1, 2),
$$
and now you've got a really nice thing: the "difference" of two points is a vector. In fact, if you have points $P$ and $Q$, then $v = Q - P$ is exactly the vector that moves $P$ to $Q$ (which we often draw as an arrow pointing from $P$ to $Q$).
Here's a really useful fact: if you have a vector $[a, b]$, and at least one of $a$ and $b$ is nonzero, then the vector
$$
[-b, a]
$$
is perpendicular to $[a, b]$, and is rotated 90 degrees counterclockwise from $[a, b]$.
The other useful fact is that if you have a vector $[a, b]$ of some length, then
$$
frac1{sqrta^2+b^2 [a, b]
$$
is a vector pointing in the same direction, but with length $1$. (A length-1 vector is called "unit vector" sometimes.)
OK, with all that in mind, let's return to your problem. First, let's let
$$
w = B - A
$$
That's the vector that moves $A$ to $B$, or an arrow from $A$ pointing towards $B$. To make this concrete, I'm going to pick
$$
A = (1, 4)\
B = (5, 6)
$$
So now
$$
w = B - A = (5, 6) - (1, 5) = [4, 1]
$$
for our example. We can produce a unit vector in the same direction as $w$ by the trick mentioned above: we multiply by $1$ over a square root. If $w = (a, b)$, we compute
$$
v = frac1sqrta^2 + b^2 [a, b].
$$
In our example, this comes out to
$$
v = frac1sqrt4^2 + 1^2[4, 1] = [frac4sqrt17, frac1sqrt17].
$$
If we then use the first trick -- swap the two entries and negate the first, we get
$$
v^perp = [-frac1sqrt17, frac4sqrt17]
$$
which is an arrow of length $1$ pointing perpendicular to the line from $A$ to $B$.
In the general case, we get
$$
v^perp = frac1sqrta^2 + b^2 [-b, a].
$$
If we multiply this by $d$ and add it to the point $A$, we get the point $A'$:
$$
A' = A + d v^perp.
$$
In our example, picking $d = 2$, that gives us
beginalign
A'
&= (1, 4) + 2[-frac1sqrt17, frac4sqrt17 ]\
&= (1, 4) + [-frac2sqrt17, frac8sqrt17 ]\
&= (1-frac2sqrt17, 4 + frac8sqrt17).
endalign
This works perfectly as long as the vector $w$ isn't $[0,0]$ (which we need to make the "perpendicular" vector). But this just means "as long as the points $A$ and $B$ are different", which is obviously necessary -- if they're the same, the question doesn't really make sense.
$endgroup$
I'm going to use "vectors" (which are just pairs of numbers in this case, which I'll write in brackets), which can be added to points termwise, so that
$$
(1, 2) + [3, 5] = (4, 7)
$$
Vectors can also be multiplied by numbers, termwise, so that
$$
frac12[3, 5] = [3/2, 5/2].
$$
You can think of vectors as representing, in the plane, movement in some direction, so that $[3, 5]$ means "move 3 units to the right, 5 units up," and when you do so, it makes a lot of sense to add a vector to a point: you take the point (which was $(1, 2)$ in my example) and move it $3$ units right and $5$ units up, and you end up at $(4, 7)$. When you multiply a vector by $frac12$, you make the displacement half as big, and so on.
One last thing: I wrote
$$
(1, 2) + [3, 5] = (4, 7)
$$
so show how to add a vector to a point, but we can do some algebra (moving the $(1,2)$ to the right hand side) and write
$$
[3, 5] = (4, 7) - (1, 2),
$$
and now you've got a really nice thing: the "difference" of two points is a vector. In fact, if you have points $P$ and $Q$, then $v = Q - P$ is exactly the vector that moves $P$ to $Q$ (which we often draw as an arrow pointing from $P$ to $Q$).
Here's a really useful fact: if you have a vector $[a, b]$, and at least one of $a$ and $b$ is nonzero, then the vector
$$
[-b, a]
$$
is perpendicular to $[a, b]$, and is rotated 90 degrees counterclockwise from $[a, b]$.
The other useful fact is that if you have a vector $[a, b]$ of some length, then
$$
frac1{sqrta^2+b^2 [a, b]
$$
is a vector pointing in the same direction, but with length $1$. (A length-1 vector is called "unit vector" sometimes.)
OK, with all that in mind, let's return to your problem. First, let's let
$$
w = B - A
$$
That's the vector that moves $A$ to $B$, or an arrow from $A$ pointing towards $B$. To make this concrete, I'm going to pick
$$
A = (1, 4)\
B = (5, 6)
$$
So now
$$
w = B - A = (5, 6) - (1, 5) = [4, 1]
$$
for our example. We can produce a unit vector in the same direction as $w$ by the trick mentioned above: we multiply by $1$ over a square root. If $w = (a, b)$, we compute
$$
v = frac1sqrta^2 + b^2 [a, b].
$$
In our example, this comes out to
$$
v = frac1sqrt4^2 + 1^2[4, 1] = [frac4sqrt17, frac1sqrt17].
$$
If we then use the first trick -- swap the two entries and negate the first, we get
$$
v^perp = [-frac1sqrt17, frac4sqrt17]
$$
which is an arrow of length $1$ pointing perpendicular to the line from $A$ to $B$.
In the general case, we get
$$
v^perp = frac1sqrta^2 + b^2 [-b, a].
$$
If we multiply this by $d$ and add it to the point $A$, we get the point $A'$:
$$
A' = A + d v^perp.
$$
In our example, picking $d = 2$, that gives us
beginalign
A'
&= (1, 4) + 2[-frac1sqrt17, frac4sqrt17 ]\
&= (1, 4) + [-frac2sqrt17, frac8sqrt17 ]\
&= (1-frac2sqrt17, 4 + frac8sqrt17).
endalign
This works perfectly as long as the vector $w$ isn't $[0,0]$ (which we need to make the "perpendicular" vector). But this just means "as long as the points $A$ and $B$ are different", which is obviously necessary -- if they're the same, the question doesn't really make sense.
answered Apr 2 at 13:09
John HughesJohn Hughes
65.5k24292
65.5k24292
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1748456%2ffind-point-at-distance-d-perpendicular-to-endpoint-a-of-given-line-segment-ab%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Orthogonality is defined for lines, not for points.
$endgroup$
– Jack D'Aurizio
Apr 18 '16 at 19:20
$begingroup$
Ah okay. If I would like the line A2B2 which has points A2 and B2 which are perpendicular to their respective A and B points, would orthogonality still apply?
$endgroup$
– user4956079
Apr 18 '16 at 19:25
$begingroup$
There are two such points. You also somehow need to decide on which side of the line $A_2$ lies.
$endgroup$
– amd
Apr 18 '16 at 20:16
$begingroup$
Well I use the following formula to find the perpendicular distance from any point (m,n) to the line. d= (Am+Bn+C) / √(A2 +B2) then depending on the sign of the distance I know which side the point (A2x, A2y) should be on. I then want to translate the points by that distance to redraw the line.
$endgroup$
– user4956079
Apr 19 '16 at 11:36