help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing Surfaces/Solids of Revolution


From: Robert A. Macy
Subject: Re: Drawing Surfaces/Solids of Revolution
Date: Mon, 29 May 2006 20:58:16 -0700

You can "rotate" a real vector function, y, like this
where x is the "rotator" modifier...
>> x=exp(1i*2*pi()*(1:50)/50);
>> y=2+cos(2*pi()*(1:50)/20);
>> z=y'*x;complexgsplot(z);
...will plot a tube lying on its side.
or, as a cylinder standing up...
>> complexgsplot(z,1);

you can do a lot more with this program.  but this program
contains some examples of how to handle errors when calling
a function.  

             - Robert -


On Mon, 29 May 2006 22:33:25 -0400
 "Kiam Heong Kwa" <address@hidden> wrote:
> Thanks for all of you who replied.
> 
> I'm sorry for not being explicit enough. I am in fact
> thinking of where I
> can find a general piece of code - sorry for having
> implied that I don't
> want to write a piece of code - general enough so that
> the graph of any
> sufficiently smooth function can be rotated to obtain the
> so-called
> surface/solid of revolution.
> 
> In fact, I don't mind if I have to write a piece of code.
> In fact, that'll
> be even more interesting, I guess. So, is there any place
> I can find any
> guidance online?
> 
> Thanks again and have a good evening.
> 
> 
> On 5/29/06, Robert A. Macy <address@hidden> wrote:
> >
> > Would you givean example of a function you wish to
> plot,
> > then rotate.  I do not exactly see what you need.
> >
> >          - Robert -
> >
> > On Mon, 29 May 2006 13:19:30 -0400
> > "Kiam Heong Kwa" <address@hidden> wrote:
> > > Thanks in advance.
> > >
> > > Just wondering if there is a comparatively easy way
> to
> > > draw surfaces/solids
> > > of revolution (obtained by rotating the graph of
> > > sufficiently smooth
> > > functions about a given line on the xy-plane) rather
> than
> > > having to write a
> > > piece of code.
> > >
> > > Any hints/guidance will be highly appreciated. Have a
> > > good day.
> > >

Attachment: complexgsplot.m
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]