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

Home » Public Forums » archive » Re: iTools problem with setting isotropic in 8.0
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
Re: iTools problem with setting isotropic in 8.0 [message #72105] Mon, 09 August 2010 11:23
Erik Rasmussen is currently offline  Erik Rasmussen
Messages: 7
Registered: July 2010
Junior Member
On Aug 7, 12:30 pm, Erik Rasmussen <ra...@rasmsys.com> wrote:
> It seems that something changed between 7.1 and 8.0 that is not
> allowing a visualization to be isotropic in iTools.
>
> My IDLitVisualization instance has /ISOTROPIC set, and this should
> force the entire view hierarchy to be isotropic.  It does not.
>
> Further, in the IDLITSYS_CREATETOOL function I have tried using no
> SCALE_ISOTROPIC keyword, which should default to zero for that
> variable, which should honor the /ISOTROPIC request in my
> visualization.  I have also tried SCALE_ISOTROPIC=1, which should
> force isotropic scaling in any situation, and I have tried
> SCALE_ISOTROPIC=2, ANISOTROPIC_SCALE_3D = 1.0, which should trick the
> iTool into isotropic scaling.  None of these worked.
>
> Gosh I would hate to have to do a kludge like a transparent cube to
> trick IDL into thinking the Z range is the full range of the gridded
> data, instead of the spatial range of only the isosurface being
> plotted.
>
> Hopefully this is me being bone-headed.  If I figure this out in the
> near-term, I will 'fess up and explain the error.
>
> Anyone else notice this behavior or have any advice?
>
> Thanks.
> Erik

I have done quite a bit of digging, and I think I have a way to
engineer my way out of this box. A few more findings...

1) It appears that the iTools notion of isotropy is isotropy in the x-
y plane only. For example, suppose I have a Data Space that is 1 unit
in x size, 2 units in y size, and 10 units in z size. With
ISOTROPIC_SCALING set to 2 (use anisotropic depiction) at tool
creation time, the visualization is a cube as expected (the scale
factors are different on all three axes). With ISOTROPIC_SCALING set
to 1 (isotropic), the x-y plane is a rectangle that is twice as long
in y as in x, but the z axis is always the same length as the longest
of the {x,y} axes, and the entire z extent is scaled into this axis.
In other words, the plot IS isotropic in the x-y plane, but rarely/
accidentally in the z direction. The z scaling is always the actual
data extent scaled into the length of the longest of the {x,y} axes.
A true isotropic behavior, I believe, would be for the plot to have a
y axis double the length of the x axis, and a z axis 20 times the
length of the x axis.

2) I think I was mistaken that this is a 7.1 -> 8.0 transition
problem; I think the problem is present in earlier versions.

3) I call it a "problem"; maybe it's just a problem for me.

4) Probably the way to force a true 3D isotropy is to use the /
ISOTROPIC property in any visualization, and the /SCALE_ISOTROPIC
property when I create the iTool. Then, in my code, I will force the
z extent of the data to be equal to the largest extent of the {x, y}
data. This can be done by accessing the IDLitVisDataSpace instance,
and adjusting the Z_MINIMUM and Z_MAXIMUM, etc. properties in some
reasonable (TBD!) way to force isotropy.

Every time (and there have been many!) that I find myself in this sort
of box (having to engineer around what I perceive to be a framework
deficiency) I eventually discover that I have just misunderstood how
to use the framework as designed, and the real solution is much
simpler. I hope I have that revelation on this one as well.

