getting vertices of patch object after rotation .

조회 수: 5 (최근 30일)
yogesh jain
yogesh jain 2015년 12월 28일
댓글: Brendan Hamm 2015년 12월 28일
Hello all , I am inserting a patch object and then rotating it about some angle . How can I get vertices of patch object after rotation ? thank you

채택된 답변

Brendan Hamm
Brendan Hamm 2015년 12월 28일
p = patch([0 0 0.1 0.1],[0 0.2 0.2 0],'b')
p.Vertices
or
p.XData
p.YData
Although I'm not sure how you are rotating it without passing to the XData, YData, or Vertices properties.
The old way (prior to 2014b):
myVerts = get(p,'Vertices');
  댓글 수: 2
Sean de Wolski
Sean de Wolski 2015년 12월 28일
They're most likely using hgtransform to rotate the patch.
Brendan Hamm
Brendan Hamm 2015년 12월 28일
Thanks Sean. There's always something new to learn everyday.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by