POV-Ray : Newsgroups : povray.binaries.images : How to put an image on ONE side of a box : Re: How to put an image on ONE side of a box Server Time: 8 Mar 2021 11:40:20 GMT
  Re: How to put an image on ONE side of a box  
From: Wijnand
Date: 21 Feb 2020 12:10:53
Op 20-2-2020 om 21:49 schreef Alain Martel:
> Le 2020-02-19 à 11:47, Wijnand a écrit :
>> Who can help me to put an image on ONE side of a box.
>>
>> #declare Tegel_1 =
>> box { <100, -9, 100>, <-100, 0, -100>
>>    pigment {
>>      image_map {
>>        gif "vintage-40-vloertegel.gif"
>>        map_type 1
>>        once
>>      }
>>      scale 1
>>    }
>> }
>>
>> The image is: vintage-40-vloertegel.gif
>> The result is: test_01.png
> 
> map_type 1 is used to map the image on a sphere.
> You want to use map_type 0, the default.
> It maps the image in a tiling fashion along the X-Y plane.
> 
> So, it becomes :
> #declare Tegel_1 =
> box { 0, 1 //from <0,0,0> to <1,1,1>
>    pigment {
>      image_map {
>        gif "vintage-40-vloertegel.gif"//use default mapping
>      }
>   translate <-0.5, -0.5, 0>//  centre it
>   rotate 90*x // flip to the X-Z plane
>      scale <200, 9, 200> // scale to the desired dimention
>    }
> }

Thanks again, regards...


Post a reply to this message

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