POV-Ray : Newsgroups : povray.beta-test : Blob component textures transformed twize : Re: Blob component textures transformed twize Server Time
4 Nov 2024 13:02:04 EST (-0500)
  Re: Blob component textures transformed twize  
From: Greg M  Johnson
Date: 19 Nov 2001 11:49:26
Message: <3BF9379F.A105CF9F@aol.com>
Rune wrote:

> When a blob component with an individual texture is transformed after the
> texture statement, the texture is transformed twize. It should only be
> transformed once, so it follows the component.

Hmm. Consider:

#include "colors.inc"
light_source {<1,2,-3>*1000, color 1.5}
background {color <0.3,0.5,0.8>}

#declare OddScale=<2.5,2.5,2.499999999999999>;
#declare OKScale= <2.5,2.5,2.4999999999999999>;

#declare piggy=pigment{
        gradient y
        pigment_map{
                [0.5 Red]
                [0.5 Yellow]
                }
                scale 4 }

blob {
   threshold .5
   sphere {0, 1, 1 scale OddScale
          texture{pigment {piggy}}
          translate y*1 // pigment translated twize!
          }
   translate <-3,2,10>
}
blob {
   threshold .5
   sphere {0, 1, 1 scale OddScale
          texture{pigment {piggy}}
          }
   translate <0,2,10>
   translate y*1 // pigment OK!
}
blob {
   threshold .5
   sphere {0, 1, 1 scale OddScale
          texture{pigment {piggy}}
          }
   translate <3,2,10>
}

blob {
   threshold .5
   sphere {0, 1, 1 scale OKScale
          texture{pigment {piggy}}
          translate y*1// pigment OK!
          }
   translate <-3,-2,10>
}
blob {
   threshold .5
   sphere {0, 1, 1 scale OKScale
          texture{pigment {piggy}}
          }
   translate <0,-2,10>
   translate y*1 // pigment OK!
}
blob {
   threshold .5
   sphere {0, 1, 1 scale OKScale
          texture{pigment {piggy}}
          }
   translate <3,-2,10>         // pigment OK!
}

cylinder{<-10, 6,10>,<10, 6,10>,.07 }
cylinder{<-10, 4,10>,<10, 4,10>,.07 }
cylinder{<-10, 2,10>,<10, 2,10>,.07 }
cylinder{<-10, 0,10>,<10, 0,10>,.07 }
cylinder{<-10,-2,10>,<10,-2,10>,.07 }
cylinder{<-10,-4,10>,<10,-4,10>,.07 }
cylinder{<-10,-6,10>,<10,-6,10>,.07}


Post a reply to this message

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