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

Home » Public Forums » archive » Put a 2d plot and an image into a 3D coordinate system
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
Put a 2d plot and an image into a 3D coordinate system [message #77382] Thu, 25 August 2011 21:57 Go to next message
Jianbao is currently offline  Jianbao
Messages: 16
Registered: December 2008
Junior Member
Hello folks,

I am trying to make a series of images with IDL for my simulations. After exploring the new IDL graphics system and the coyote graphics for over 3 hours, I still don't get a good concept of how to do it.

So, here is a sketch of what I am after:
http://dl.dropbox.com/u/38390926/idl.jpg

In the sketch, the simulation is basically a color-scale image of current density in the 2D simulation plane, which moves along the z-axis as the simulation goes.

Can anyone help me with this, please? I really appreciate it.
Re: Put a 2d plot and an image into a 3D coordinate system [message #77430 is a reply to message #77382] Tue, 30 August 2011 12:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Alas, when I ran the program, I got a graphics window
> on my display, and then my machine locked up so hard
> I had to force a restart, which completely clobbered
> my news reader, which I had to delete and re-install,
> etc.
>
> Have I mentioned today how much I *really* love IDL? :-(
>
> Cheers,
>
> David
>
> P.S. I don't know if I have time today to try it again.

OK, I'm foolish, but I am NOT foolish enough to try
that program a third time! There is something about
that program that my computer just REALLY does not
like at all!!!

And people wonder why I am a direct graphics kind
of a guy. Sheesh!

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Put a 2d plot and an image into a 3D coordinate system [message #77431 is a reply to message #77382] Tue, 30 August 2011 11:36 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Galloy writes:

> Works for me. Have you set compile_opt strictarr?

Ah, no. I usually set up my machine like the rest
of the world does. :-)

OK, set Compile_Opt id2 and it compiles!

Alas, when I ran the program, I got a graphics window
on my display, and then my machine locked up so hard
I had to force a restart, which completely clobbered
my news reader, which I had to delete and re-install,
etc.

Have I mentioned today how much I *really* love IDL? :-(

Cheers,

David

P.S. I don't know if I have time today to try it again.


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Put a 2d plot and an image into a 3D coordinate system [message #77433 is a reply to message #77382] Tue, 30 August 2011 09:26 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 8/30/11 9:57 AM, David Fanning wrote:
> Mark Piper writes:
>
>> I have a NG solution. Though it uses less code than OG, I had to think
>> about it a bit (NG are still much newer to me than OG). I also had to
>> rely on the undocumented TEXTUPDIR property to flip the labels on the Z
>> axis (thanks, CT!). Please give this a try:
>
> Are you sure it doesn't use IDL 8.2 syntax!?
>
> Here is what happens when I try to compile this
> code in IDL 8.1:
>
> IDL> .compile -v 'C:\Users\David\IDLWorkspace81\Default\junk.pro'
>
> phiaxis = axis('y', location=[max(p.xrange), 0.0, max(p.zrange)], $
> ^
> % Syntax error.
> At: C:\Users\David\IDLWorkspace81\Default\junk.pro, Line 21
>
> g = image(image, overplot=p, transparency=20)
> ^
> % Syntax error.
> At: C:\Users\David\IDLWorkspace81\Default\junk.pro, Line 27
> % 2 Compilation error(s) in module $MAIN$.
> IDL> print, file_which('axis.pro')
> % Compiled module: FILE_WHICH.
> C:\Program Files\ITT\IDL\IDL81\lib\graphics\axis.pro
> IDL> print, file_which('image.pro')
> C:\Program Files\ITT\IDL\IDL81\lib\graphics\image.pro
>
> Huh!?

Works for me. Have you set compile_opt strictarr?

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
Re: Put a 2d plot and an image into a 3D coordinate system [message #77434 is a reply to message #77382] Tue, 30 August 2011 08:57 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark Piper writes:

> I have a NG solution. Though it uses less code than OG, I had to think
> about it a bit (NG are still much newer to me than OG). I also had to
> rely on the undocumented TEXTUPDIR property to flip the labels on the Z
> axis (thanks, CT!). Please give this a try:

Are you sure it doesn't use IDL 8.2 syntax!?

Here is what happens when I try to compile this
code in IDL 8.1:

IDL> .compile -v 'C:\Users\David\IDLWorkspace81\Default\junk.pro'

phiaxis = axis('y', location=[max(p.xrange), 0.0, max(p.zrange)], $
^
% Syntax error.
At: C:\Users\David\IDLWorkspace81\Default\junk.pro, Line 21

g = image(image, overplot=p, transparency=20)
^
% Syntax error.
At: C:\Users\David\IDLWorkspace81\Default\junk.pro, Line 27
% 2 Compilation error(s) in module $MAIN$.
IDL> print, file_which('axis.pro')
% Compiled module: FILE_WHICH.
C:\Program Files\ITT\IDL\IDL81\lib\graphics\axis.pro
IDL> print, file_which('image.pro')
C:\Program Files\ITT\IDL\IDL81\lib\graphics\image.pro

Huh!?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Put a 2d plot and an image into a 3D coordinate system
Next Topic: Re: Ghost Widgets!

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

Current Time: Thu Oct 09 22:01:47 PDT 2025

Total time taken to generate the page: 0.24261 seconds