POV-Ray : Newsgroups : povray.general : Rendering an electromagnetic field and photon rays : Re: Rendering an electromagnetic field and photon rays Server Time
24 Apr 2024 16:20:41 EDT (-0400)
  Re: Rendering an electromagnetic field and photon rays  
From: Stephen
Date: 25 Oct 2017 14:57:32
Message: <59f0de9c$1@news.povray.org>
On 25/10/2017 17:31, Bald Eagle wrote:
> "cbpypov" <nomail@nomail> wrote:
>> Hi,
>>
>> I'm trying to render a high quality "cover art" for a physics thesis
>> (nanophotonics). I have basically two questions:
>>
>>    1. What is the best way to generate a "glowing field distribution"?
>>    2. What is the best way to illustrate a light ray or "photon path" coming from
>> an emitter, say a small glowing sphere
> 
> I would say that you should look at Paul Nylander's work
> http://www.bugman123.com/index.html
> as he's and engineer, and has done an awful lot of very professional quality
> scientific visualization with POV-Ray.
> 
>> For 1): Say I have field values in 3D that I could assign to desired colors and
>> brightness values. So that that I have e.g. a list of (x, y, z, R, G, B,
>> brightness).
> .....
>> So how can I achieve something like
>> this?
> 
> You use an EMISSIVE media.
> I'd also consider generating your field as a df3 file, and then you can "sculpt"
> the media density with that df3 information.
> 

DF3s are probably the way to do it. One drawback is that PovRay uses 
df3s as a monochrome input. So you would need three of them to R G & B 
images. jr might be able to help you with the df3 format as he is 
working on a set of df3 utilities.

The code I use for rendering in colour with df3s is:

         #declare PF = 64  ; // multiplication factor

     #declare Df3_Material0 =
     material{
       texture {
         pigment {
           colour rgbft <1.000,1.000,1.00,0.000,1.000>
         }

       }

       interior{
         ior                 1.000
         caustics            0.000
         dispersion          1.000
         dispersion_samples  7.000
         fade_power          0.000
         fade_distance       0.000
         fade_color          rgb <0.000,0.000,0.000>
         media {
           method     3
           intervals  10
           samples    1, 1
           confidence 0.900
           variance   0.008
           ratio      0.900
           absorption rgb <0.000,0.000,0.000>
           emission   rgb <1.000,0.000,0.000>     * PF
           aa_threshold 0.050
           aa_level    4
           density {
             density_file df3 "Your_red.df3"
             interpolate 2
           }

         }

         media {
           method     3
           intervals  10
           samples    1, 1
           confidence 0.900
           variance   0.008
           ratio      0.900
           absorption rgb <0.000,0.000,0.000>
           emission   rgb <0.000,1.000,0.000>   * PF
           aa_threshold 0.050
           aa_level    4
           density {
             density_file df3 "Your_green.df3"
             interpolate 2
           }

         }

         media {
           method     3
           intervals  10
           samples    1, 1
           confidence 0.900
           variance   0.008
           ratio      0.900
           absorption rgb <0.000,0.000,0.000>
           emission   rgb <0.000,0.000,1.000>      * PF
           aa_threshold 0.050
           aa_level    4
           density {
             density_file df3 "Your_blue.df3"
             interpolate 2
           }

         }

       }

       translate <-0.500,-0.500,-0.500>
     }


> 
>> for 2): They should moreover be small particles emitting focussed beams or maybe
>> glowing wiggly rays. Does anyone have an example of how to implement this?
> 

You might be able to adapt Rune's Electricity Include File to get what 
you need. It does say that it uses MegaPov 1.0. But that is only for the 
glow, I think.

http://runevision.com/3d/include/



> 
>> Thanks in advance
> 
> Certainly:   good luck!
> 
> 

Seconded. :-)

-- 

Regards
     Stephen


Post a reply to this message

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