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

Home » Public Forums » archive » plot3D and IDL cookbook
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
plot3D and IDL cookbook [message #10252] Wed, 05 November 1997 00:00
morisset is currently offline  morisset
Messages: 17
Registered: October 1997
Junior Member
Helo,

Here follows a visualising tool for 3 or 4D datas in format
of 3 (or 4) vectors x, y, z (and intensity for each point optionnaly).
Hope it could help.

Let's have a look at my IDL CookBook and send me comments,
suggestions and others. It's at:
http://www.iagusp.usp.br/~morisset/idl/index.html

C. Morisset.

---------------------------

pro plot3d,xx,yy,zz,intens,dax=dax,daz=daz,_extra = e
;+
; ROUTINE: plot3d
;
; PURPOSE: plot a 3-D array and rotate plot interactively
;
; USEAGE: plot3d,xx,yy,zz,[intens],[plot parameters]
;
; INPUT:
; xx,yy,zz
; coordinates of the points
;
; OPTIONAL INPUT:
; intens : intensity, will be related to the color.
;
; KEYWORD INPUT:
;
; dax,daz: delta_angles (deg). Default = 1.
; every extra keyword will be passed to plot (psym for ex.)
;
; OUTPUT:
;
; DISCUSSION:
;
; LIMITATIONS:
;
; COMMON BLOCKS:
;
; SIDE EFFECTS:
;
; EXAMPLE:
;
; x=randf(30,3)
; y=randf(30,3)
; z=randf(30,3)
;
; plot3d,x,y,z
;
;
;
; AUTHOR: C.Morisset 1997 morisset@iagusp.usp.br
;
; REVISIONS:
;
;-
;

if n_params() eq 4 then COLOR = BYTSCL(intens, TOP=!D.N_COLORS-1) $
else color = !D.N_COLORS-1

if not keyword_set(dax) then dax = 1
if not keyword_set(daz) then daz = 1

zmn=min(zz,max=zmx)
xmn=min(xx,max=xmx)
ymn=min(yy,max=ymx)

z=[[zmn,zmx],[zmn,zmx]]
x=[[xmn,xmx],[xmn,xmx]]
y=[[ymn,ymn],[ymx,ymx]]

az = 45.
ax = 45.

surface,z,x,y,/nodata,/save,az=az,ax=ax
plots,xx,yy,zz,/t3d,psym=6,color=color,_extra=e

!mouse.button = 1

while (!mouse.button ne 4) do begin
cursor,x_tmp,y_tmp
if !mouse.button eq 1 then ax = ax + dax $
else if !mouse.button eq 2 then az = az + daz
surface,z,x,y,/nodata,/save,az=az,ax=ax
plots,xx,yy,zz,/t3d,psym=6,color=color,_extra=e

endwhile

end

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
[Message index]
 
Read Message
Previous Topic: Re: prob. w/ subtracting scaler from an array
Next Topic: prob. w/ subtracting scaler from an array

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

Current Time: Sat Oct 11 08:18:11 PDT 2025

Total time taken to generate the page: 8.32129 seconds