Translation for an ellipsoid ?

1 vue (au cours des 30 derniers jours)
Sakshi
Sakshi le 18 Juin 2011
Is it possible to translate an ellipsoid after it is rotated. I have understood the usage of rotate function for doing this.
[a,b,c]=ellipsoid(axes_handle,0,0,0,sx(k),sy(k),sz(k),meshSize);
h2=surf(a,b,c);
rotate(h2,[1 0 0],phix_d);
However, there does not seem to exist a similar function for translation. Is there anyway to do this such that later on I need the coordinates of the rotated followed by translated ellipsoid.
  1 commentaire
Robbie Gaul
Robbie Gaul le 5 Déc 2015
Hi Sakshi,
Did you ever find a solution to this problem as I need to do the same thing?
Regards

Connectez-vous pour commenter.

Réponses (2)

Muhammad Zubair Sheikh
Muhammad Zubair Sheikh le 10 Juin 2019
Is there any solution to translate the ellipsoid?
  3 commentaires
John D'Errico
John D'Errico le 10 Juin 2019
Please don't add an answer to an old question just to ask a question.
Translating an ellipsoid is as trivial as adding a constant offset to x, y or z (or any combination thereof.)
Muhammad Zubair Sheikh
Muhammad Zubair Sheikh le 13 Juin 2019
My apologies!

Connectez-vous pour commenter.


Catalytic
Catalytic le 10 Juin 2019
Modifié(e) : Catalytic le 10 Juin 2019
Is there anyway to do this such that later on I need the coordinates of the rotated followed by translated ellipsoid.
You can do all manner of translations and rotations in combination with one another using makehgtform,
[x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30);
h=surf(x,y,z);
T = hgtransform('Parent',gca);
h.Parent=T;
T.Matrix=makehgtform('yrotate',pi/4,'translate',[-15 -10 0]);
axis vis3d
  1 commentaire
Muhammad Zubair Sheikh
Muhammad Zubair Sheikh le 13 Juin 2019
Thank you so much.
I however solved the problem by generating an ellipsoid at [0,0,0] and rotating its coordinates (X, Y, Z) with a rotation matrix and then adding some values to them for translation.

Connectez-vous pour commenter.

Catégories

En savoir plus sur 3-D Scene Control dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by