POV-Ray : Newsgroups : povray.binaries.animations : No image : Re: No image Server Time: 23 Mar 2019 06:38:47 GMT
  Re: No image  
From: Bald Eagle
Date: 29 Jun 2018 16:05:01
"jr" <cre### [at] gmailcom> wrote:

> like, two media?!  ;-)

So, hopefully this works (completely untested) and it what you're looking for.

#version 3.8;
// Code by William Pokorny, modified by Bill Walker (Bald Eagle) for jr
2018-06-26
// Animation settings - 50 frames, clock from -1 to 1

global_settings {assumed_gamma 1}


#include "colors.inc"
#include "functions.inc"
background {Black}


#declare Camera00 = camera {
     perspective
     location <3,3,-3.001>
     sky y
     angle 35
     right x*(image_width/image_height)
     look_at <0,0,0>
}



#declare White = srgb <1,1,1>;
#declare Light00 = light_source { <50,150,-250>, White }
#declare Red = srgb <1,0,0>;
#declare CylinderX = cylinder { -1*x, 1*x, 0.01 pigment { Red } }
#declare Green = srgb <0,1,0>;
#declare CylinderY = cylinder { -1*y, 1*y, 0.01 pigment { Green } }
#declare Blue = srgb <0,0,1>;
#declare CylinderZ = cylinder { -1*z, 1*z, 0.01 pigment { Blue } }

#declare Base = box {<-1, -0.51, -1>, <1, -0.5, 1> pigment {Gray10}}




#declare InvisibleObject = sphere {<0,0,0>, 0.5}
#declare InvisibleObjectMediaContainer = sphere {<0,0,0>, 0.6}


#declare S = 0.4;
#declare FnZero = function (x,y,z) {0}
//#declare Scanner = box {-S*<1, 1, 1>, S*<1, 1, 1>}

#declare Scanner = cylinder {-1*x, 1*x, 0.1 translate y*0.5 translate
-y*pow(clock,2)}
#declare FnScanner = function {pattern {object {Scanner}}}

#declare Scanner2 = cylinder {-1*x, 1*x, 0.1 rotate y*90 translate y*0.5
translate -y*pow(clock,2)}
#declare FnScanner2 = function {pattern {object {Scanner}}}

#declare FnInvisibleObject = function {pattern {object {InvisibleObject}}}

// user_defined {FnRed, FnGreen, FnBlue, FnFilter, FnTransmit}

#declare ShowOverlap = density {
     user_defined {
         function { FnInvisibleObject (x,y,z)*FnScanner(x,y,z) },
         function { (0.5*FnInvisibleObject (x,y,z)*FnScanner(x,y,z)) +
(0.5*FnInvisibleObject (x,y,z)*FnScanner2(x,y,z))},
         function { FnInvisibleObject (x,y,z)*FnScanner2(x,y,z) },,
     }
}

#declare Media00 = media {
     method       3
     samples      300
     emission     rgb <1,1,1>
     density {ShowOverlap}
}
#declare Clear100 = srgbt <1,1,1,1>;
#declare Texture00 = texture {pigment {color Clear100}}
#declare Interior00 = interior {ior 1 media {Media00}}
#declare Material00 =
material {
     texture {Texture00}
     interior {Interior00}
}
#declare ObjectMediaContainer =
object {
     InvisibleObjectMediaContainer
     material {Material00}
     hollow
}

//--- scene ---
    camera {Camera00}
    light_source {Light00}
    //object {CylinderX}
    //object {CylinderY}
    //object {CylinderZ}
    object {Base}
    object {ObjectMediaContainer}

//------------------------------------------


Post a reply to this message

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