tilt angle of cylinder using euler angles

조회 수: 4 (최근 30일)
Melissa
Melissa 2012년 2월 28일
Good Afternoon All,
Below is my original posting of this and with the help of Brian I know I should be using Euler Angles, given that I have the final position of the cylinder and just wish to untilt it parallel to the z axis I know I have to calculate "beta". How would I go about doing so?
Thanks,
Mel
Here is my original post
Was wondering if someone could help me with a bit of geometry and trig derivation. If I'm given the top and bottom center of a cylinder that has a tilt angle, how do I calculate that tilt angle such that is always parallel with the z axis? I want to in essence "untilt" the cylinder so that I can use this for finding the polar coordinates at a particular height on the cylinder.
%Bottom and Top deck centers
XCent = [-94.102, -94.102]; YCent = [66.2796, 166.268]; ZCent = [66.0163, 166.072];
%the cylinder is titled in a V-engine, rotate s.t. parrallel with z-axis
%Why did they do arctan instead of arccos and what if the XCent was the one varied instead of YCent?
[THETA,RHO] = cart2pol(y0,z0);
[TH,PHI,R] = cart2sph(dx0,dy0,dz0);
tiltangle=atan((ZCent(2)-ZCent(1))/(YCent(2)-YCent(1)));
%Why is tiltangled added to theta and phi and why was spherical coordinates used?
THETA = THETA+tiltangle;
PHI = PHI + tiltangle;
x=x0;
[y,z] = pol2cart(THETA,RHO);
[dx,dy,dz]=sph2cart(TH,PHI,R);
[THETA,RHO] = cart2pol(YCent,ZCent);
THETA = THETA+tiltangle;
[YCent,ZCent] = pol2cart(THETA,RHO);
Or maybe I should consider using Euler Angles?
Thanks,
Mel

채택된 답변

Benjamin Schwabe
Benjamin Schwabe 2012년 2월 28일
You will have to use the Euler Angles. Rotating a cordinate system is exactly what they are doing.
  댓글 수: 1
Melissa
Melissa 2012년 2월 29일
thanks for the response. im just looking into them, any suggestions on references or a way to untilt the cylinder?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Array Geometries and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by