POV-Ray : Newsgroups : povray.newusers : Making a window and molding Server Time
5 Nov 2024 09:23:13 EST (-0500)
  Making a window and molding (Message 1 to 2 of 2)  
From: Wade
Subject: Making a window and molding
Date: 13 Sep 2001 21:19:55
Message: <3ba15b3b$1@news.povray.org>
Hmm I've tried to make a window by following how I made the doorway, and
apparently and obviously it didn't work.  How do I 'cut' a cylinder in half
lengthwise in order to make rounded molding?  If I can.

here's my code:

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

#declare Wall_Texture=
texture{
 pigment{ color White-(White-Khaki)*0.495 }
 normal{ wrinkles 0.2 }
}

#declare light_wood=
pigment{ P_WoodGrain7A color_map {M_Wood7A} }
#declare dark_wood=
pigment{ P_WoodGrain14A color_map {M_Wood14A} }

#declare board_length= 1.5;
#declare board_width= 0.25;

#declare Floor_Texture=
texture{
 pigment{
  gradient y triangle_wave
  pigment_map{
   [ 0.0 light_wood]
   [ 1.0 dark_wood ]
  }
  warp{ repeat board_length*z offset 0.50*y }
  warp{ repeat board_width*x offset board_length*5/2*z }
 }
 normal{
  boxed
  slope_map{
   [0.5 <1.0, 0>]
   [1.0 <0, 0>]
  }
  bump_size 0.1
  scale <board_width,1,board_length>
  warp{ repeat board_length*z }
  warp{ repeat board_width*x offset board_length/2*z }
 }
}

light_source{
 <9,9,9>
 color White
 area_light
 <2,0,0> <0,0,2>
 8,8
 adaptive 0
 jitter
}

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

// Right Wall
box{
 <10,0,-12>,<11,10,12>
 texture{
  Wall_Texture
 }
}

// Left Wall
difference{
 box{
  <-11,0,-12>,<-10,10,12>
  texture{
   Wall_Texture
  }
 }
 box{
  <-12,0,-5>,<-9,8,-8>
  texture{
   pigment{
    color White
   }
  }
 }
}

// Back Wall
difference{
 box{
 <-10,0,-12>,<10,10,-13>
 texture{
  Wall_Texture
  }
 }
 box{
  <-11,0,-8><9,8,-4>
  texture{
   pigment{
    color White
   }
  }
  translate y*6
 }
}

// The Floor
box{
 <-10,-1,-12>,<10,0,12>
 texture{
  Floor_Texture
 }
}

// The Ceiling
box{
 <-10,10,-12>,<10,11,12>
 texture{
  Wall_Texture
 }
}

// A Round Table
union{
 cylinder { <0,0,0><0,0.1,0> 1.5 }
 cylinder { <0,0,0><0,1.4,0> 0.3 translate 0.1*y }
 cylinder { <0,0,0><0,0.1,0> 3 translate 1.5*y }
 texture { T_Wood1 }
 translate -7.25*z
}


Post a reply to this message

From: Trevor Quayle
Subject: Re: Making a window and molding
Date: 14 Sep 2001 07:42:19
Message: <3ba1ed1b$1@news.povray.org>
> // Back Wall
> difference{
>  box{
>  <-10,0,-12>,<10,10,-13>
>  texture{
>   Wall_Texture
>   }
>  }
>  box{
>   <-11,0,-8><9,8,-4>
>   texture{
>    pigment{
>     color White
>    }
>   }
>   translate y*6
>  }
> }


The box you are trying to cut out of the back wall does not intersect the
wall
you want the cutout box to be slightly thicker than the wall

the box you are trying to remove is located between the z coordinates -4
and -8 while the wall is between -12 and -13 i.e., they don't intersect

you wall is <-10,0,-12>,<10,10,-13> (20w x 10h x 1t)

try this box for your window:
<-2,2,-11><2,6,-14>

this will cutout a window 4x4 units in the middle of the back wall

-tgq


Post a reply to this message

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