Path: news.mathworks.com!not-for-mail
From: "Rahul Uk" <rauluk23mj@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plot Sphere Given Centre Radius
Date: Fri, 16 May 2008 11:20:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 34
Message-ID: <g0jql3$o73$1@fred.mathworks.com>
References: <g0jcbi$6od$1@fred.mathworks.com> <g0joum$7ss$1@fred.mathworks.com>
Reply-To: "Rahul Uk" <rauluk23mj@gmail.com>
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 1210936803 24803 172.30.248.38 (16 May 2008 11:20:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 May 2008 11:20:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1377174
Xref: news.mathworks.com comp.soft-sys.matlab:468815


"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g0joum$7ss$1@fred.mathworks.com>...
> "Rahul Uk" <rauluk23mj@gmail.com> wrote in message
> <g0jcbi$6od$1@fred.mathworks.com>...
> > How can I plot a sphere with center (m,n,o) and radius r???
> > 
> > I m not able to use commands like sphere. 
> 
> Hai,
> 
> One of the method is:
> [x,y,z] = sphere(30);
> surf(x+a, y+b, z+c) % where (a,b,c) is center of the sphere
> 
> and second method is:
> r=1;
> phi=linspace(0,pi,30);
> theta=linspace(0,2*pi,40);
> [phi,theta]=meshgrid(phi,theta);
> 
> x=r*sin(phi).*cos(theta);
> y=r*sin(phi).*sin(theta);
> z=r*cos(phi); 
> 
> Hope it helps,
> Ashwini
>
Hi,

Tanx a lot....
But why is colorful...cant we make it transparent???

Rahul