POV-Ray : Newsgroups : povray.general : povray for isosurfaces plots? (quantum physics) Server Time
1 Aug 2024 00:24:07 EDT (-0400)
  povray for isosurfaces plots? (quantum physics) (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: gawryl
Subject: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 09:40:01
Message: <web.44db361920f88a35ed745e5c0@news.povray.org>
hello,

i'm wondering is it possible to plot an isosurfaces (density) 3D-plots based
on the complex double precission numbers (ASCI file)? i haven't got explicit
formula for this surface, data comes from my numerical calculations...

i need to know it before i start learning povray
(because maybe it isn't a software which i'm looking for)

regards,

gawryl


Post a reply to this message

From: Chris B
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 10:18:54
Message: <44db404e@news.povray.org>
"gawryl" <gaw### [at] gmailcom> wrote in message 
news:web.44db361920f88a35ed745e5c0@news.povray.org...
> hello,
>
> i'm wondering is it possible to plot an isosurfaces (density) 3D-plots 
> based
> on the complex double precission numbers (ASCI file)? i haven't got 
> explicit
> formula for this surface, data comes from my numerical calculations...
>
> i need to know it before i start learning povray
> (because maybe it isn't a software which i'm looking for)
>
> regards,
>
> gawryl
>

Hi Gawryl,

Just to clarify what you're trying to do a little:

It sounds like you will have a file containing a series of 3D coordinates 
that represent points on a surface and that you will then want to plot them 
and generate a 3D image of the results - is that right?

The next question is whether you want to generate a 3D surface from these 
points or just to plot the points themselves to illustrate the density of 
the points as they are distributed around the conceptual surface?

If you just want to display a dot at each location, then it should be quite 
easy to format the input file as an ASCII CSV file with the coordinates of 
each point on a single line in the file, then write a short POV-Ray macro to 
read each point and place a sphere at each location.

If you want to draw a surface then it gets a bit more tricky because you 
need something that's going to work out how to join all of your points 
together and in which sequence etc. So you'd probably be better off 
pre-processing the set of points using some external tool to generate a mesh 
object that could potentially then be fed into POV-Ray to render.

Regards,
Chris B.


Post a reply to this message

From: gawryl
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 10:45:01
Message: <web.44db4583f98bfec2dcd30180@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote:

> If you want to draw a surface then it gets a bit more tricky because you
> need something that's going to work out how to join all of your points
> together and in which sequence etc. So you'd probably be better off
> pre-processing the set of points using some external tool to generate a mesh
> object that could potentially then be fed into POV-Ray to render.
>
> Regards,
> Chris B.

First of all - thanks for you help ;-)

Yes, I'm thinking about the surface but maybe your idea with points
(spheres) is also good. So - could you help me and send an example code
with an answer how to do this?
My data is 3d grid of real numbers (for simplicity) - feel free to chose
your own favorite format - i can reorganize my data - and i need to choose
color of particular sphere at point (x,y,z) as a some functions, witch
depends of a value of this point f(x,y,z).

regards,
gawryl


Post a reply to this message

From: Stephen
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 10:45:01
Message: <web.44db463ff98bfec2b1b469160@news.povray.org>
"gawryl" <gaw### [at] gmailcom> wrote:
> hello,
>
> i'm wondering is it possible to plot an isosurfaces (density) 3D-plots based
> on the complex double precission numbers (ASCI file)? i haven't got explicit
> formula for this surface, data comes from my numerical calculations...
>
> i need to know it before i start learning povray
> (because maybe it isn't a software which i'm looking for)
>
> regards,
>
> gawryl


format to create images using emitting media. I believe that there is a
programme called df3maker that can create these files from a text file.
http://news.povray.org/povray.general/thread/%3C3### [at] yahoocomau%3E/
If you have the data in slices like a MRI scan you can use tga2df3 to create

some manipulation of colour maps they can be polychromatic as well. I
cannot say what the precision of programmes are.

Stephen


Post a reply to this message

From: Mike Williams
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 10:47:41
Message: <XzLWjLAIU02EFwb9@econym.demon.co.uk>
Wasn't it gawryl who wrote:
>hello,
>
>i'm wondering is it possible to plot an isosurfaces (density) 3D-plots based
>on the complex double precission numbers (ASCI file)? i haven't got explicit
>formula for this surface, data comes from my numerical calculations...
>
>i need to know it before i start learning povray
>(because maybe it isn't a software which i'm looking for)

If you can convert your data into .df3 format then POVRay can deal with
it. It's good at displaying media where the foggyness is controlled by
the density values in the data. It's not so good at plotting isosurfaces
from the points where the data has a particular value, the surfaces tend
to end up looking like a collection of boxes.

See http://www.econym.demon.co.uk/isotut/patterns.htm#density

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Chris B
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 11:52:00
Message: <44db5620$1@news.povray.org>
"gawryl" <gaw### [at] gmailcom> wrote in message 
news:web.44db4583f98bfec2dcd30180@news.povray.org...
> "Chris B" <c_b### [at] btconnectcomnospam> wrote:
>
>> If you want to draw a surface then it gets a bit more tricky because you
>> need something that's going to work out how to join all of your points
>> together and in which sequence etc. So you'd probably be better off
>> pre-processing the set of points using some external tool to generate a 
>> mesh
>> object that could potentially then be fed into POV-Ray to render.
>>
>> Regards,
>> Chris B.
>
> First of all - thanks for you help ;-)
>
> Yes, I'm thinking about the surface but maybe your idea with points
> (spheres) is also good. So - could you help me and send an example code
> with an answer how to do this?
> My data is 3d grid of real numbers (for simplicity) - feel free to chose
> your own favorite format - i can reorganize my data - and i need to choose
> color of particular sphere at point (x,y,z) as a some functions, witch
> depends of a value of this point f(x,y,z).
>
> regards,
> gawryl
>

