|
|
Hi guys, I want to have the difference of a filled sphere and a box, but the
results is an empty sphere (a spherical shell) while I want it acts as cross
section of a filled sphere that looks like a plane. Would you please let me
know how can I make a solid filled sphere and not a hollow spherical shell?
Here is the code:
// Camera location
camera {
location <10,8,-16>
up 0.21*y
right 0.21*x*image_width/image_height
look_at <0,0,0>
}
// White background
background{rgb 1}
// Light sources
light_source {<30,70,-60> color rgb <0.6,0.6,0.7>}
light_source {<-10,-5,-40> color rgb <0.5,0.5,0.4>}
// Particles and their Voronoi cells
difference {
sphere{
<0,0,0>, 2
pigment{rgb<0.8,0.7,0.2>}
finish{ambient 0.3 specular 0.2 reflection 0.4}
}
box{
<0,0,-1>, <2,2,-2>
pigment{rgb<0.8,0.0,0.0>}
finish{ambient 0.3 specular 0.2 reflection 0.4}
}
}
Post a reply to this message
|
|
|
|
Wasn't it Amir_ni who wrote:
>Hi guys, I want to have the difference of a filled sphere and a box, but the
>results is an empty sphere (a spherical shell) while I want it acts as cross
>section of a filled sphere that looks like a plane. Would you please let me
>know how can I make a solid filled sphere and not a hollow spherical shell?
That code does generate a solid sphere with a bit cut out of it. The red
surfaces are the interior of the sphere. It just looks a bit strange
because of the reflections and the position of the lights.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
|
|
Mike is right, you do have a solid sphere. The result should be more clear if
you set reflection to 0.
BTW, I see you mention Voronoi in your code. You don't happen to have an
algorithm or source code for a Voronoi diagram on a sphere?
Regards,
Steven
Post a reply to this message
|
|
|
|
"Amir_ni" <nomail@nomail> wrote:
> Hi Steven, sorry to be late. I was out for a while. I didn't get the point with
> your question about Voronoi construction on an sphere. My Voronoi tessellation
> is related to some point particles in a box and I am partitioning the space.
> Have fun.
Voronoi on a sphere is a special case of a 3D Voronoi tessellation. It's just
that the site points are all on the surface of a sphere. If you happen to have
code and/or an algorithm for producing 3D Voronoi diagrams which you would like
to share, I'd be happy to study them. Thanks
Steven
Post a reply to this message
|
|