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

Home » Public Forums » archive » plotting a vector field in 3d
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
plotting a vector field in 3d [message #84999] Fri, 21 June 2013 03:14 Go to next message
Petros Syntelis is currently offline  Petros Syntelis
Messages: 32
Registered: June 2013
Member
Hi,

I am trying to plot a vector field in 3d and i have great difficulty in doing so.
I have 3 variable, bx,by,bz that have (nx,ny,nz) dimentions which represent the vector field.

My questions are:
1) How can i plot this vector field. I have tryied a variety of things (flow3 etc) i found online but all advices seems to lack some part of information and i fail to reproduce the results.
I also whould like a hint on how i could overplot those lines above an xy image on the bottom of the plot.

2) Is there a way to trace the field lines and have, lets say 3 variables of dimentions (nlines,nx),(nlines,ny),(nlines,nz)?

3) Because i am pretty sure that no answer whould be sufficient explanatory, as you can't explain everything in a group discussion, which book/references whould you recommend me to read?

Thank you very much,
Petros
Re: plotting a vector field in 3d [message #85006 is a reply to message #84999] Fri, 21 June 2013 09:01 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/21/13 4:14 am, Petros Syntelis wrote:
> Hi,
>
> I am trying to plot a vector field in 3d and i have great difficulty
> in doing so. I have 3 variable, bx,by,bz that have (nx,ny,nz)
> dimentions which represent the vector field.
>
> My questions are: 1) How can i plot this vector field. I have tryied
> a variety of things (flow3 etc) i found online but all advices seems
> to lack some part of information and i fail to reproduce the
> results. I also whould like a hint on how i could overplot those
> lines above an xy image on the bottom of the plot.
>
> 2) Is there a way to trace the field lines and have, lets say 3
> variables of dimentions (nlines,nx),(nlines,ny),(nlines,nz)?
>
> 3) Because i am pretty sure that no answer whould be sufficient
> explanatory, as you can't explain everything in a group discussion,
> which book/references whould you recommend me to read?
>
> Thank you very much, Petros
>

Check out this post:


http://michaelgalloy.com/2008/03/19/overview-of-flow-visuali zation-in-idl.html

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: plotting a vector field in 3d [message #85007 is a reply to message #85006] Fri, 21 June 2013 09:30 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/21/13 10:01 AM, Michael Galloy wrote:
> On 6/21/13 4:14 am, Petros Syntelis wrote:
>> Hi,
>>
>> I am trying to plot a vector field in 3d and i have great difficulty
>> in doing so. I have 3 variable, bx,by,bz that have (nx,ny,nz)
>> dimentions which represent the vector field.
>>
>> My questions are: 1) How can i plot this vector field. I have tryied
>> a variety of things (flow3 etc) i found online but all advices seems
>> to lack some part of information and i fail to reproduce the
>> results. I also whould like a hint on how i could overplot those
>> lines above an xy image on the bottom of the plot.
>>
>> 2) Is there a way to trace the field lines and have, lets say 3
>> variables of dimentions (nlines,nx),(nlines,ny),(nlines,nz)?
>>
>> 3) Because i am pretty sure that no answer whould be sufficient
>> explanatory, as you can't explain everything in a group discussion,
>> which book/references whould you recommend me to read?
>>
>> Thank you very much, Petros
>>
>
> Check out this post:
>
>
> http://michaelgalloy.com/2008/03/19/overview-of-flow-visuali zation-in-idl.html
>
>
> Mike

The article is very 2D-centric, but there are a few 3-dimensional
examples. I don't think there are very many good options for
3-dimensional (or 2-dimensional, for that matter) vector field
visualization in IDL.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: plotting a vector field in 3d [message #85008 is a reply to message #85006] Fri, 21 June 2013 09:34 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Galloy writes:

> Check out this post:
>
> http://michaelgalloy.com/2008/03/19/overview-of-flow-visuali zation-in-idl.html

I agree the Flow3 example in the documentation sucks (sigh...), but it's
pretty easy to put axes around the flow:

vx = RANDOMU(seed, 5, 5, 5)
vy = RANDOMU(seed, 5, 5, 5)
vz = RANDOMU(seed, 5, 5, 5)

; Set up the 3D scaling system:
cgSurf, dist(30), xr=[-1,5], yr=[-1,5], zr = [-1,5], $
/nodata, xst=1, yst=1

; Plot the vector field:
!P.Color=cgColor('black')
FLOW3, vx, vy, vz

Now that I look at it, Flow3 sucks, too. :-)

