POV-Ray : Newsgroups : povray.newusers : Problem em create a simple box Server Time
4 Nov 2024 19:16:11 EST (-0500)
  Problem em create a simple box (Message 1 to 3 of 3)  
From: BlackSilver
Subject: Problem em create a simple box
Date: 24 Mar 2003 03:45:05
Message: <web.3e7ec52965d81a663e895b380@news.povray.org>
I Have a problem in the union between two parts of my box:

#declare Behind_Part =
box   { <5.00, 0.00, -0.5>,
        <-5.75, 5.75, 0.0> }

#declare Left_Part =
box   { <5.00, 0.00, -0.5>,
        <-5.75, 5.75, 0.0> rotate y*90 }

union {
object { Behind_Part }
object { Left_Part }
object { Floor }
texture  { T1 }
}

In beggining I imagine that the rotation will make the Left_Part of box
match with de other part with perfection, but when I do this, the Left_Part
cuts the Behind_Part in the middle, not in the left corner of the
Behind_Part, the opposed of my prospections

What I can do to solve the problem?

To anyone have a better idea, you may render my scene

#include "colors.inc"
#include "textures.inc"
#include "woods.inc"

global_settings {max_trace_level 25}

camera {
   location <-5,10,-20>
   look_at <0,0,0>
}

#declare Dist=80.0;
light_source {< 40, 17, -14> color White
   area_light <-20, 0, -20>, <40, 0, 40>, 3, 3
   adaptive 1
   jitter
}
light_source {< 40, 17, -14> color White
   area_light <-20, 0, -20>, <20, 0, 20>, 3, 3
   adaptive 1
   jitter
}
light_source {< 0, 17, 0> color White
   area_light <-30, 0, -30>, <30, 0, 30>, 3, 3
   adaptive 1
   jitter
}

#declare M_Wood18B =
colour_map {
    [0.00 0.25   color rgbf < 0.70, 0.46, 0.12, 0.10>
                 color rgbf < 0.74, 0.49, 0.13, 0.20>]
    [0.25 0.40   color rgbf < 0.74, 0.49, 0.13, 0.20>
                 color rgbf < 0.75, 0.48, 0.10, 0.70>]
    [0.40 0.50   color rgbf < 0.75, 0.48, 0.10, 0.70>
                 color rgbf < 0.70, 0.43, 0.15, 0.95>]
    [0.50 0.70   color rgbf < 0.70, 0.43, 0.15, 0.95>
                 color rgbf < 0.76, 0.49, 0.17, 0.70>]
    [0.70 0.98   color rgbf < 0.76, 0.49, 0.17, 0.70>
                 color rgbf < 0.74, 0.49, 0.13, 0.20>]
    [0.98 1.00   color rgbf < 0.74, 0.49, 0.13, 0.20>
                 color rgbf < 0.70, 0.46, 0.12, 0.10>]
}


#declare Floor_Texture =
    texture { pigment { P_WoodGrain18A color_map { M_Wood18A }}}
    texture { pigment { P_WoodGrain12A color_map { M_Wood18B }}}
    texture { pigment { P_WoodGrain12B color_map { M_Wood18B }}
        finish { reflection 0.25 }
    }

#declare Floor =
plane { y,0
    texture { Floor_Texture
        scale 0.5
        rotate y*90
        rotate <10, 0, 15>
        translate z*4
    }
}

#declare T0 = texture { T_Wood19 }

#declare T =
texture { T0
    finish { specular 0.50 roughness 0.1 ambient 0.25 }
}

#declare T1 = texture { T translate  x*10 rotate <0, 87, 0> }
#declare T2 = texture { T translate  y*10 rotate <0,  1, 0> }
#declare T3 = texture { T translate -x*10 rotate  <0, 88, 0> translate
z*100}

#declare Behind_Part =
box   { <5.00, 0.00, -0.5>,
        <-5.75, 5.75, 0.0> }

