POV-Ray : Newsgroups : povray.general : Merging of Two Boxes Behaviour : Re: Merging of Two Boxes Behaviour Server Time
30 Jul 2024 06:28:32 EDT (-0400)
  Re: Merging of Two Boxes Behaviour  
From: Joerg
Date: 26 Jul 2009 03:19:36
Message: <4a6c0388$1@news.povray.org>
this should also work:


difference{
        box{<0,107,0>,<233,300,36> }
        box{<-100,233,-100>,<197,500,100>}
        box{<-100,  0,-100>,<197,197,100>}

        // Tinted blue crystal
        pigment { rgbf<0.8,0.8,1,0.9> }
        material { M_Glass3 }
        interior { Glass_Interior }
        finish { Glass_Finish }

        translate <-143,10,-18>

        rotate <0,clock,0>
}



HerrVlkr wrote:
> I am new to POV-Ray.  In the example below, I am trying to merge two boxes
> together.  But when I render the image, the boxes disappear at the sections
> where they intersect.  Is this correct?
> 
> How do I get my two boxes to merge into one uniform 'T' shape.  This does not
> happen with a 'union'.  But I can't use 'union' because I want to render the
> 'T' as a 'glass like' object.  Any suggestions?
> 
> #include "colors.inc"
> #include "textures.inc"
> 
> global_settings
> {
>         max_trace_level 10
>         ambient_light White
> }
> 
> background { color Gray }
> 
> camera
> {
>         location <0, 153, -320>
>         look_at <0, 153, 0>
> }
> 
> merge
> {
>         box{<0,233,0>, <233-16,197,36>}
>         box{<197,/*233-16*/300,0>, <233,107,36>}
> 
>         // Tinted blue crystal
>         pigment { rgbf<0.8,0.8,1,0.9> }
>         material { M_Glass3 }
>         interior { Glass_Interior }
>         finish { Glass_Finish }
> 
>         translate <-143,10,-18>
> 
>         rotate <0,clock,0>
> }
> 
>


Post a reply to this message

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