POV-Ray : Newsgroups : povray.advanced-users : Problem getting media to show photons reflected from a mirror : Problem getting media to show photons reflected from a mirror Server Time
29 Jul 2024 04:18:48 EDT (-0400)
  Problem getting media to show photons reflected from a mirror  
From: Raymond
Date: 26 Jan 2003 02:40:03
Message: <web.3e3390b894ba8eb2802871ed0@news.povray.org>
Below is a scene that attempts to do a much simpler version of the
optics.pov scene. Essentially it it a spotlight shining along the Z axis
onto a mirror sitting at the origin and inclined 45 degrees. The light
source and mirror sit within a box containing media that is intended to
react to photons to produce a light scattering showing the path of the
lightbeam before and after it is reflected by the mirror.

Unfortunately, while the light beam is visible as it approaches the mirror,
it is not visible after it has been reflected by the mirror.

I have attempted to model this scene as closely as possible to the technique
that is used in optics.pov. However, I have obviously missed some detail
that eludes me :-(

Could someone point out the (hopefully obvious and glaring) problem for
me???

Cheers,

Raymond.

Scene follows:

#include "colors.inc"

#version 3.5;

#default {finish {ambient 0}}

global_settings {
    assumed_gamma 1
    max_trace_level 5
    photons {
        count 150000
        max_trace_level 9
        media 100, 2
    }
}

// Setup the camera
#declare CamPos = <0, -5, 15>;

camera {
    location CamPos
    look_at < 0, 0, 0>
    angle 35
}


// Define the light sources for the scene
// LIght coming from the camera position
light_source {CamPos, color Gray25
    photons {refraction off reflection off}
    media_interaction off
}

// Light from above the center mirror shining onto it
light_source {<0, 0, 50>, rgb < 1.2, 1, 1.5>
    spotlight radius 0.3 falloff 0.35 point_at < 0, 0, 0>
    photons {refraction off reflection on}
}

// Construct a box to contain the media which will show the path of
// the light beam as it reflects from the mirror

box {<-110,-110, -20>, <110, 110, 50> hollow
    texture {pigment {color rgbf 1}}
    interior {
        media {
            scattering {1, color White extinction 0}
            method 3
            intervals 1 samples 4
        }
    }
    photons {target}
}

// Define a mirror
// X, Y, Z: Position in space of center of mirror
// W, H, D: Width, height depth of mirror
// XR, ZR: Rotation about the X and Z axes
#macro Mirror(X, Y, Z, W, H, D, XR, ZR)
  box {<-(W/2), -(D/2), -(H/2)> <(W/2), (D/2), (H/2)>
  rotate XR*x
  rotate ZR*z
  translate <X, Y, Z>
  texture {
    pigment {color White}
    finish {ambient 0 diffuse 1 reflection 1}
}
}
#end

// Place the mirror
Mirror(0, 0, 0,
       5, 5, .1,
       -45, -45)


Post a reply to this message

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