POV-Ray : Newsgroups : povray.newusers : this is very strange!! : Re: this is very strange!! Server Time
31 Jul 2024 06:22:34 EDT (-0400)
  Re: this is very strange!!  
From: Fidel viegas
Date: 11 Dec 2002 20:48:19
Message: <BA1D9A05.7FD8%fidel.viegas@artrecognition.co.uk>
in article web.3df7bbc0306b460ede2a6cfb0@news.povray.org, Lenx at
lenx_@hotmail.com wrote on 11/12/02 10:27 pm:

> #include "Colors.inc"
> 
> camera{
> location <0,10,0>
> look_at <0,2,0>
> }
> 
> light_source{ <-10,10,-10> color White}
> 
> plane{ y,0 pigment{ checker Black White } }
> 
> 
> 
> 
> box{ <0,0,0> <.1,6,.1> rotate <30,0,-30> translate <-2,0,-2> pigment{Grey}}
> 
> box{ <-.05,0,-.05> <.05,6,.05> pigment{Green} finish{ambient .3} }
> 
> 
> 
> When you render this scene, you see a grey rod next to a green one. I don't
> understand why they don't intersect?! Looking to the rotation of the grey
> rod, it should be crossing a point where x=0 and z=0 (the green rod).
> But it doesn't...
> I thought a lot about this but i realy don't understand.
> can someone please explain what's wrong here?
> 
> 

For you to have an intersection, you need to use the CSG. In your case, you
need to wrap your two boxes above with the keyword intersection as follows:

intersection {
  box{ 
    <0,0,0>, 
    <.1,6,.1> 
    rotate <30,0,-30>
    translate <-2,0,-2>
    pigment{Grey}
  }
  box{ 
    <-.05,0,-.05>, 
    <.05,6,.05> 
    pigment{Green} 
    finish{ambient .3}
  }
}

But the two boxes above do not have an intersection point. So, in this case
it is useless. What exactly are you trying to create? Have a look at your
code again and fiddle with it so that you have an intersection area that
matches your requirements.
Also, have a look at the documentation on section 3.3 for general CSG and
section 3.3.3 for intersection. That should help you out.

All the best

Fidel.


Post a reply to this message

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