|
|
Problem: Colours and Effects aren't the same as Predefined Shapes in
Isosurface?
I'm unable to achieve the Translucent effect in the Isosurface Code. The
Translucent effect is NICE in the Predefined Shapes Code.
[Isosurface Code]
#include "colors.inc"
global_settings
{
assumed_gamma 1.0
}
camera
{
location <0.0, .5, -4.5>
direction 1.5*z
right 4/3*x
look_at <0.0, 0.0, 0.0>
}
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-30, 30, -30>
}
union
{
// Cylinder Middle
isosurface {
function { pow(x,2) + pow(z,2) - pow(0.215,2) }
accuracy 0.001
threshold 0
max_gradient 2
contained_by{box{<-1,-0.5,-1>, <1,0.5,1>}}
//texture{pigment {White} finish{specular 1}}
texture{pigment {White filter 0.7} finish{specular 1}}
}
//Sphere Top
isosurface {
function { pow(x,2) + pow(y,2) + pow(z,2) - pow(0.5,2) }
accuracy 0.001
threshold 0
max_gradient 2
//contained_by{sphere{0,0.78}}
pigment {rgb .9}
//texture{pigment {White} finish{specular 1}}
texture{pigment {White filter 0.7} finish{specular 1}}
translate <0, 0.78, 0>
}
//Sphere Bottom
isosurface {
function { pow(x,2) + pow(y,2) + pow(z,2) - pow(0.5,2) }
accuracy 0.001
threshold 0
max_gradient 2
//contained_by{sphere{0,-0.78}}
pigment {rgb .9}
//texture{pigment {White} finish{specular 1}}
texture{pigment {White filter 0.7} finish{specular 1}}
translate <0, -0.78, 0>
}
// Cylinder Top
isosurface {
function { pow(x,2) + pow(z,2) - pow(0.5,2) }
accuracy 0.001
threshold 0
max_gradient 2
contained_by{box{<-1,0.78,-1>, <1,1,1>}}
//texture{pigment {White} finish{specular 1}}
texture{pigment {White filter 0.7} finish{specular 1}}
}
// Cylinder Bottom
isosurface {
function { pow(x,2) + pow(z,2) - pow(0.5,2) }
accuracy 0.001
threshold 0
max_gradient 2
contained_by{box{<-1,-0.78,-1>, <1,-1,1>}}
//texture{pigment {White} finish{specular 1}}
texture{pigment {White filter 0.7} finish{specular 1}}
}
}
[/Isosurface Code]
[Predefined Shape Code]
#include "colors.inc"
global_settings
{
assumed_gamma 1.0
}
camera
{
location <0.0, .5, -4.5>
direction 1.5*z
right 4/3*x
look_at <0.0, 0.0, 0.0>
}
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-30, 30, -30>
}
union
{
cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215}
sphere{<0, .78, 0> 0.5}
sphere{<0, -.78, 0> 0.5}
cylinder{<0, .78, 0>, <0, 1, 0>, .5}
cylinder{<0, -.78, 0>, <0, -1, 0>, .5}
texture{pigment {White filter 0.7} finish{specular 1}}
}
[/Predefined Shape Code]
Post a reply to this message
|
|