|
|
Thanks again to Bald Eagle and as well to Stephen for the fragment. Together
with the python df3 class getting the df3 to work should be easy. But the doc
says it is limited to a box from 0,0,0 to 1,1,1. Is this a problem regarding my
relatively complex volume?
Just to show what I have so far, I'll post the code below. It does not feature
any approach for the field iclusion. A single yellow emitter is presented but
does not yet produce a beam. The electricity stuff looks interesting, although
the photon passes should be straight ;) I'll look into this again tomorrow, it
is already night time in Germany :)
// Imports
//--------------------------------------------------------------------------
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
#include "metals.inc"
//--------------------------------------------------------------------------
// Global Settings
//--------------------------------------------------------------------------
#version 3.7;
global_settings{
assumed_gamma 1.0
}
// Global parameters
//--------------------------------------------------------------------------
// 0=off, 1=fast; 2=medium quality; 3=high qual.;
// 4= medium qual.+ recursion_limit 2
#declare Radiosity_On = 0;
#declare HDRlighting = false;
#declare Media_On = true;
#declare Media_Quality = 10;
#declare a_real = 600.; // lattice constant
#declare d_real = 367.; // hole diameter
#declare h_real = 116.; // phc height
#declare sqrt3 = 0.5*sqrt(3.);
// derived parameters
#declare a = a_real/a_real;
#declare d = d_real/a_real; // hole diameter
#declare h = h_real/a_real; // phc height
#declare cx = a/sqrt3/4; // standard x coordinate of hexagon
#declare cy = 0.5*a; // standard y coordinate of hexagon
//--------------------------------------------------------------------------
background{White}
//--------------------------------------------------------------------------
camera {
angle 30
location <0, 2, -3>
look_at <0, 0, 0>
}
//--------------------------------------------------------------------------
//light_source { <20, 20, -20> color White }
// Textures
//--------------------------------------------------------------------------
#declare f_reflective_metal = finish {
emission 0.
diffuse albedo 0.075
brilliance 5.
reflection { .9 metallic 1 } metallic
irid {
0.25
thickness 0.2 //Schichtdicke
turbulence 0.1
}
}
#declare f_metal_shiny = f_reflective_metal
// basic shiny metal
#declare t_shiny_metal =
texture {
pigment { rgb <.45, .42, .41> }
finish { f_metal_shiny }
}
// Object geometries
//--------------------------------------------------------------------------
#declare geo_si = prism {
linear_sweep
linear_spline
0., // sweep the following shape from here ...
h, // ... up through here
7, // the number of points making up the shape ...
<-2*cx,0>, <-cx,cy>, <cx,cy>, <2*cx,0>, <cx,-cy>, <-cx,-cy>, <-2*cx,0>
}
#declare geo_hole = cylinder {
<0., -0.1, 0.>, <0., h+0.1, 0.>, d/2.
}
#declare phc = difference {
object{ geo_si }
object{ geo_hole }
}
plane
{ y, 0.
material{
texture {
pigment{ rgb<.1,.1,.1>}
finish {
reflection .1
}
}
}
}
object{
phc
texture{ t_shiny_metal }
}
/*
sphere{
<0,0,0>, 0.05
translate<0.1,h+0.1,0>
texture{
pigment{ color rgbt<0.9,0.55,0,0.6>}
finish { phong 1 }
} // end of texture
} // end of sphere
*/
light_source{
<0.,0.,0> color White*.5
looks_like{
sphere{ <0.1,h+0.1,0>, 0.01
texture{
pigment{color rgbt<0.98,0.9,0,0.2>}
finish {ambient 0.9
diffuse 0.1
phong 1}
} // end texture
} // end of sphere
} //end of looks_like
} //end of light_source
// Media box
//--------------------------------------------------------------------------
#if (Media_On)
box{
<-10,0,0>, <20, 5, 10>
pigment { rgbt 1 } // clear
hollow
interior{
media{
scattering{ 1 0.17 extinction 0.}
samples 1*Media_Quality, 10*Media_Quality // min, max
} // end media
} // end interior
} // end box
#end
// Radiosity settings
//------------------------------------------------------------- settings start
#if (Radiosity_On > 0)
global_settings {
#ifndef ( Rad_Quality )
#declare Rad_Quality = Radiosity_On;
#end
//--------- radiosity settings -------------------------------- ///
// from POV-Ray samples "scene templates/patio-radio.pov
#switch (Rad_Quality)
#case (1)
radiosity { // --- Settings 1 (fast) ---
pretrace_start 0.08
pretrace_end 0.02
count 50
error_bound 0.5
recursion_limit 1
}
#break
#case (2)
radiosity { // --- Settings 2 (medium quality) ---
pretrace_start 0.08
pretrace_end 0.01
count 120
error_bound 0.25
recursion_limit 1
}
#break
#case (3)
radiosity { // --- Settings 3 (high quality) ---
pretrace_start 0.08
pretrace_end 0.005
count 400
error_bound 0.1
recursion_limit 1
}
#break
#case (4)
radiosity { // --- Settings 4 (medium quality, recursion_limit
2) ---
pretrace_start 0.08
pretrace_end 0.005
count 350
error_bound 0.15
recursion_limit 2
}
#break
#case (4)
radiosity { // --- Settings 5 (high quality, recursion_limit 2)
---
pretrace_start 0.08
pretrace_end 0.005
count 350
error_bound 0.1
recursion_limit 2
}
#break
#end // end of switch
} // end of global settings !!!!
#default{ finish {emission 0.4 diffuse 0. ambient 0.}}
//--------------------------------------------------------------------------
#else
#default{ finish{ ambient 0.1 diffuse 0.9 }
} // for intel computers
#end // Radiosity_On > 0
//--------------------------------------------------------------------------
// HDRI environment
//--------------------------------------------------------------------------
#if (HDRlighting)
sky_sphere{
pigment{
image_map{
hdr "hdr/Mt-Washington-Hotel-Lookout_Gauss15.hdr"
gamma 1.
map_type 1
interpolate 2
}
}
rotate < 0,20,0> //rotate < 0,-60,0> // adapt it to your direction
} // end sky_sphere
//light_source{ <0, 500, 0> color White*25 }
#else
light_source
{ <10, 200, 0>/10, 1
fade_distance 1 fade_power 20
area_light x*3, y*3, 12, 12 circular orient adaptive 0
}
#end
Post a reply to this message
|
|