POV-Ray : Newsgroups : povray.general : Feature Request - Texture Override, Help Request : Re: Feature Request - Texture Override, Help Request Server Time
21 May 2024 15:34:44 EDT (-0400)
  Re: Feature Request - Texture Override, Help Request  
From: SharkD
Date: 18 Jan 2008 20:45:01
Message: <web.479154a626ad74ae4aa7c9670@news.povray.org>
Why not try the following code which I created that combines the two methods I
provided in my previous posts?

// build a section of brick road
#declare o_Section =
  union {
    #declare Z = 0;
    #while (Z < 20)
      #declare X = 0;
      #while (X < 20)
        #declare brick_translate = <(X-10 #if(Z/2=int(Z/2)) +0.5
#end)*(8+l_Gap), 0, Z*(4+l_Gap)>/12;
        object {
          o_Brick
          texture {
            pigment { eval_pigment(p_Brick, x*rand(l_Seed)) }
          }
          translate brick_translate
        }
        object {
          o_Brick
          scale y * 1.001
          translate brick_translate
        }
        #declare X = X + 1;
      #end
      #declare Z = Z + 1;
    #end
  }


// put some sections together to build a road
#declare o_Road =
  union {
    #declare S = 0;
    #while (S < 10)
      #declare section_translate = z*S*20*(4+l_Gap)/12;
      #declare brick_translate = 2*(20-10)*(8+l_Gap)/12;
      object {
        o_Section
        texture {
          pigment {p_Stripe_z}
          translate x*.5
          scale brick_translate
          translate -section_translate
        }
        translate section_translate
      }
      #declare S = S + 1;
    #end
  }

object { o_Road }


Post a reply to this message

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