+ Hello, The parametric equations of an ellipsoid can be written in terms of spherical coordinates. The three spherical coordinates are converted to Cartesian coordinates by X=a cos (α) sin(θ) Y=b sin(α) sin(θ) Z=c cos(θ) for α and θ The parameter α varies from 0 to 2 Ï and θ varies from 0 to Ï . Here ( X o , Y o ,Z o ) is the center of the ellipsoid, and θ is the angle of rotation. I need to come up with an expression for the ellipsoid expressed parametrically as the path of a point in 3- space. My first try is that it is something like the following: X(alpha)=Xo+a cos(α) cos( θ )-b sin(α) cos( θ ) + c cos( θ ) Y(alpha)=Yo+ cos (α) sin(θ)+b sin(α) cos (θ) Z(alpha)=Zo+a cos (α) sin(θ) +b sin(α) cos( θ ) Most of the books I have read use eigenvectors. The eigenvectors of course consist of the direction cosines. My difficulty is going from that approach to the approach that Alberto Monteiro took in his message on the 9 October 2006. I understand the R code and am using it for a two-dimensional ellipse problem. There does not seem to be allowance for the new coordinates of the center of the ellipsoid under the transformation when using direction cosines. By that I mean adding the centroid coordinates would not be necessary as is done in my "first try". Can you help me extend this to 3 dimensions? Sincerely, Mary A. Marion + [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.