Draw a parallel line thst pass a specific point

12 visualizaciones (últimos 30 días)
as hz
as hz el 27 de Oct. de 2013
Respondida: deepika el 18 de Abr. de 2014
Hi,
I have a line between with starting point of [X1,Y1] and ending point [X2,Y2] and I would like to draw a parallel line with the same length and angle(to the x axis) that pass through 3rd point [X3,Y3]. How can I do it?
Thanks.

Respuestas (2)

Image Analyst
Image Analyst el 27 de Oct. de 2013
Sounds a lot like homework so I'll just get you started. It's really just 10th grade math. The slope of the first, reference line is
slope = (y2-y1)/(x2-x1)
So the second line has the same slope but you just use the point-slope formula of a line:
y - y3 = slope * (x - x3)
or
y = slope * (x - x3) + y3
Now, there is an infinite number of endpoints pairs for that second line that will satisfy the requirement that it is parallel and has the same length. To go any further will require another constraint/requirement, such as the angle from the original endpoint to the new endpoint to the new line is 90 degrees, or something like that. Otherwise, like I said, it could be anywhere.

deepika
deepika el 18 de Abr. de 2014
i want to draw a line parallel to another line such that i can determine the max point on curve where it cuts the curve . how to do that ?

Categorías

Más información sobre Language Fundamentals en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by