フィルターのクリア

How to calculate dimension of a bounding box with an angle?

1 回表示 (過去 30 日間)
Bingjie Mu
Bingjie Mu 2016 年 5 月 19 日
コメント済み: Bingjie Mu 2016 年 5 月 19 日
Hi,everyone. I really need help from you that I don't know how to calculate the dimension of bounding box with a rotated angle. I have already find out the 4 endpoints of the bounding box.(x1,y1),(x2,y2), (x3,y3),(x4,y4).But how to continue to get the length and width of the bounding box? Wish someone can help me.Thanks in advance!

回答 (2 件)

parth pandya
parth pandya 2016 年 5 月 19 日
It will help if you can provide more information and exactly what you want. But you can convert your Cartesian coordinates to polar coordinates and then again to Cartesian. It will help you.

John D'Errico
John D'Errico 2016 年 5 月 19 日
Existing code is always a better choice, if you can find it? For example, you can find minboundrect on the file exchange.
If you want to write some code yourself, you might find a few nice tricks in there anyway.
  3 件のコメント
John D'Errico
John D'Errico 2016 年 5 月 19 日
minboundrect always generates a rectangle, so right angles. However, I think I recall writing also a tool in there called minboundparallelogram.
Bingjie Mu
Bingjie Mu 2016 年 5 月 19 日
Okay, now I understand, for my code I need to use the file minboundrece.m,but what I want is the edge length of the rectangle,not the area or primeter. Could you help me how to modify this program to output the edge length?

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

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by