POV-Ray : Newsgroups : povray.general : Mirrored texture? : Re: Mirrored texture? Server Time
2 Aug 2024 22:16:38 EDT (-0400)
  Re: Mirrored texture?  
From: John VanSickle
Date: 3 Jul 2004 21:28:51
Message: <40e75d53$1@news.povray.org>
Tyler Eaves wrote:
> How can I mirror a texture across an axis?
> 
> Here's what I'm trying to do. I'm modeling a guitar, and a common
> woodworking technique used on guitars is called 'bookmatching'. This is
> used on the top of the body for aestetic reasons. Basically you take a
> block of wood, say, 8" wide x 15" long x 0.5" thick. Cut it down the
> middle so you now have 2 8x15x0.25 peices. Now you lay the two peices side
> by side with two matching edges at the middle. The result is that many of
> the features of the grain are 'mirrored' across the middle of the body. I
> could probably get a good result by mirroring the texture, and then
> applying a small translation or rotation so they don't match EXACTLY.
> Anyone have an idea as to how to go about this?

If the thingy you're modeling is made of two pieces of wood, then model
two pieces of wood:

#local iI=0; #while(iI<2)
   object { MyWoodShape
     texture { MyWoodTexture
       #if(iI) translate z*.3 #end // assumes 1 unit = 1 cm
     }
     #if(iI) scale <1,-1,1> #end
   }
#local iI=iI+1;#end

Regards,
John


Post a reply to this message

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