Erik
Re: iTools problem with setting isotropic in 8.0 [message #72110 is a reply to message #72105] Sun, 08 August 2010 13:05 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 7, 10:54 pm, Erik Rasmussen <ra...@rasmsys.com> wrote:
>
> Thanks Paulo.  I have searched the documentation for those keywords,
> and I don't see them in the iTools classes.
>

They do not seem to be in the iTools parts of the help, but they are
in the help for some of the new graphics functions, such as surface().
Re: iTools problem with setting isotropic in 8.0 [message #72113 is a reply to message #72110] Sat, 07 August 2010 18:54 Go to previous message
Erik Rasmussen is currently offline  Erik Rasmussen
Messages: 7
Registered: July 2010
Junior Member
On Aug 7, 5:08 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Aug 7, 3:30 pm, Erik Rasmussen <ra...@rasmsys.com> wrote:
>
>
>
>> It seems that something changed between 7.1 and 8.0 that is not
>> allowing a visualization to be isotropic in iTools.
>
>> My IDLitVisualization instance has /ISOTROPIC set, and this should
>> force the entire view hierarchy to be isotropic.  It does not.
>
>> Further, in the IDLITSYS_CREATETOOL function I have tried using no
>> SCALE_ISOTROPIC keyword, which should default to zero for that
>> variable, which should honor the /ISOTROPIC request in my
>> visualization.  I have also tried SCALE_ISOTROPIC=1, which should
>> force isotropic scaling in any situation, and I have tried
>> SCALE_ISOTROPIC=2, ANISOTROPIC_SCALE_3D = 1.0, which should trick the
>> iTool into isotropic scaling.  None of these worked.
>
>> Gosh I would hate to have to do a kludge like a transparent cube to
>> trick IDL into thinking the Z range is the full range of the gridded
>> data, instead of the spatial range of only the isosurface being
>> plotted.
>
>> Hopefully this is me being bone-headed.  If I figure this out in the
>> near-term, I will 'fess up and explain the error.
>
>> Anyone else notice this behavior or have any advice?
>
> There are the keywords aspect_ratio (y/x) and aspect_z (z/y).

Thanks Paulo. I have searched the documentation for those keywords,
and I don't see them in the iTools classes.

I have dug a little deeper into this issue. In stepping through the
initialization of the IDLitVisualization superclass in the debugger, I
can see where the ISOTROPIC property is set to 1, as expected. And I
can do a GET_PROPERTY, ISOTROPIC=it and print, it right after my
visualization draws, and confirm that ISOTROPIC=1.

But, with the iTool running, if I use the visualization browser to
look at the properties, I see that the Data Space that contains the
visualization has the Anisotropic 2D and Anisotropic 3D properties as
sensitive. This is all in contrast to the documentation (at least at
7.1, iTools User's Guide -> Visualization Properties) that says "If
any visualization within the dataspace has its Isotropic scaling
property set to True, the dataspace will be automatically set to
isotropic, and the Anisotropic 2D/3D scale properties will be
desensitized."

It still seems to me that something is not working the same in the 8.0
iTool framework as it was in the 7.1. But I continue to dig......

Erik
Re: iTools problem with setting isotropic in 8.0 [message #72114 is a reply to message #72113] Sat, 07 August 2010 16:08 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 7, 3:30 pm, Erik Rasmussen <ra...@rasmsys.com> wrote:
> It seems that something changed between 7.1 and 8.0 that is not
> allowing a visualization to be isotropic in iTools.
>
> My IDLitVisualization instance has /ISOTROPIC set, and this should
> force the entire view hierarchy to be isotropic.  It does not.
>
> Further, in the IDLITSYS_CREATETOOL function I have tried using no
> SCALE_ISOTROPIC keyword, which should default to zero for that
> variable, which should honor the /ISOTROPIC request in my
> visualization.  I have also tried SCALE_ISOTROPIC=1, which should
> force isotropic scaling in any situation, and I have tried
> SCALE_ISOTROPIC=2, ANISOTROPIC_SCALE_3D = 1.0, which should trick the
> iTool into isotropic scaling.  None of these worked.
>
> Gosh I would hate to have to do a kludge like a transparent cube to
> trick IDL into thinking the Z range is the full range of the gridded
> data, instead of the spatial range of only the isosurface being
> plotted.
>
> Hopefully this is me being bone-headed.  If I figure this out in the
> near-term, I will 'fess up and explain the error.
>
> Anyone else notice this behavior or have any advice?

There are the keywords aspect_ratio (y/x) and aspect_z (z/y).
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Draw Widget Object Graphics Scrolling, Confused
Next Topic: Draw Widget Object Graphics Scrolling, Confused

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

Current Time: Wed Oct 08 15:15:39 PDT 2025

Total time taken to generate the page: 0.00663 seconds