|
|
Here's the source for the hyperboloid family (see p.b.-i).
-----------------------------------------------------------
#version 3.5;
#global_settings { assumed_gamma 1}
camera {
angle 50
location <15, 10, 0>
look_at <0, 0, 0>
right x*image_width/image_height
}
//No Light Necessary For Emission Media
//Here's the Function
#declare F = function { y*y - x*x - z*z }
// The media concentrated between F = 0.45 & 0.55 (about F = 0.5)
#declare CM = color_map {
[0 rgb 0]
[0.45 rgb 0]
[0.45 rgb <1,1, 0>]
[0.55 rgb <1, 1, 0>]
[0.55 rgb 0]
[1 rgb 0]
}
#declare Inter =
interior {
media {
emission rgb<0.5,0.5,0.5>
intervals 25
samples 1,3
// For a single threshold "N", I filter the function with
// 0.5*atan(F(x,y,z) - N) + 0.5 --
// this "squishes" it so that its range is [0, 1]
// This time F is scaled by 3, so it's really F = +/- 1.5, +/- 4.5, etc.
density {function {F(x,y,z)}
//function {0.5*atan(F(x,y,z) - 1) + 0.5}
color_map { CM }
scale 3
}
}
};
//Change the Container as desired
#declare Media_Container = cylinder { <0, -4, 0>, <0, 4, 0> 6 hollow};
object { Media_Container texture { pigment { color rgbt <1, 1, 1, 1> } }
interior {Inter}
}
Post a reply to this message
|
|