POV-Ray : Newsgroups : povray.binaries.images : Media photons artifact : Re: Media photons artifact Server Time
6 Aug 2024 17:02:01 EDT (-0400)
  Re: Media photons artifact  
From: dlm
Date: 25 Oct 2006 00:11:11
Message: <453ee3df$1@news.povray.org>
First let me say that I am no expert on this!
May I suggest that this artefact may be the result of your cylinder light 
source.
Try changing its radius. Does that move the shadow edge?
also rotating your view by adding "rotate 85*z" at the end of your camera 
block will reveal that you have two parallel lines - and that looks like a 
cylinder to me.
As a matter of interest why are you using a red lens rather than red light?
Is that just the fun part of this neat optical workbench?
DLM

"Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote in message 
news:web.453dd34a9442a68ff5fba6ef0@news.povray.org...
> Hello POVers!
>
> Here is an attempt to media photons with refraction and reflection for my
> own education. The result is quite satisfactory, but an artifact appears.
> If follows the radius of the cylinder light. I tried many settings and
> combinations, in vain. The artifact still remains. Any idea?
>
>     Thanks.
>
> The code is small enough I can put it hereafter.
>
> // Persistence of Vision Ray Tracer Scene Description File
> // File: ?.pov
> // Vers: 3.5
> // Desc: Basic Scene Example
> // Date: mm/dd/yy
> // Auth: ?
> //
>
> #version 3.5;
>
> #include "colors.inc"
>
>
> #declare LIGHT_RADIUS = 1/2;
> #declare PHOTON_SPACING = 1/100;
> #declare PHOTON_MEDIA = 80;
>
>
> global_settings {
>  assumed_gamma 1.0
>  max_trace_level 10
>  photons {spacing PHOTON_SPACING media PHOTON_MEDIA jitter 1}
> }
>
> // ----------------------------------------
>
> camera {
>  location  <0.0, 0.0, 0.0>
>  direction 1.5*z
>  right     x*image_width/image_height
>  look_at   <0.0, 0.0,  1.0>
>  translate -12*z
>  rotate 85*x
>  translate -z
>
> }
>
> light_source {
>  -200*z
>  color rgb 1*<1, 1, 1>  // light's color
>  cylinder radius LIGHT_RADIUS falloff LIGHT_RADIUS point_at 0
>  photons {refraction on reflection on}
> }
> // ----------------------------------------
>
> #declare O_Background = sphere
> {
>    0, 1
>    hollow
>    pigment {color 0.05*White}
>    scale 100000
> }
>
> #declare O_Mirror = union
> {
>    box {-1, 1 pigment {rgb 1} finish {reflection 1 ambient 0 diffuse 0
> specular 0}}
>    box {-1.05, 1.05 translate 0.06*z pigment {Yellow}}
>    scale 0.1*z
> }
>
> #declare O_Lens = union
> {
>    intersection
>    {
>      sphere {0.0, 2 translate 1.8*z}
>      sphere {0.0, 2 translate -1.8*z}
>      //hollow
>      pigment {rgbt 1}
>      finish {diffuse 0 ambient 0}
>      interior {ior 1.5 fade_color Red fade_distance 0.2 fade_power 1001}
>    }
> }
>
> #declare O_MediaContainer = box
> {
>    -1, 1 scale LIGHT_RADIUS*y
>    pigment {rgbt 1}
>    hollow
>    scale 5
>    interior {media {samples 20*PHOTON_MEDIA*PHOTON_SPACING scattering {1,
> 0.3*White extinction 0}}}
> }
>
> object {O_Background}
> object {O_Mirror scale 2 rotate 60 *y}
>
> object {O_MediaContainer photons {target}}
> object {O_Lens translate -4*z photons {target collect off refraction on
> reflection on}}
>
>
>
> // "Artifact" label
> #declare O_Arrow = union
> {
>    cylinder {0, z, 1/20}
>    cone {0, 1/6, z/2, 0 translate z}
> }
>
> #declare O_Label = text
> {
>    ttf "arial.ttf" "Artifact"
>    0.1, 0
>    rotate 90*x
> }
>
> union
> {
>    object {O_Arrow rotate 30*y translate z + 3*x}
>    object {O_Label}
>    pigment {Yellow}
>    finish {diffuse 0 ambient 1}
>    scale 1/3
>    translate -1.77*x -1.3*z
> }
>


Post a reply to this message

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