In article <1992May3.173547.9208@zia.aoc.nrao.edu> avourlid@nrao.edu writes:
> Hi,
> I'm writing a program in PV-wave in which I want to be able to see
> different views of a sunspot. For a flat image this is easy using EYE and
> POLYWARP. However,I want to take into account the sphericity of the Sun as
> well, but I cannot see any easy way to
> do the warping using this information. Does anybody have any experience
> with this kind of problems? I'll appreciate any suggestions
> Thanks
> Angelos Vourlidas
> avourlid@nrao.edu
Sorry for the delay, our news feed is on spring break so I'm using an
alternate access.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;
; Spherical inverse mapping examples in PV-WAVE 3.10 and 4.00 ;
; in response to Article 388 in comp.lang.idl-pvwave ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;
Pro SunSpots
;
; Load "sun_spots" image which is of dimension
; [sunspots_width, sunspots_height]
;
sunspots_width = 720 & sunspots_height = 360
sun_spots = Bytarr(sunspots_width, sunspots_height)
Openr, 1, 'sun_spots.dat'
Readu, 1, sun_spots
Close, 1
;
; Initialize common information used by both examples
;
nframes = 72 ; # of frames in full-orbit around sun
anim = Bytarr(256, 256, nframes) ; array of frames
rotangle = 360. / nframes ; angle of rotation between frames
Window, 0, Xsize = 256, Ysize = 256 ; open up window
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;
;
; Example of spherical inverse mapping using PV-WAVE 4.0 >RENDER<
; (ray-traced). This method is MUCH faster for LARGE decals.
;
T3d, /Reset, Rot=[-90.,0.,0.]
T3d, Rot=[0.,180.,0.]
s = Sphere(Decal = sun_spots, Kamb = Findgen(256) / 255.,$
Kdiff = fltarr(256), Transform = !P.t)
For frame = 0, nframes - 1 Do Begin
T3d, /Reset, Rot=[0., frame * rotangle, 0.]
anim(*, *, frame) = Render(s, Transform=!P.t, X=256, Y=256)
Tv, anim(*, *, frame)
Endfor
Movie, Order = 0, anim
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;
;
; Example of spherical inverse mapping using PV-WAVE 3.10, 4.00 >ARL<
; This method is faster for SMALL decals.
;
Poly_Sphere, 1.0, sunspots_width, sunspots_height,$
vertex_list, polygon_list
For frame = 0, nframes - 1 Do Begin
Center_View, Xr = [-1.0, 1.0], Yr = [-1.0, 1.0], Zr = [-1.0, 1.0], $
Ax = -90., Ay = 0., Az = frame * rotangle,$
winx = 256, winy = 256
anim(* ,* ,frame) = Polyshade(vertex_list, polygon_list, $
Shades = sun_spots, /T3d)
Tv, anim(*, *, frame)
Endfor
Movie, Order = 0, anim
End
Unless you, or someone at your site, is a beta test site you will
have to use the ARL method.
I hope this has answered your question.
Thanks
James K. Phillips
I work at PVI but I am not an official spokesperson.
|