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

Home » Public Forums » archive » Re: 3D density plot?
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: 3D density plot? [message #30621] Tue, 14 May 2002 13:16 Go to next message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
Here is a way you could do the animation:

pro example, dd

d = dd
sz = size(d, /dimensions)
for i=0,sz[0]-1 do begin
xvolume, d, /replace
filename = 'img' + strcompress(i, /remove_all) + '.bmp'
; xvolume_write_image, filename, 'bmp' ;you can feed these to
xinteranimate
d = shift(d, 1, 0, 0)
end

end

IDL> d=randomu(s,5,5,5)
IDL> d=bytscl(congrid(d,50,25,25))
IDL> xvolume,d ;set your isosurface etc.
IDL> example,d

-Paul Sorenson

"Bernard K." <bknaepen@'skip_this'mac.'and_this'com> wrote in message
news:130520022020445831%bknaepen@'skip_this'mac.'and_this'co m...
>
> Dear David,
> this is not what I have in mind. I browsed the web and found an example:
> http://www-fpc.stanford.edu/~bewley/movies/intro_25.25.html
> Note that I don't require the movie function ( yet :-) ). Each gray
> structure represents a region where the scalar quantity is bigger than
> a given level.
>
> I nevertheless downloaded FSC_Surface and the reuired dependencies
> and it works great. I do surface plots so it will be very handy for me.
>
> Thanks,
> Bernard.
>
> In article <MPG.17499b19c5f635a59898cc@news.frii.com>, David Fanning
> <david@dfanning.com> wrote:
>
>> Bernard K. (bknaepen@'skip_this'mac.'and_this'com) writes:
>>
>>> I have a 3D scalar field, say r(x,y,z), and I would like to produce a
3D
>>> plot which represents the locations (x,y,z) where r is greater than
>>> a given value.
>>
>> I had a similar requirement not too long ago. I hacked up
>> my FSC_Surface program (this seems to be the starting point
>> for a LOT of my subsequent programs!) to produce a sort of
>> 3D pin plot, where the color and length of the pin represented
>> the distance of a galaxy. It could be rotated in 3D space, etc.,
>> and was quite useful for visualizing this data.
>>
>> You can find a picture of the result here:
>>
>> http://www.dfanning.com/misc/pin_3d.jpg
>>
>> The FSC_Surface program is here:
>>
>> http://www.dfanning.com/programs/fsc_surface.pro
>>
>> Cheers,
>>
>> David




-----------== Posted via Newsgroups.Com - Uncensored Usenet News ==----------
http://www.newsgroups.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Ulimited Fast Downloads - 19 Servers =-----
Re: 3D density plot? [message #30622 is a reply to message #30621] Tue, 14 May 2002 12:35 Go to previous messageGo to next message
Bernard K. is currently offline  Bernard K.
Messages: 11
Registered: October 2001
Junior Member
Dear David,
thanks for pointing out to me XVolume. It is quite convienent
for what I want to do.

Best wishes,
Bernard.

In article <MPG.1749b8129bd0f5c39898ce@news.frii.com>, David Fanning
<david@dfanning.com> wrote:

> Bernard K. (bknaepen@'skip_this'mac.'and_this'com) writes:
>
>> this is not what I have in mind. I browsed the web and found an example:
>> http://www-fpc.stanford.edu/~bewley/movies/intro_25.25.html
>> Note that I don't require the movie function ( yet :-) ). Each gray
>> structure represents a region where the scalar quantity is bigger than
>> a given level.
>
> This just looks like an isosurface to me. Grid your
> data into a 3D volume (Grid3), then use XVolume to
> view it. You can easily set the ISOSURFACE level.
>
> Cheers,
>
> David
Re: 3D density plot? [message #30638 is a reply to message #30622] Mon, 13 May 2002 11:47 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bernard K. (bknaepen@'skip_this'mac.'and_this'com) writes:

> this is not what I have in mind. I browsed the web and found an example:
> http://www-fpc.stanford.edu/~bewley/movies/intro_25.25.html
> Note that I don't require the movie function ( yet :-) ). Each gray
> structure represents a region where the scalar quantity is bigger than
> a given level.

This just looks like an isosurface to me. Grid your
data into a 3D volume (Grid3), then use XVolume to
view it. You can easily set the ISOSURFACE level.

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: 3D density plot? [message #30640 is a reply to message #30638] Mon, 13 May 2002 11:20 Go to previous messageGo to next message
Bernard K. is currently offline  Bernard K.
Messages: 11
Registered: October 2001
Junior Member
Dear David,
this is not what I have in mind. I browsed the web and found an example:
http://www-fpc.stanford.edu/~bewley/movies/intro_25.25.html
Note that I don't require the movie function ( yet :-) ). Each gray
structure represents a region where the scalar quantity is bigger than
a given level.

I nevertheless downloaded FSC_Surface and the reuired dependencies
and it works great. I do surface plots so it will be very handy for me.

Thanks,
Bernard.

In article <MPG.17499b19c5f635a59898cc@news.frii.com>, David Fanning
<david@dfanning.com> wrote:

> Bernard K. (bknaepen@'skip_this'mac.'and_this'com) writes:
>
>> I have a 3D scalar field, say r(x,y,z), and I would like to produce a 3D
>> plot which represents the locations (x,y,z) where r is greater than
>> a given value.
>
> I had a similar requirement not too long ago. I hacked up
> my FSC_Surface program (this seems to be the starting point
> for a LOT of my subsequent programs!) to produce a sort of
> 3D pin plot, where the color and length of the pin represented
> the distance of a galaxy. It could be rotated in 3D space, etc.,
> and was quite useful for visualizing this data.
>
> You can find a picture of the result here:
>
> http://www.dfanning.com/misc/pin_3d.jpg
>
> The FSC_Surface program is here:
>
> http://www.dfanning.com/programs/fsc_surface.pro
>
> Cheers,
>
> David
Re: 3D density plot? [message #30646 is a reply to message #30640] Mon, 13 May 2002 09:43 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bernard K. (bknaepen@'skip_this'mac.'and_this'com) writes:

> I have a 3D scalar field, say r(x,y,z), and I would like to produce a 3D
> plot which represents the locations (x,y,z) where r is greater than
> a given value.

I had a similar requirement not too long ago. I hacked up
my FSC_Surface program (this seems to be the starting point
for a LOT of my subsequent programs!) to produce a sort of
3D pin plot, where the color and length of the pin represented
the distance of a galaxy. It could be rotated in 3D space, etc.,
and was quite useful for visualizing this data.

You can find a picture of the result here:

http://www.dfanning.com/misc/pin_3d.jpg

The FSC_Surface program is here:

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

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: 3D density plot? [message #30764 is a reply to message #30621] Tue, 14 May 2002 21:36 Go to previous message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
You may want to add the HIDE keyword in xvolume.pro as shown here:

78 oVol->GetProperty, $
79 rgb_table0=rgb_table0, $
80 opacity_table0=opacity_table0, $
81 hide=hide
82 obj_destroy, oVol
83 oVol = obj_new('IDLgrVolume', $
84 keyword_set(test) ? $
85 congrid(bytscl(randomu((seed=0), 4, 4, 4)), 40, 40, 20)
$
86 : vol, $
87 /zbuff, $
88 interpolate=interpolate, $
89 hints=2, $
90 /zero_opacity_skip, $
91 /no_copy, $
92 opacity_table0=opacity_table0, $
93 hide=hide, $
94 rgb_table0=rgb_table0 $
95 )

"Paul Sorenson" <aardvark62@msn.com> wrote in message
news:3ce16e65_1@corp-goliath.newsgroups.com...
> Here is a way you could do the animation:
>
> pro example, dd
>
> d = dd
> sz = size(d, /dimensions)
> for i=0,sz[0]-1 do begin
> xvolume, d, /replace
> filename = 'img' + strcompress(i, /remove_all) + '.bmp'
> ; xvolume_write_image, filename, 'bmp'
> d = shift(d, 1, 0, 0)
> end
>
> end
>
> IDL> d=randomu(s,5,5,5)
> IDL> d=bytscl(congrid(d,50,25,25))
> IDL> xvolume,d ;set your isosurface etc.
> IDL> example,d
>
> -Paul Sorenson
>
> "Bernard K." <bknaepen@'skip_this'mac.'and_this'com> wrote in message
> news:130520022020445831%bknaepen@'skip_this'mac.'and_this'co m...
>>
>> Dear David,
>> this is not what I have in mind. I browsed the web and found an example:
>> http://www-fpc.stanford.edu/~bewley/movies/intro_25.25.html
>> Note that I don't require the movie function ( yet :-) ). Each gray
>> structure represents a region where the scalar quantity is bigger than
>> a given level.
>>
>> I nevertheless downloaded FSC_Surface and the reuired dependencies
>> and it works great. I do surface plots so it will be very handy for me.
>>
>> Thanks,
>> Bernard.
>>
>> In article <MPG.17499b19c5f635a59898cc@news.frii.com>, David Fanning
>> <david@dfanning.com> wrote:
>>
>>> Bernard K. (bknaepen@'skip_this'mac.'and_this'com) writes:
>>>
>>>> I have a 3D scalar field, say r(x,y,z), and I would like to produce
a
> 3D
>>>> plot which represents the locations (x,y,z) where r is greater than
>>>> a given value.
>>>
>>> I had a similar requirement not too long ago. I hacked up
>>> my FSC_Surface program (this seems to be the starting point
>>> for a LOT of my subsequent programs!) to produce a sort of
>>> 3D pin plot, where the color and length of the pin represented
>>> the distance of a galaxy. It could be rotated in 3D space, etc.,
>>> and was quite useful for visualizing this data.
>>>
>>> You can find a picture of the result here:
>>>
>>> http://www.dfanning.com/misc/pin_3d.jpg
>>>
>>> The FSC_Surface program is here:
>>>
>>> http://www.dfanning.com/programs/fsc_surface.pro
>>>
>>> Cheers,
>>>
>>> David
>
>
>
>
> -----------== Posted via Newsgroups.Com - Uncensored Usenet News
==----------
> http://www.newsgroups.com The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Ulimited Fast Downloads - 19 Servers
=-----




-----------== Posted via Newsgroups.Com - Uncensored Usenet News ==----------
http://www.newsgroups.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDLWAVE 4.13 Release (idlwave.org)
Next Topic: Off-Topic: DISCOUNT copies of Voxar Plug & View 3D available

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

Current Time: Wed Oct 08 13:45:39 PDT 2025

Total time taken to generate the page: 0.00737 seconds