Surface plots in spherical coordinates [message #48621] |
Wed, 03 May 2006 15:59  |
Matthias Vigelius
Messages: 2 Registered: May 2006
|
Junior Member |
|
|
Hi newsgroup!
Is there a possibility to plot surfaces in spherical coordinates?
I have a function R(theta, phi), describing some kind of elongated
sphere or an ellipsoid, and I'dlike to plot the surface. What I'm doing
now is:
1) create two big vectors theta and phi which sample the sphere, that is
phi is something like (0, ..., 2*pi, 0, ..., 2*pi, ...) and theta
(0,...,0,..., pi, ..., pi)
2) compute R(theta, phi)
3) convert these coordinates to cartesian
4) triangulate: triangulate, x, y, tr, b
5) regrid: grid=trigrid(x, y, z, tr)
6) draw surface: surface, grid, xc, yc
Besides being quite cumbersome, the problem is that I can't draw closed
surfaces, say the whole sphere (and even so the results are at best
moderate).
Is there an easier and working way to do that? I would imagine that this
is a common task, so I wonder why it does not seem to be supported in
IDL (or is it?)
Thanks heaps!
Matthias
--
Matthias Vigelius
http://astro.ph.unimelb.edu.au/~mvigeliu/
|
|
|
Re: Surface Plots [message #49348 is a reply to message #48621] |
Thu, 20 July 2006 04:14  |
ChristopherFlorio
Messages: 23 Registered: April 2006
|
Junior Member |
|
|
Nevermind, Problem solved. Using tvrd() function works just fine.
ChristopherFlorio@gmail.com wrote:
> Two questions:
>
> 1) Does anybody know how to take the surface plots and add them
> together into a movie?
>
> 2) If not, does anybody know how to create a surface plot such that
> displays of subsequent surface plot do not have to reload the graph
> scales?
|
|
|