POV-Ray : Newsgroups : povray.general : A filled sphere : A filled sphere Server Time
30 Jul 2024 12:22:22 EDT (-0400)
  A filled sphere  
From: Amir ni
Date: 10 Feb 2009 22:50:00
Message: <web.49924a668a9cfca3792c7d270@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.