comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Surface plots in spherical coordinates
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Surface plots in spherical coordinates [message #48621] Wed, 03 May 2006 15:59 Go to next message
Matthias Vigelius is currently offline  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 Go to previous message
ChristopherFlorio is currently offline  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?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: mpfitexpr using functargs
Next Topic: Re: String Spliting

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:36:20 PDT 2025

Total time taken to generate the page: 0.00379 seconds