There is probably a good Ph.D. thesis in here for someone who wants to
develop some useable software.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: plotting a vector field in 3d [message #85018 is a reply to message #85008] Sun, 23 June 2013 18:23 Go to previous messageGo to next message
manodeep@gmail.com is currently offline  manodeep@gmail.com
Messages: 33
Registered: June 2006
Member
Some of the most stunning flow renderings I have seen come are here:

http://skysrv.pha.jhu.edu/~miguel/videos.html

In particular, I would love to know how to re-create "Interactive visualization of the Cosmic Web" video (even if without the interactive part). Any ideas? If I remember correctly, that video was made with LIC that Mike wrote about in his vector flow plot.

And apologies to Petros for not having a solution and posting (hopefully) a teaser.

Cheers,
Manodeep



On Friday, June 21, 2013 11:34:23 AM UTC-5, David Fanning wrote:
> Michael Galloy writes:
>
>
>
>> Check out this post:
>
>>
>
>> http://michaelgalloy.com/2008/03/19/overview-of-flow-visuali zation-in-idl.html
>
>
>
> I agree the Flow3 example in the documentation sucks (sigh...), but it's
>
> pretty easy to put axes around the flow:
>
>
>
> vx = RANDOMU(seed, 5, 5, 5)
>
> vy = RANDOMU(seed, 5, 5, 5)
>
> vz = RANDOMU(seed, 5, 5, 5)
>
>
>
> ; Set up the 3D scaling system:
>
> cgSurf, dist(30), xr=[-1,5], yr=[-1,5], zr = [-1,5], $
>
> /nodata, xst=1, yst=1
>
>
>
> ; Plot the vector field:
>
> !P.Color=cgColor('black')
>
> FLOW3, vx, vy, vz
>
>
>
> Now that I look at it, Flow3 sucks, too. :-)
>
>
>
> There is probably a good Ph.D. thesis in here for someone who wants to
>
> develop some useable software.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: plotting a vector field in 3d [message #85040 is a reply to message #84999] Wed, 26 June 2013 02:02 Go to previous messageGo to next message
Petros Syntelis is currently offline  Petros Syntelis
Messages: 32
Registered: June 2013
Member
On Friday, June 21, 2013 1:14:12 PM UTC+3, Petros Syntelis wrote:
> Hi,
>
>
>
> I am trying to plot a vector field in 3d and i have great difficulty in doing so.
>
> I have 3 variable, bx,by,bz that have (nx,ny,nz) dimentions which represent the vector field.
>
>
>
> My questions are:
>
> 1) How can i plot this vector field. I have tryied a variety of things (flow3 etc) i found online but all advices seems to lack some part of information and i fail to reproduce the results.
>
> I also whould like a hint on how i could overplot those lines above an xy image on the bottom of the plot.
>
>
>
> 2) Is there a way to trace the field lines and have, lets say 3 variables of dimentions (nlines,nx),(nlines,ny),(nlines,nz)?
>
>
>
> 3) Because i am pretty sure that no answer whould be sufficient explanatory, as you can't explain everything in a group discussion, which book/references whould you recommend me to read?
>
>
>
> Thank you very much,
>
> Petros

I really thank you all for your answers! After reading Mike's article i got a little bit disappointed from the examples that use IDL routines.
But this paper you had on different techniques might prove to be usefull!

Thanks again,
Petros
Re: plotting a vector field in 3d [message #88510 is a reply to message #85006] Sun, 04 May 2014 21:46 Go to previous messageGo to next message
Krishnapriya M is currently offline  Krishnapriya M
Messages: 3
Registered: December 2013
Junior Member
On Friday, June 21, 2013 9:31:29 PM UTC+5:30, Mike Galloy wrote:
> On 6/21/13 4:14 am, Petros Syntelis wrote:
>
>> Hi,
>
>>
>
>> I am trying to plot a vector field in 3d and i have great difficulty
>
>> in doing so. I have 3 variable, bx,by,bz that have (nx,ny,nz)
>
>> dimentions which represent the vector field.
>
>>
>
>> My questions are: 1) How can i plot this vector field. I have tryied
>
>> a variety of things (flow3 etc) i found online but all advices seems
>
>> to lack some part of information and i fail to reproduce the
>
>> results. I also whould like a hint on how i could overplot those
>
>> lines above an xy image on the bottom of the plot.
>
>>
>
>> 2) Is there a way to trace the field lines and have, lets say 3
>
>> variables of dimentions (nlines,nx),(nlines,ny),(nlines,nz)?
>
>>
>
>> 3) Because i am pretty sure that no answer whould be sufficient
>
>> explanatory, as you can't explain everything in a group discussion,
>
>> which book/references whould you recommend me to read?
>
>>
>
>> Thank you very much, Petros
>
>>
>
>
>
> Check out this post:
>
>
>
>
>
> http://michaelgalloy.com/2008/03/19/overview-of-flow-visuali zation-in-idl.html
>
>
>
> Mike
>
> --
>
> Michael Galloy
>
> www.michaelgalloy.com
>
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
>
> Research Mathematician
>
> Tech-X Corporation

Hi,
I'm trying to plot a 2D vector plot(lon v/s Depth) using IDL...... but I don't know the exact syntax... please help me to resolve this......

Krishnapriya M
NIO, Goa
Re: plotting a vector field in 3d [message #88513 is a reply to message #88510] Mon, 05 May 2014 05:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Krishnapriya M writes:

> I'm trying to plot a 2D vector plot(lon v/s Depth) using IDL...... but I don't know the exact syntax... please help me to resolve this......

IDL> cgDrawVectors, x_vec_component, y_vec_component, $
x_position_of_vector, y_position_of_vector

Documentation here:

http://www.idlcoyote.com/idldoc/cg/cgdrawvectors.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Smoothing image by regression in IDL
Next Topic: Random-access of List() progressively slower for static list

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

Current Time: Wed Oct 08 11:45:01 PDT 2025

Total time taken to generate the page: 0.00687 seconds