POV-Ray : Newsgroups : povray.newusers : gradient question : Re: gradient question Server Time
4 Nov 2024 21:22:14 EST (-0500)
  Re: gradient question  
From: Trevor Quayle
Date: 19 Sep 2001 14:18:37
Message: <3ba8e17d$1@news.povray.org>
I think the gradient vector gets normalized, it is only used as a direction,
not a scale.
You should therefore, add a scale statement (and probably translate the
pattern to the base of the cylinder)

cylinder {
  <-1,-1,0>, <1,1,0>, 0.2
  texture {
    pigment {
      gradient
      (<1,1,0>-<-1,-1,0>)
      color_map {
        [ 0.0 color rgb 1]
        [1.0 color rgb <0,0,1>]
      }
      scale vlength(<1,1,0>-<-1,-1,0>)
      translate <-1,-1,0>
    }
  }
}


-tgq


--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}//   TGQ


Post a reply to this message

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