#declare Left_Part =
box   { <5.00, 0.00, -0.5>,
        <-5.75, 5.75, 0.0> rotate y*90 }

union {
object { Behind_Part }
object { Left_Part }
object { Floor }
texture  { T1 }
}
           Thanks for any help and forgivime for my bad english :P


Post a reply to this message

From: Tom Melly
Subject: Re: Problem em create a simple box
Date: 24 Mar 2003 10:26:24
Message: <3e7f23a0$1@news.povray.org>
"BlackSilver" <nomail@nomail> wrote in message
news:web.3e7ec52965d81a663e895b380@news.povray.org...
> I Have a problem in the union between two parts of my box:
>
> #declare Behind_Part =
> box   { <5.00, 0.00, -0.5>,
>         <-5.75, 5.75, 0.0> }
>
> #declare Left_Part =
> box   { <5.00, 0.00, -0.5>,
>         <-5.75, 5.75, 0.0> rotate y*90 }
>

Problem 1: You are going to have co-incident surfaces.
Problem 2: Well, I'm not entirely sure what you wanted, but the above will
indeed create a union where the two boxes meet at x=0 and x=-0.5.
Problem 3: I suspect that you don't yet understand how rotate works.

If you want to understand what is going wrong with your version, try this
birds-eye animated view of this simplified version of your scene. You will need
to add +kff10 to the command-line options box to see the animation (that's the
dialogue box next to the output resolution selector).

#include "colors.inc"
camera {   location <0,50,-0.01>   look_at <0,0,0>}

light_source{  <0,100,0>  White}

#declare Behind_Part =
box   { <5.00, 0.00, -0.5>,
        <-5.75, 5.75, 0.0>
        pigment{Red}
      }

#declare Left_Part =
box   { <5.00, 0.00, -0.5>,
        <-5.75, 5.75, 0.0>
        pigment{Green}
      }


union {
object { Behind_Part }
object { Left_Part  rotate y*90*clock}
}


Post a reply to this message

From: BlackSilver
Subject: Re: Problem em create a simple box
Date: 25 Mar 2003 02:20:03
Message: <web.3e8002657160d3f1f9ef853e0@news.povray.org>
Tom Melly wrote:
>"BlackSilver" <nomail[at]nomail> wrote in message
>news:web.3e7ec52965d81a663e895b380[at]news.povray.org...
>> I Have a problem in the union between two parts of my box:
>>
>> #declare Behind_Part =
>> box   { <5.00, 0.00, -0.5>,
>>         <-5.75, 5.75, 0.0> }
>>
>> #declare Left_Part =
>> box   { <5.00, 0.00, -0.5>,
>>         <-5.75, 5.75, 0.0> rotate y*90 }
>>
>
>Problem 1: You are going to have co-incident surfaces.
>Problem 2: Well, I'm not entirely sure what you wanted, but the above will
>indeed create a union where the two boxes meet at x=0 and x=-0.5.
>Problem 3: I suspect that you don't yet understand how rotate works.
>
>If you want to understand what is going wrong with your version, try this
>birds-eye animated view of this simplified version of your scene. You will need
>to add +kff10 to the command-line options box to see the animation (that's the
>dialogue box next to the output resolution selector).
>
>#include "colors.inc"
>camera {   location <0,50,-0.01>   look_at <0,0,0>}
>
>light_source{  <0,100,0>  White}
>
>#declare Behind_Part =
>box   { <5.00, 0.00, -0.5>,
>        <-5.75, 5.75, 0.0>
>        pigment{Red}
>      }
>
>#declare Left_Part =
>box   { <5.00, 0.00, -0.5>,
>        <-5.75, 5.75, 0.0>
>        pigment{Green}
>      }
>
>
>union {
>object { Behind_Part }
>object { Left_Part  rotate y*90*clock}
>}
>
Thanks, my problem wasn't exact this, but your example of rotation was
value, so thanks anyway


Post a reply to this message

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