How to find coordinates of a line?

5 views (last 30 days)
SUSHMA MB
SUSHMA MB on 17 Aug 2015
Commented: Cedric on 17 Aug 2015
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.

Answers (1)

Image Analyst
Image Analyst on 17 Aug 2015
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 Comments
John D'Errico
John D'Errico on 17 Aug 2015
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 on 17 Aug 2015
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?

Sign in to comment.

Categories

Find more on Elementary Math in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!