Hi Gawryl,

Judging from the responses from Mike and Stephen, df3 sounds like a pretty 
good way to go and would give you a whole range of options for displaying 
your data. If your data is actually a uniform grid rather than a random set 
of points then you should also be able to use some of the mesh generating 
macros available for POV-Ray to generate a surface.

On the other hand, if you just want to generate dots from a set of points 
stored in a CSV file you could do this with a POV-Ray scene file containing 
the following statements:

camera {location <0, 2, -10> look_at <0,2,0>}
light_source { <0, 50, -30> color 1}

#declare Radius = 0.2;

#fopen InputFile "ngtemp125.csv" read

#while (defined(InputFile))
  #read (InputFile, PosX, PosY, PosZ)
  #declare ThisPosition = <PosX, PosY, PosZ>;
  #declare ThisColour   = ThisPosition/4;
  sphere {ThisPosition, Radius pigment {rgb ThisColour}}
#end


This would read a file called 'ngtemp.csv' containing your numbers in sets 
of three, separated by commas.
For example:

1,3,8,
1.8938846629843754,3.2984375429843754,1.9877653387655554,
2.1487437664643754,3.9238757989843754,2.4835774777755554,
3.8938846629843754,4.2984375429843754,3.9877653387655554,

In the case above I've simply based the colour of each sphere upon the 
position of the dot, but it's quite possible to incorporate more 
sophisticated functions to define the colour, or to add the RGB colour 
components to the CSV file and just read six values for each position.

Regards,
Chris B.


Post a reply to this message

From: gawryl
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 18:00:00
Message: <web.44dbaba1f98bfec2dcd30180@news.povray.org>
"Stephen" <mcavoys_AT_aolDOT.com> wrote:
>

> format to create images using emitting media. I believe that there is a
> programme called df3maker that can create these files from a text file.
>

my datas are stored in ASCI tex files, in my own format, so i'm interested
in
df3maker software. Finally, i have found only M$ Windows version of this
software but I'm using Linux ! does anybody have got the Linux version of
it ?

> Stephen

Thanks Stephen,
    best regard ----- gawryl


Post a reply to this message

From: gawryl
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 18:30:00
Message: <web.44dbb331f98bfec2dcd30180@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote:

> On the other hand, if you just want to generate dots from a set of points
> stored in a CSV file you could do this with a POV-Ray scene file containing
> the following statements:
>
> camera {location <0, 2, -10> look_at <0,2,0>}
> light_source { <0, 50, -30> color 1}
> ................
> Regards,
> Chris B.

thanks again for your help Chris :)

I slighty modyfied your's code (i have add Hue value as a 4-th parameter in
the data source file) and get quite nice (for me, of course) results (see
pictures at http://alpha.uwb.edu.pl/gawryl/edh/povray-tests.html).

my question - how can i create cloud like (as opposed to a solid) spheres -
is it simple? Stephen was mension something about it in contets of MRI
scan...

regards,
gawryl


Post a reply to this message

From: Chris B
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 10 Aug 2006 19:13:32
Message: <44dbbd9c$1@news.povray.org>
"gawryl" <gaw### [at] gmailcom> wrote in message 
news:web.44dbb331f98bfec2dcd30180@news.povray.org...
>
> I slighty modyfied your's code (i have add Hue value as a 4-th parameter 
> in
> the data source file) and get quite nice (for me, of course) results (see
> pictures at http://alpha.uwb.edu.pl/gawryl/edh/povray-tests.html).
>

Wow, That was quick.

>
> my question - how can i create cloud like (as opposed to a solid) 
> spheres -
> is it simple? Stephen was mension something about it in contets of MRI
> scan...
>
> regards,
> gawryl
>

Hi Gawryl,

There are quite a few ways. You'd probably want to look at the media 
tutorial in the POV-Ray help files (enter the keyword 'media' in the index).

A quick and dirty way of doing something similar is to just add some 
transparency to the colour definition, so instead of
pigment {color rgb <1,0,0>}
you can specify
pigment {color rgbt <1,0,0,0.7>}
to give you a red colour with 70% transparency.

Note, that you'll probably need to increase the max_trace_level to get rid 
of black regions and the corresponding error message in the message log. You 
can do this by adding a line such as
  global_settings { max_trace_level 30}
to the top of your scene file. This slows down the render a fair bit, so you 
should keep an eye on the message log to optimise this setting

Regards,
Chris B.


Post a reply to this message

From: Jellby
Subject: Re: povray for isosurfaces plots? (quantum physics)
Date: 11 Aug 2006 12:40:01
Message: <jdouq3-7ns.ln1@badulaque.unex.es>
Among other things, gawryl saw fit to write:

> i'm wondering is it possible to plot an isosurfaces (density) 3D-plots
> based on the complex double precission numbers (ASCI file)? i haven't got
> explicit formula for this surface, data comes from my numerical
> calculations...
> 
> i need to know it before i start learning povray
> (because maybe it isn't a software which i'm looking for)

In case you don't know it, there's a program called VMD
(<http://www.ks.uiuc.edu/Research/vmd/>) which you may find useful. It can
display isosurfaces from volumetric data in OpenGL, have a look at section
7 of this tutorial:
<http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/index.html>.
By the way, it can also export to POV-Ray (as a mesh, I guess), so you can
fiddle with lighting and textures afterwards.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.