|
|
In my development of rounded objects I want to define two versions of a complex
curvy shape, one bigger than the other, and take the smaller one away from the
larger to leave a shell with (almost) uniform thickness.
I have tried to do this with CSG difference, but it appears that the smaller
isosurface is transparent to rays meeting the inside surface. How can this
surface be made visable? I think this could be a useful extension of this
technique.
Here is a simple demo of the effect:
#version 3.7 ;
global_settings {assumed_gamma 1.0 }
camera {location <-30,20,-40> angle 7 look_at <0,0,0> }
light_source {<-5,20,-20> colour rgb<1,1,1>}
background { color rgb<0.2, 0.4, 0.8> }
#difference {
isosurface {
function {
pow(x,2)+pow(y,2)+pow(z,2)-pow(1.1,2)
}
threshold 1
max_gradient 60
contained_by { box {<-3.2,-3.2, -3.2>, <3.2,3.2,3.2>} }
texture {pigment {color rgb < 1, 0.9, 0.65>}}
}
isosurface {
function {
pow(x,2)+pow(y,2)+pow(z,2)-pow(.9,2)
}
threshold 1
max_gradient 60
contained_by { box {<-3.2,-3.2, -3.2>, <3.2,3.2,3.2>} }
texture {pigment {color rgb < 1, 0.9, 0.65>}}
}
box {<-5,0,0>,<5,5,-5>}
}
Post a reply to this message
|
|