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/
|
|
|