Draw a symmetrical shape on the x-axis, y-axis, and origin using the transformation matrix

2 ビュー (過去 30 日間)
Hyuck Joon Byun
Hyuck Joon Byun 2020 年 4 月 20 日
回答済み: darova 2020 年 4 月 21 日
pgon = polyshape([3 3 2 3 5 6 5 5], [-1 -3 -3 -4 -4 -3 -3 -1]);
plot(pgon)
this is my polygon matrix i want to draw Symmetry on x-axis,y-axis,origin but i don't know how
what should i do?

回答 (1 件)

darova
darova 2020 年 4 月 21 日
I used patch
x = [3 3 2 3 5 6 5 5];
y = [1 3 3 4 4 3 3 1];
cla
patch(x,y,'r');
patch(x,-y,'r');
patch(y,x,'r');
patch(-y,x,'r');
You can also use rotate to rotate your object

カテゴリ

Help Center および File ExchangeElementary Polygons についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by