POV-Ray : Newsgroups : povray.newusers : Non-touching objects seem to be touching : Non-touching objects seem to be touching Server Time
6 Jul 2022 18:57:14 EDT (-0400)
  Non-touching objects seem to be touching  
From: Nicki
Date: 10 Feb 2017 09:10:00
Message: <web.589dc9a46d40fb125e1b0d740@news.povray.org>
I want to visualize opaque spheres inside a transparent spherocylinder (a
cylinder with hemispherical caps at the ends).
When I do so I get weird red spots on the spheres even though they should not be
touching the transparent sphere. I have to make the spheres significantly
smaller then the outer transparent spherocylinder so that this problem
disappears.
In the following I show you three scene-files and the corresponding images that
show this problem.
I would be happy to hear suggestions on how to get rid of this problem.

EXHIBITION 1:
http://imgur.com/KnerkoJ

#include "colors.inc"
 background { color White }
 camera
 { location <0.005, 0.01, 0.015>
   look_at <0.0, 0.0, 0.0> }
 light_source { <-0.01, 0.0, 0.2> color White}
 light_source { <0.01, 0.0, 0.2> color White}
cylinder {< -0.0052500000, 0.0000000000, 0.0000000000 >, < 0.0052500000,
0.0000000000, 0.0000000000 >, 0.0015000000 texture {pigment {color Red transmit
0.5} finish { phong 1 }}}
intersection{ sphere {<0.00525, 0.0, 0.0>, 0.0015}
       box {<0.00525,-0.002,-0.002>,<0.007,0.002,0.002>} texture {pigment {color
Red transmit 0.5} finish { phong 1 }} }
sphere {< -0.0052500000, 0.0000000000, 0.0000000000 >, 0.00149 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0052500000, 0.0000000000, 0.0000000000 >, 0.00149 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< -0.0026250000, 0.0000000000, 0.0000000000 >, 0.00149 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0000000000, 0.0000000000, 0.0000000000 >, 0.00149 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0026250000, 0.0000000000, 0.0000000000 >, 0.00149 texture {pigment
{color Yellow}  finish { phong 1 }}}


EXHIBITION 2:
http://imgur.com/AR7bD5V

#include "colors.inc"
 background { color White }
 camera
 { location <0.005, 0.01, 0.015>
   look_at <0.0, 0.0, 0.0> }
 light_source { <-0.01, 0.0, 0.2> color White}
 light_source { <0.01, 0.0, 0.2> color White}
cylinder {< -0.0052500000, 0.0000000000, 0.0000000000 >, < 0.0052500000,
0.0000000000, 0.0000000000 >, 0.0015000000 texture {pigment {color Red transmit
0.5} finish { phong 1 }}}
intersection{ sphere {<0.00525, 0.0, 0.0>, 0.0015}
       box {<0.00525,-0.002,-0.002>,<0.007,0.002,0.002>} texture {pigment {color
Red transmit 0.5} finish { phong 1 }} }
sphere {< -0.0052500000, 0.0000000000, 0.0000000000 >, 0.00142 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0052500000, 0.0000000000, 0.0000000000 >, 0.00142 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< -0.0026250000, 0.0000000000, 0.0000000000 >, 0.00142 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0000000000, 0.0000000000, 0.0000000000 >, 0.00142 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0026250000, 0.0000000000, 0.0000000000 >, 0.00142 texture {pigment
{color Yellow}  finish { phong 1 }}}


EXHIBITION 3:
http://imgur.com/Vs1zqhS

#include "colors.inc"
 background { color White }
 camera
 { location <0.005, 0.01, 0.015>
   look_at <0.0, 0.0, 0.0> }
 light_source { <-0.01, 0.0, 0.2> color White}
 light_source { <0.01, 0.0, 0.2> color White}
cylinder {< -0.0052500000, 0.0000000000, 0.0000000000 >, < 0.0052500000,
0.0000000000, 0.0000000000 >, 0.0015000000 texture {pigment {color Red transmit
0.5} finish { phong 1 }}}
intersection{ sphere {<0.00525, 0.0, 0.0>, 0.0015}
       box {<0.00525,-0.002,-0.002>,<0.007,0.002,0.002>} texture {pigment {color
Red transmit 0.5} finish { phong 1 }} }
sphere {< -0.0052500000, 0.0000000000, 0.0000000000 >, 0.0014 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0052500000, 0.0000000000, 0.0000000000 >, 0.0014 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< -0.0026250000, 0.0000000000, 0.0000000000 >, 0.0014 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0000000000, 0.0000000000, 0.0000000000 >, 0.0014 texture {pigment
{color Yellow}  finish { phong 1 }}}
sphere {< 0.0026250000, 0.0000000000, 0.0000000000 >, 0.0014 texture {pigment
{color Yellow}  finish { phong 1 }}}

In exhibition 3 it the red "shadows" disappear but the yellow spheres are
significantly smaller than the outer transparent spherocylinder.

I want to thank you in advance for any help.


Post a reply to this message

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