POV-Ray : Newsgroups : povray.newusers : Setting a scene inside a box : Re: Setting a scene inside a box Server Time
27 Jun 2024 17:30:46 EDT (-0400)
  Re: Setting a scene inside a box  
From: Dror Atariah
Date: 16 Feb 2012 07:35:01
Message: <web.4f3cf7a5bf141a6dccae74d00@news.povray.org>
This is what I managed to produce:
//-------------
#include "textures.inc"

/*
Bounding box's corners
*/
#local xmin=-5;
#local ymin=-5;
#local zmin=0;
#local xmax=8;
#local ymax=9.2;
#local zmax=2*pi;

/*
zMax grid
*/
object{
 plane { <0,0,1>,zmax
  pigment {
   Tiles_Ptrn()
   color_map{
    [0.02 color rgb <1,1,1>]   // white stanchions
    [0.04 color rgbt <0,0,0,1>]  // black spaces
   }
   rotate z*90  // rotates the pattern onto the "upper side" of the plane
  }
 }
 no_shadow
 clipped_by{
  box{
   <xmin,ymin,zmin>, <xmax,ymax,zmax>
  }
 }
}

/*
zMin grid
= floor
*/
object{
 plane { <0,0,1>,zmin
  pigment {
   // Pattern color
   Tiles_Ptrn()
   color_map{
    [0.02 color rgb <0,0,0>]   // white stanchions
    [0.04 color rgbt <0,0.51,1,0.5>]  // black spaces
   }
   rotate z*90  // rotates the pattern onto the "upper side" of the plane
// Fixed Color
//   color rgbt<0,0.51,1,0.5>
//   rotate z*90  // rotates the pattern onto the "upper side" of the plane
  }
 }
 no_shadow
/*
Clipping here had to be removed in order to avoid some probelm with color
rendering
*/
// clipped_by{
//  box{
//   <xmin,ymin,zmin>,<xmax,ymax,zmax>
//  }
// }
}


object{
 plane { <1,0,0>,xmax
  pigment {
   Tiles_Ptrn()
   color_map{
    [0.02 color rgb <1,1,1>]   // white stanchions
    [0.04 color rgbt <0,0,0>]  // black spaces
   }
   rotate y*90  // rotates the pattern onto the "upper side" of the plane
  }
 }
 no_shadow
 clipped_by{
  box{
   <xmin,ymin,zmin>,<xmax,ymax,zmax>
  }
 }
}

object{
 plane { <1,0,0>,xmin
  pigment {
   Tiles_Ptrn()
   color_map{
    [0.02 color rgb <1,1,1>]   // white stanchions
    [0.04 color rgbt <0,0,0>]  // black spaces
   }
   rotate y*90  // rotates the pattern onto the "upper side" of the plane
  }
 }
 no_shadow
 clipped_by{
  box{
   <xmin,ymin,zmin>,<xmax,ymax,zmax>
  }
 }
}

object{
 plane { <0,1,0>,ymax
  pigment {
   Tiles_Ptrn()
   color_map{
    [0.02 color rgb <1,1,1>]   // white stanchions
    [0.04 color rgbt <0,0,0>]  // black spaces
   }
   rotate x*90  // rotates the pattern onto the "upper side" of the plane
  }
 }
 no_shadow
 clipped_by{
  box{
   <xmin,ymin,zmin>,<xmax,ymax,zmax>
  }
 }
}

object{
 plane { <0,1,0>,-5
  pigment {
   Tiles_Ptrn()
   color_map{
    [0.02 color rgb <1,1,1>]   // white stanchions
    [0.04 color rgbt <0,0,0>]  // black spaces
   }
   rotate x*90  // rotates the pattern onto the "upper side" of the plane
  }
 }
 no_shadow
 clipped_by{
  box{
   <xmin,ymin,zmin>,<xmax,ymax,zmax>
  }
 }
}
//---------------

It is not perfect, and slows down the rendering... but this is what I have. Can
anyone improve it?


Post a reply to this message

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