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

Home » Public Forums » archive » making an 3d oblique plane a volume (was structure use)
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
making an 3d oblique plane a volume (was structure use) [message #31393] Tue, 09 July 2002 11:57
patrick is currently offline  patrick
Messages: 15
Registered: July 2001
Junior Member
Folks- Thanks for the suggestions on my previous post, I managed to
fix the problem by using the min_value keyword to OPLOT, like I said,
very simple.

An aspect of this code that I've had much help from group observers
(Thanks Ben Tupper) in the past is rearing it's ugly head again. The
attached code at the bottom takes the input from three structure
arrays identical to those in my previous post and generates an oblique
3d plane with the value I specify. Here's the problem, the PI's I work
with want to see a volume. So I don't know if I can call the SURFACE
process numerous times for a range of planes to be stacked on each
other or if I need a totally different procedure?

Any suggestions are very appreciated. I call the axes again at the end
to make certain they will plot cleanly.

Patrick

the code:

pro plot3d, event
widget_control, event.top, GET_UVALUE = pstate

; This segment of the procedure plots sigma-t in 3-D
if (event.index eq 1) then begin
print, event.index
device, decomposed=0

x1 = reform((*pstate).profiledata(4,*,0))
y1 = reform((*pstate).profiledata(6,*,0))

x2 = reform((*pstate).profiledata(4,*,1))
y2 = reform((*pstate).profiledata(6,*,1))

x3 = reform((*pstate).profiledata(4,*,2))
y3 = reform((*pstate).profiledata(6,*,2))

Aindex=WHERE(y1 GE 3.9)
Bindex=WHERE(y2 GE 3.9)
Cindex=WHERE(y3 GE 3.9)

; start here
Lon = [0,0,120]
Lat = [0,40,0]
;Depth = [-25, -20, -10]
depthA=(*pstate).profiledata(4,*,0)
depthB= (*pstate).profiledata(4,*,1)
depthC= (*pstate).profiledata(4,*,2)
Depth=[depthA[Aindex[0]], depthB[Bindex[0]], depthC[Cindex[0]]]

LoadCT, 5
Tek_color

Surface, BytArr(2,2), $
xRange = [0,120], $
yRange = [0,40], $
zRange = [30,0], $
/Save, $
Background = 1, Color = 8, $
CharSize = 2.5, $
xtitle='lon', ytitle='lat', ztitle='Depth 2 (m)', $
AX=45, AZ=20, title= 'Sigma-T', $
/nodata

Axis, 0,0,-30, zAxis = 1, Color = 8, zRange = [30,0], $
/T3d, $
CharSize = 2.5, ztitle = 'Depth 1 (m)'


;Axis, 125,40,-30, zAxis = 4, Color = 8, zRange = [30,0], $
; /T3d, $
; CharSize = 2, ztitle = 'Depth4 (m)'

Axis, 120,0,-30, zAxis = 3, Color = 8, zRange = [30,0], $
/T3d, $
CharSize = 2.5, ztitle = 'Depth 3 (m)

Axis, 120,0,-30, yAxis = 1, Color = 0, xRange = [0,40], $
/T3d, xstyle=1, ystyle=1, $
CharSize = 2.5, ytitle= 'Y axis (Latitude)'

Axis, 0,40,-30, xAxis = 1, Color = 0, xRange = [0,120], $
/T3d, xstyle=1, ystyle=1, xtitle='X axis (Longitude)', $
CharSize = 2.5

PolyFill, [Lon,Lon[0]], [Lat, Lat[0]], [Depth, Depth[0]], $
/T3d, /Data, $
Color = 5

PlotS, [Lon,Lon[0]], [Lat, Lat[0]], [Depth, Depth[0]], $
Psym = 6, Color = 5, SymSize = 2, $
/Data, $
/T3d

PlotS, [Lon,Lon[0]], [Lat, Lat[0]], [Depth, Depth[0]], $
Psym = -3, Color = 5, Thick = 2, $
/Data, $
/T3d


;note that this is called last because it will be covered
Axis, 0,0,-30, zAxis = 1, Color = 8, zRange = [30,0], $
/T3d, $
CharSize = 2.5
Axis, 0,40,-30, xAxis = 1, Color = 8, xRange = [0,120], $
/T3d, xstyle=1, ystyle=1, $
CharSize = 2.5
Axis, 120,0,-30, yAxis = 1, Color = 8, xRange = [0,40], $
/T3d, xstyle=1, ystyle=1, $
CharSize = 2.5
endif
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: map projection question
Next Topic: Re: Fast Implementation

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

Current Time: Wed Oct 08 20:06:23 PDT 2025

Total time taken to generate the page: 0.01644 seconds