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

Home » Public Forums » archive » Displaying 3-D vector fields
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Displaying 3-D vector fields [message #32850 is a reply to message #32726] Wed, 13 November 2002 07:06 Go to previous messageGo to previous message
jim.blackwell is currently offline  jim.blackwell
Messages: 11
Registered: November 2002
Junior Member
"Rick Towler" <rtowler@u.washington.edu> wrote in message news:<aqrphc$26s0$1@nntp6.u.washington.edu>...
> "Jim" <jim.blackwell@gsfc.nasa.gov> wrote
>
>> Hey this is almost what I need. How would one draw more than 1 vector
>> at a time in the same window ? 3-D axes ?
>
> By following the steps I laid out in my original post.
>
> Say you want 100 vectors:
>
> ; create an object array to hold them
>
> vectors = OBJARR(100)
>
> ; create a 100 instances of my vector object
>
> for n=0, 99 do vectors[n] = OBJ_NEW('vector')
>
> ; Add our vectors to a model
>
> vecModel = OBJ_NEW('IDLgrModel')
> vecModel -> Add, vectors
>
>
> ; Now you have 100 vectors rooted at [0,0,0]
> ; with a magnitude of [0,0,1]. You probably want them
> ; to do something now...
>
> ; Use the SetProperty method to set each vectors
> ; magnitude and location. I assume you have 2
> ; arrays named "mag" and "loc" containing this
> ; data.
>
> for n=0, 99 do vectors[n] -> Setproperty, MAGNITUDE=mag[n,*], $
> LOCATION=loc[n,*]
>
> ; Now take a look at what we have.
>
> xobjview, vecModel, /block
>
>
> ; we're done for now, clean up
>
> OBJ_DESTROY, vecModel
>
>
> If you wanted to animate the vectors you would set up a loop around the call
> to the setproperty method where you would loop thru the time dimension of
> your array (if the locations were fixed you wouldn't need to change that
> property). The only problem with this is that you can't use XOBJVIEW to
> view an animation. I would suggest working on some static views making sure
> you understand what you are doing (using XOBJVIEW), then go over to David
> Fanning's website (www.dfanning.com) and take one of his object graphics
> programs and hack the vector animation stuff into it (I suggest FSC_SURFACE?
> I think that might come with axes too).
>
> -Rick

Rick,

forgive me for being such a doofus, but shouldn't the mag and loc
arrays be 3-D ? Would it be as simple as just adding this code to the
existing code set for creating the vector object ?

Thanks

Jim Blackwell
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: use of 'obj_new' within another object definition
Next Topic: IdlGrPolygon - Intersection with planes and lines

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

Current Time: Wed Oct 08 19:15:58 PDT 2025

Total time taken to generate the page: 0.00634 seconds