How to find coordinates of a line?

조회 수: 4 (최근 30일)
SUSHMA MB
SUSHMA MB 2015년 8월 17일
댓글: Cedric 2015년 8월 17일
I have a line which is bisected by some orthogonal lines. Now i want to know the start and the end coordinates of those orthogonal lines. Picture is attached for reference. And further i want to divide all the eight orthogonal lines in 10 equidistant points.

답변 (1개)

Image Analyst
Image Analyst 2015년 8월 17일
You have to know the length of the crossing lines and the endpoints of the main line. After that, it's just high school algebra.
With the main line endpoints, use linspace(x1, x2, 10) and linspace(y1, y2, 10) to get the crossing points.
Then use the algebra with your line length to get all the other endpoints. Use the point-slope formula. Hint: the slope of a crossing line is -1/(slope of the main line). Is this homework? I didn't want to do all of it for you because it sounds a lot like homework, plus it's so simple you should be able to do it yourself.
  댓글 수: 3
John D'Errico
John D'Errico 2015년 8월 17일
As Image Analyst says, it really is jut a bit of basic algebra. Sit down and define the points that you want to use to define the line endpoints. What do you know about them?
Cedric
Cedric 2015년 8월 17일
If you know the components of a vector, e.g x = [3,2], what is the easiest way to define an orthogonal vector with same norm?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Elementary Math에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by