POV-Ray : Newsgroups : povray.binaries.images : Scattering media problem : Re: Scattering media problem Server Time
1 Jul 2024 02:00:26 EDT (-0400)
  Re: Scattering media problem  
From: Jörg 'Yadgar' Bleimann
Date: 11 Oct 2015 14:50:36
Message: <561aaf7c$1@news.povray.org>
Hi(gh)!

 > <shrugs>
>
> We'll probably need more information then.
> Maybe you simply got the colour wrong?
>
O.k., here is the code:

// begin code

#version 3.7;
#include "glass.inc"

global_settings
{
   max_trace_level 10
}

// TEXTURES
#declare T_Grey_Matted_Plastic=
texture
{
   pigment { color rgb 0.7 }
   finish
   {
     ambient 0.1
     diffuse 1
     brilliance 0.4
     phong 0.8
     phong_size 60
   }
   normal
   {
     granite
     turbulence 100
   }
}


// MATERIALS

#declare M_PaneGlass=
material
{
   texture
   {
     pigment
     {
       color rgbft <0.99, 1, 0.99, 0.49, 0.49>
     }
     finish { F_Glass5 }
   }
   interior
   {
     ior 1.52
     fade_color <0, 0.6, 0.35>
     fade_power 1001
     fade_distance 0.1

   }
}

light_source
{
   <0, 2.4, -0.5>
   color rgb 1
}

sky_sphere
{
   pigment
   {
     gradient y
     color_map
     {
       [0 rgb 1]
       [1 rgb 0]
     }
   }
}

/* plane
{
   y, 0
   texture
   {
     pigment { color rgb 1 }
     finish { ambient 0.15 diffuse 1 brilliance 0.2 }
   }
} */

#declare Glass_Pane_Bevel_Cutoff =
box
{
   <-0.155, -0.001*sqrt(2)/2, -0.025>, <0.155, 0.001*sqrt(2)/2, 0.025>
}



#declare Glass_Pane =
difference
{
   box
   {
     0, <0.28, 0.013, 0.3>
   }
   object // upper front bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <315, 0, 0>
     translate <0.14, 0.013, 0>
   }
   object // lower front bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <45, 0, 0>
     translate <0.14, 0, 0>
   }
   object // upper right bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <45, 90, 0>
     translate <0.28, 0.013, 0.15>
   }
   object // lower right bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <315, 90, 0>
     translate <0.28, 0, 0.15>
   }
   object // upper left bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <45, -90, 0>
     translate <0, 0.013, 0.15>
   }
   object // lower left bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <315, -90, 0>
     translate <0, 0, 0.15>
   }
   object // upper back bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <45, 0, 0>
     translate <0.14, 0.013, 0.3>
   }
   object // lower back bevel
   {
     Glass_Pane_Bevel_Cutoff
     rotate <315, 0, 0>
     translate <0.14, 0, 0.3>
   }
   hollow
}

#declare Frame_Corner_Base_Raw=
union
{
   box { 0, <0.00788, 0.02214, 0.06224> }
   difference
   {
     cylinder { <0.00788, 0, 0.03112>, <0.00788, 0.02214, 0.03112>, 
0.03112 }
     box { <-0.05, -0.01, -0.01>, <0.00788, 0.03, 0.07> }
   }
}

#declare Plastic_Frame_Side_Part=
difference
{
   cylinder
   {
     0, <0, 0, 0.302>, 1
     scale <0.02, 0.03056, 1>
   }
   box
   {
     <-0.05, -0.05, -0.01>, <0.05, 0, 0.31>
   }
   box
   {
     <0, -0.05, -0.01>, <0.05, 0.1, 0.31>
   }
}

#declare Central_Unit_Block=
union
{
   cylinder { 0, <0, 0.02214, 0>, 0.03112 }
   box { <0, 0, -0.03112>, <0.07566, 0.02214, 0.03112> }
   cylinder { <0.07566, 0, 0>, <0.07566, 0.02214, 0>, 0.03112 }
}

#declare Fillet=
box
{
   0, <0.036, 0.009, 0.011>
}

#declare Plastic_Frame=
union
{
   object { Plastic_Frame_Side_Part }
   object { Frame_Corner_Base_Raw }
   object { Frame_Corner_Base_Raw  translate <0, 0, 0.23976>}
   object { Plastic_Frame_Side_Part rotate <0, 180, 0> translate <0.28, 
0, 0.302>}
   object { Frame_Corner_Base_Raw rotate <0, 180, 0> translate <0.28, 0, 
0.06224>}
   object { Frame_Corner_Base_Raw rotate <0, 180, 0> translate <0.28, 0, 
0.302>}
   object { Central_Unit_Block translate <0.10217, 0, 0.27088> }
   object { Fillet translate <0.03718, 0.01314, 0.26538> }
   object { Fillet translate <0.20713, 0.01314, 0.26538> }
}


// 0.03236 x
// 0.009 y
// 0.011 z

object
{
   Glass_Pane
   material { M_PaneGlass }
   translate <0, 0.022141, 0>
}

object
{
   Plastic_Frame
   texture { T_Grey_Matted_Plastic }
}

#declare view=4;

camera
{
   #switch(view)
     #case (0)
       location <0.01, 0.015, -0.2>
       look_at <0.01, 0.015, 0.30>
     #break
     #case (1)
       location <0.14, 0.65, -0.7>
       look_at <0.14, 0.0125, 0.001>
     #break
     #case (2)
       location <0.95, 0.65, 0.15>
       look_at <0.14, 0.0065, 0.15>
     #break
     #case (3)
       location <0.14, 0.65, -0.7>
       look_at <0.14, 0.0065, 0.15>
     #break
     #case (4)
       location <0.14, 1, 0.15>
       look_at <0.14, 0, 0.15>
     #break
   #end
   angle 40
}

// end code

See you in Khyberspace!

Yadgar


Post a reply to this message

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