Spherical surface plot [message #66323] |
Sat, 02 May 2009 00:51 |
Mrunmayee
Messages: 24 Registered: May 2009
|
Junior Member |
|
|
Hello,
I have been trying to create a spherical surface plot and have
partially succeeded. Here is what I did to create a surface:
theta3 = findgen(361)/2. * !pi/180. ; 0<= theta <= !pi
phi3 = findgen(361) * !pi/180. ; 0<= phi <= 2*!pi
x3 = sin(theta3) # cos(phi3)
y3 = sin(theta3) # sin(phi3)
sph = sqrt( (1. - x3^2 - y3^2) > 0.) ; This is to avoid
"floating illegal operand" error.
sph1 = sph ; Just for comparison
with sph, to be modified as follows
sph2 = sph[181:360,*] ; Array containing
elements for !pi/2 < theta <= !pi i.e. southern hemisphere
sph1[181:360,*] = -sph2 ; Since sqrt will just take
+ve root, this inverts and creates southern hemisphere.
Success: fsc_surface, sph1, x3, y3 ; Glorious spherical surface
surface, sph1, x3, y3 ; Rather pathetic
rendering of surface but still a spherical surface
Failure: shade_surf, sph1, x3, y3 ; Nothing viewd. NOTHING AT
ALL. Whether device, decomposed=0/1 doesn't matter.
Anyone knows what's happening?
Thanks,
Gauri.
|
|
|