POV-Ray : Newsgroups : povray.general : Putting light sources inside hollow objects : Re: Putting light sources inside hollow objects Server Time
10 Aug 2024 17:28:48 EDT (-0400)
  Re: Putting light sources inside hollow objects  
From: Chris Huff
Date: 11 Nov 1999 16:41:04
Message: <382B3898.E0D7F5F0@compuserve.com>
Ok, first, the holes in the sphere: You are on the right track, but the
difference keyword cuts a piece out of the object, and closes the
opening with a surface corresponding with the difference object. You
also have an unnecessary intersection, there isn't any reason for that
to be there.
What you are doing is making a cylinderical indentation in the sphere
where you want a hole. To get a hole give the cylinder a transparent
texture so you can see through the indentation, or also difference a
sphere from the inside of the sphere:
difference {
    sphere { <0, 0, 0>, 1 hollow pigment { Red }}
    cylinder { <0, 0, -1.01> <0, 0, 0>, .35 pigment {color White filter
1}}
}

or:
difference {
    sphere { <0, 0, 0>, 1}
    sphere { <0, 0, 0>, 0.9}//remove a sphere from the inside, making a
hollow shell
    cylinder { <0, 0, -1.01> <0, 0, 0>, .35}
    pigment { Red }
}

Some other things: "hollow" doesn't affect how the object is rendered,
it only allows it to be filled with media or fog. It still acts as a
surface surrounding a solid object. This is a very common
misunderstanding.
Also, you had the cylinders the same length as the radius of the sphere.
This can cause problems with coincident surfaces, where POV can't decide
which surface is hit first. You should use slightly longer cylinders, as
above.


Post a reply to this message

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