Put a 2d plot and an image into a 3D coordinate system [message #77382] |
Thu, 25 August 2011 21:57  |
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  |
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  |
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  |
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  |
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.")
|
|
|