how to draw perpendicular line on angular line..

1 回表示 (過去 30 日間)
asmi
asmi 2013 年 11 月 12 日
回答済み: Image Analyst 2013 年 11 月 12 日
how to draw perpendicular line on angular line..

回答 (2 件)

David Sanchez
David Sanchez 2013 年 11 月 12 日
You can use line and swap the Y-coordinate values to get the perpendicular line:
line([2 5],[3 7])
hold on
line([2 5],[7 3])
axis square
hold off
  1 件のコメント
asmi
asmi 2013 年 11 月 12 日
thnx.

サインインしてコメントする。


Image Analyst
Image Analyst 2013 年 11 月 12 日
Why is this tagged Bresenham? Do you have a digitized "canvass" that you have to draw this on? If not, then the line() function will draw continuous lines with no gaps and you don't have to worry about Bresenham. If you have an image and you want to "burn it into" the image, then you could use Bresenham but you don't have to because imline() will do it for you.

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by