POV-Ray : Newsgroups : povray.binaries.images : Example images for the related post: "Rendering an electromagnetic field an= : Re: Example images for the related post: "Rendering an electromagnetic fiel= Server Time
14 May 2024 01:58:33 EDT (-0400)
  Re: Example images for the related post: "Rendering an electromagnetic fiel=  
From: cbpypov
Date: 26 Oct 2017 16:40:00
Message: <web.59f2474b231a9fe3bb23337d0@news.povray.org>
What I forgot: I turned on radiosity as yoou mentioned but without a light
source the image was black, except for the emitters (if using a black
background). Why is that?

I think I now got what most of you meant. In my words ... suppose I have the
field data (say intensity) in a CSV file. Let's say I read that file in and
generate an array from it:

#declare N_points_in_file = 1000;
#declare Field_values = array[N_points_in_file];
#declare Index = 0;
#fopen MyFile "field_filename.csv" read
#while (defined(MyFile))
    #read (MyFile, X, Y, Z, Field_intensity)
    #declare Field_values[Index] = <X, Y, Z, Intensity>;
    #declare Index = Index + 1;
#end

Now the array `Field_values` holds all the points and the respective
intensities. Next, I would define an object of the size of my volume, i.e.
a union of the cylinder filling up the hole and another hexahedron above the
structure. Suppose this object is defined as `Field_volume`, I than would have
to set the interior like this

        interior
        { media
            { emission Intensity
              density {
                function { ... Field_value_interpolated(x,y,z) ... }
                color_map {
                    ... "My color map definition" ...
                }
              }

            }
        }

here, `Field_value_interpolated` has to be a function that connects the x,y,z
coordinate to the `Field_intensity` in the `Field_values` array given above.
But for this I would have to find the closest coordinate in the array, right?
Or even use an interpolator?

Moreover, what are the x,y,z that the density function passes?


Post a reply to this message

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