getting vertices of patch object after rotation .

5 vues (au cours des 30 derniers jours)
yogesh jain
yogesh jain le 28 Déc 2015
Commenté : Brendan Hamm le 28 Déc 2015
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

Réponse acceptée

Brendan Hamm
Brendan Hamm le 28 Déc 2015
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 commentaires
Sean de Wolski
Sean de Wolski le 28 Déc 2015
They're most likely using hgtransform to rotate the patch.
Brendan Hamm
Brendan Hamm le 28 Déc 2015
Thanks Sean. There's always something new to learn everyday.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by