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

Home » Public Forums » archive » tall SURFACE plots don't work?
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
tall SURFACE plots don't work? [message #30226] Tue, 16 April 2002 00:42 Go to next message
rmw092001 is currently offline  rmw092001
Messages: 17
Registered: January 2002
Junior Member
Hello,

I need to make a 3-d SURFACE type plot, with the z axis twice the
length of the x and y axes (sort of skyscraper shaped). This ought to
be extremely simple??? -

Ordinary surface plot, with x,y,z axes the same length:

surface,dist(50),position=[.2,.2,.8,.8,.2,.8]

Surface plot with a 'squashed' z axis:

surface,dist(50),position=[.2,.2,.8,.8,.2,.4]

Surface plot with a 'stretched' z axis:

surface,dist(50),position=[.4,.4,.6,.6,.1,.9]

The 'squashed' z axis works fine, but IDL doesn't allow the last
example? - or maybe I haven't understood how POSITION keyword works in
3 dimensions???
Thanks for any help,

RW

IDL5.5 Solaris
Re: tall SURFACE plots don't work? [message #30282 is a reply to message #30226] Wed, 17 April 2002 21:01 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
RichardW (rmw092001@yahoo.com) writes:

> Thanks for the replies. So is there really no method, in direct
> graphics, to force z-axis length to be larger than x,y-axis lengths?
> Complex or trial-and-error methods using t3d, xyech / yzech / xzech,
> SCALE commands, z-graphics buffer etc are OK. :-)

Uh, you didn't *like* FSC_Surface!? Weird. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: tall SURFACE plots don't work? [message #30283 is a reply to message #30226] Wed, 17 April 2002 20:34 Go to previous message
rmw092001 is currently offline  rmw092001
Messages: 17
Registered: January 2002
Junior Member
Hello,
Thanks for the replies. So is there really no method, in direct
graphics, to force z-axis length to be larger than x,y-axis lengths?
Complex or trial-and-error methods using t3d, xyech / yzech / xzech,
SCALE commands, z-graphics buffer etc are OK. :-)

Maybe the simplest method could be: set zstyle=4 then redraw a larger
z axis using PLOTS and XYOUTS (no hidden line removal needed in this
case). There must be neater method though???
Thanks for any info,

RW


David Fanning <david@dfanning.com> wrote in message news:<MPG.1725e973691e54c698988d@news.frii.com>...
> RichardW (rmw092001@yahoo.com) writes:
>
>> I need to make a 3-d SURFACE type plot, with the z axis twice the
>> length of the x and y axes (sort of skyscraper shaped). This ought to
>> be extremely simple??? -
>>
>> Ordinary surface plot, with x,y,z axes the same length:
>>
>> surface,dist(50),position=[.2,.2,.8,.8,.2,.8]
>>
>> Surface plot with a 'squashed' z axis:
>>
>> surface,dist(50),position=[.2,.2,.8,.8,.2,.4]
>>
>> Surface plot with a 'stretched' z axis:
>>
>> surface,dist(50),position=[.4,.4,.6,.6,.1,.9]
>>
>> The 'squashed' z axis works fine, but IDL doesn't allow the last
>> example? - or maybe I haven't understood how POSITION keyword works in
>> 3 dimensions???
>
> This problem is complicated by the fact that the IDL
> Surface command is not a true 3D representation. It's
> more of a 2.5D representation, in that it doesn't allow
> for independent rotation of the three orthogonal axes.
> In fact, the Z axis must always be vertical in the plot.
> I think this is what throws the positioning in the Z
> direction totally out of whack.
>
> This is quite easily done, however, in object graphics.
> So, this morning, I hacked up my FSC_Surface program
> to accept a POSITION keyword to do what you want to do.
> I changed the order of the coordinates, however, to more
> easily accommodate either a 2, 4, or 6-elements vector
> of positions. The order is like this:
>
> Position = [x0, x1, y0, y1, z0, z1]
>
> So, to get your stretched plot, you would type this:
>
> IDL> FSC_Surface, dist(50), Position=[.4, .6, .4, .6, .1, .9]
>
> You can download FSC_Surface here:
>
> http://www.dfanning.com/programs/fsc_surface.pro
>
> You will need a couple of other programs from the Coyote
> Library as well. Read the documentation header to find
> out which ones.
>
> By the way, while I was hacking around, I decided to
> add the ability to zoom into and out of the surface
> plot. You can accomplish this with the RIGHT and MIDDLE
> buttons, respectively.
>
> Cheers,
>
> David
Re: tall SURFACE plots don't work? [message #30319 is a reply to message #30226] Tue, 16 April 2002 07:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
RichardW (rmw092001@yahoo.com) writes:

> I need to make a 3-d SURFACE type plot, with the z axis twice the
> length of the x and y axes (sort of skyscraper shaped). This ought to
> be extremely simple??? -
>
> Ordinary surface plot, with x,y,z axes the same length:
>
> surface,dist(50),position=[.2,.2,.8,.8,.2,.8]
>
> Surface plot with a 'squashed' z axis:
>
> surface,dist(50),position=[.2,.2,.8,.8,.2,.4]
>
> Surface plot with a 'stretched' z axis:
>
> surface,dist(50),position=[.4,.4,.6,.6,.1,.9]
>
> The 'squashed' z axis works fine, but IDL doesn't allow the last
> example? - or maybe I haven't understood how POSITION keyword works in
> 3 dimensions???

This problem is complicated by the fact that the IDL
Surface command is not a true 3D representation. It's
more of a 2.5D representation, in that it doesn't allow
for independent rotation of the three orthogonal axes.
In fact, the Z axis must always be vertical in the plot.
I think this is what throws the positioning in the Z
direction totally out of whack.

This is quite easily done, however, in object graphics.
So, this morning, I hacked up my FSC_Surface program
to accept a POSITION keyword to do what you want to do.
I changed the order of the coordinates, however, to more
easily accommodate either a 2, 4, or 6-elements vector
of positions. The order is like this:

Position = [x0, x1, y0, y1, z0, z1]

So, to get your stretched plot, you would type this:

IDL> FSC_Surface, dist(50), Position=[.4, .6, .4, .6, .1, .9]

You can download FSC_Surface here:

http://www.dfanning.com/programs/fsc_surface.pro

You will need a couple of other programs from the Coyote
Library as well. Read the documentation header to find
out which ones.

By the way, while I was hacking around, I decided to
add the ability to zoom into and out of the surface
plot. You can accomplish this with the RIGHT and MIDDLE
buttons, respectively.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: sec : U Re: memory problems on Win2000 or how to delete a variable
Next Topic: Draw a point in 3D graphic object ?

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

Current Time: Wed Oct 08 15:40:10 PDT 2025

Total time taken to generate the page: 0.00552 seconds