POV-Ray : Newsgroups : povray.newusers : ERROR IN ISECT()?---developers lurking? : Re: ERROR IN ISECT()?---developers lurking? Server Time
2 Nov 2024 13:19:01 EDT (-0400)
  Re: ERROR IN ISECT()?---developers lurking?  
From: Bernard Hatt
Date: 13 Feb 2004 02:23:38
Message: <402C7B7B.35A47391@arkady.demon.co.uk>
> In article <402bc4ec$1@news.povray.org>, <MVSmith> wrote:

> > Except....that when the vector you're using to intersect with the intended
> > surface strikes the junction between two objects in this composite
> > structure,
> > sometimes it shoots through the seam and intersects the surface on the
> > opposite
> > side.

I saw a problem like this with trace() appearing to miss coincident
surfaces in my IRTC entry. While I can see why in tracing it isn't possible
to tell which surface the ray hits, I didn't expect it to miss both surfaces,
at the time I put it down to an error in my code.

light_source {<8,5,-1>,1}
camera{ location <12,5,-5> look_at <5,1,0>}

#declare Y1=0.35;
#declare Y2=0.35;       // 0.35 fails, 0.3501 works

#declare A=
union
{
    intersection
    {
        box{<-20,0,0.86> <20,Y1,3>}
        union
        {
            cylinder{<5,0,2.8> <5,Y2,2.8> 1.94 }
            cylinder{<11,0,2.8> <11,Y2,2.8> 1.94 }
            cylinder{<-5,0,2.8> <-5,Y2,2.8> 1.94 }
            cylinder{<-11,0,2.8> <-11,Y2,2.8> 1.94}
        }
    }
    box{<-20,0,0.86> <-11,Y1,3>}
    box{<-5,0,0.86> <5,Y1,3> } 
    box{<11,0,0.86> <20,Y1,3>}
}

object{A pigment {rgb 1}}

#local i=-15;
#while(i<15)
sphere{trace(A,<i,12,2>,-y) 1/10 pigment {rgb x}}
#local i=i+0.1;
#end

Regards,

Bernard


Post a reply to this message

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