Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: rotation of ellipsoids
Date: Wed, 4 Mar 2009 22:24:01 +0000 (UTC)
Organization: Xoran Technologies
Lines: 15
Message-ID: <gomv21$kgq$1@fred.mathworks.com>
References: <gomlm2$a3j$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1236205441 21018 172.30.248.38 (4 Mar 2009 22:24:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Mar 2009 22:24:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:522590

"thomas " <bananabarmer@hotmail.co.uk> wrote in message <gomlm2$a3j$1@fred.mathworks.com>...
> I have created a plot with two ellipsoids in it, i now need to get them to rotate, does anyone know of any sources that may help me to implement this?
> 
> AU=1.5;
>  q=(0:0.0001:2)*pi;
>  
>  eE=0.4; %eccentricity
>  aE=1*AU; %semi-major axis (horizontal radius)
>  bE=aE*0.9165; %semi-minor axis (vertical radius)
>   
>  xe=(aE*cos(q));
>  ye=(bE*sin(q) + 2);

xrotated=cos(theta)*xe+sin(theta)*ye;
yrotated=-sin(theta)*xe+cos(theta)*ye;