3D plot of set of curves [message #39481] |
Mon, 24 May 2004 07:44  |
Timm Weitkamp
Messages: 66 Registered: August 2002
|
Member |
|
|
Dear people,
I have a set of curves -- say, the values are in a 2D array "Z" -- and
would like to make a nice-looking graph something like this hand-drawn
sketch:
http://tinyurl.com/36frg
(NB: On Sat-Sun 29-30 May it's probably useless trying this link -- they
tell me our web server will be down. Sorry about that.)
In what way exactly the "walls" are shaded is not crucial, but I
definitely want the "base lines" (i.e., the lines at z=0) drawn, with
hidden lines removed, as in the sketch figure referenced above.
I looked into the help for SURFACE and SHADE_SURF, but did not find what I
need. The HORIZONTAL keyword to SURFACE goes in the right direction, but
does only does a disappointingly small part of the job.
Is there a not-too-cumbersome way in IDL to do what I want?
Timm
--
Timm Weitkamp <http://people.web.psi.ch/weitkamp>
|
|
|
Re: 3D plot of set of curves [message #39533 is a reply to message #39481] |
Tue, 25 May 2004 12:46  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Timm Weitkamp wrote:
> On 24.05.04 at 17:33 -0600, David Fanning wrote:
>
>
>> Timm Weitkamp writes:
>>
>>
>>> I have a set of curves -- say, the values are in a 2D array "Z" -- and
>>> would like to make a nice-looking graph something like this hand-drawn
>>> sketch:
>>>
>>> http://tinyurl.com/36frg
>>>
>>> [...]
>
>
>> Is there a built-in IDL routine to do it? I don't
>> think so. I've never seen one. Can I imagine writing such
>> a routine? Yes. I'd definitely do it in object graphics,
>> because the 3D part of it will be much easier, and you
>> will be able to rotate it, which will make it easier for
>> the user to see different parts of it.
>
>
> It finally turned out not to be so hard, yet without any object graphics.
> The T3D mechanism provides enough rotation functionality for my purposes.
>
> Below is the code I am now using. Poorly documented, unreliable, no
> _EXTRAs, etc. But it does what I want. And there is an example at the end,
> for whoever may want to look at it :-)
Oh my! Well done. That's a direct graphics tool that's going into my /user_contrib
directory. (I have a crontab script to purge any object graphics code that may
inadvertantly sneak in ..... :o)
paulv
|
|
|
Re: 3D plot of set of curves [message #39540 is a reply to message #39481] |
Tue, 25 May 2004 09:58  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Timm Weitkamp writes:
> It finally turned out not to be so hard, yet without any object graphics.
Oh, very nice! And at under 20 lines, it qualifies for
the IEPA Small, But Damn Powerful Code Contest. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|