Path: news.mathworks.com!not-for-mail
From: "Ashwini Deshpande" <vd.ashwini@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plot Sphere Given Centre Radius
Date: Mon, 19 May 2008 05:30:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 44
Message-ID: <g0r38s$n3l$1@fred.mathworks.com>
References: <g0jcbi$6od$1@fred.mathworks.com> <g0joum$7ss$1@fred.mathworks.com> <g0jql3$o73$1@fred.mathworks.com>
Reply-To: "Ashwini Deshpande" <vd.ashwini@mathworks.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 1211175004 23669 172.30.248.38 (19 May 2008 05:30:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 19 May 2008 05:30:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1101624
Xref: news.mathworks.com comp.soft-sys.matlab:469150


"Rahul Uk" <rauluk23mj@gmail.com> wrote in message
<g0jql3$o73$1@fred.mathworks.com>...
> "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
> 

hai,

Instead of surf .. try mesh

Ashwini