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
26 Jun 2024 03:18:24 EDT (-0400)
  Re: Example images for the related post: "Rendering an electromagnetic fiel=  
From: Alain
Date: 27 Oct 2017 21:02:57
Message: <59f3d741@news.povray.org>

> "Bald Eagle" <cre### [at] netscapenet> wrote:
>>
>> It seems the thing to do is model the hexagonal unit cell, union it as an
>> all-inclusive object, and then repeat it in a hexagonal arrangement.
>>
>> I'm also thinking that you probably don't even need to go the df3 file route,
>> since you're already calculating your field.  You can just use that function to
>> _directly_ define the density of your media.
>> Likewise, you can use that function to map your colors, and according to the
>> Bourke site,
>> "The POVRay file is here: example.pov, note that the density in this example
>> just controls the emission in the media."
>> - so the emission brightness can be controlled that way as well.
>> Just normalize your function so all values are within the 0-1 range.
>>
>> Hit F1 and type density
>> then go to the density, media section:
>>
>> 3.7.2.4 Density
>>
>> "The density statement may begin with an optional density identifier. All
>> subsequent values modify the defaults or the values in the identifier. The next
>> item is a pattern type. This is any one of POV-Ray's pattern functions such as
>> bozo, wood, gradient, waves, etc. Of particular usefulness are the spherical,
>> planar, cylindrical, and boxed patterns which were previously available only for
>> use with our discontinued halo feature. All patterns return a value from 0.0 to
>> 1.0. This value is interpreted as the density of the media at that particular
>> point."
> 
> 
> What you write sounds extremely reasonable to me! I am right now generating the
> field data (sorry for the delay, the hard drive of my PC at work crashed
> completely ... 1 month before the end of my PhD phase). So I will try to figure
> out the density mapping post my results later.
> 
> Until then, could someone of you have a look on the things that I tried related
> to the emitters: I basically created this macro to generated small spheres with
> a glowing "aura":
> 
> #macro QuantumDot(Radius, Intensity, Origin)
> 
>      // The actual quantum dot
>      sphere{
>          <0,0,0>, Radius
>          texture{ Glass2 } // end of texture
>          translate Origin
>      } // end of sphere
> 
>      // The glowing aura
>      sphere {
>          <0,0,0>,
>          Radius* (Intensity*5 + 1)
>          pigment { rgbt 1 } hollow
>          interior
>          { media
>              { emission Intensity
>                density { spherical
>                    color_map {
>                      [0.0 rgb <0,0,0>]
>                      [0.6 rgb <0., 0., 0>]
>                      [0.7 rgb <0.6, 0.6, 0.6>]
>                      [1.0 rgb <1,1,1>]
>                    }
>                  }
>              }
>          }
>          translate Origin
>      }
> //    #end // end of #for loop
> 
> #end // ------------------ end of macro
> 
> 
> Although it looks quite nice to me, there is the problem that the emitting
> spheres do not "overlap" properly (I'd expect that the intensity of the emission
> would add up!?). Moreover, I would want a smooth fade-out of the aura, but yet
> it is dependent on the intensity: with Intensity=1 it looks fine, while
> Intensity=0.4 rather looks like an additional sphere. Please see the attachment.
> 
> Any comments greatly appreciated :)
> 

The media container on the right never overlap the other two, while 
there is a visual overlap on the left, and maybe also a physical 
overlap. Those overlaping part are known to cause that kind of problems.

You should use a single container. When you have multiple medias within 
a single container, they add up.
Multiple densities within the same media will multiply instead.

So, you should place the small spheres, then fill a box with your medias.
You may need to increase the number of samples.
The render time will increase as the number of medias increase.


Post a reply to this message

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