POV-Ray : Newsgroups : povray.newusers : Puzzled by gradient : Re: Puzzled by gradient Server Time
29 Apr 2024 02:13:54 EDT (-0400)
  Re: Puzzled by gradient  
From: clipka
Date: 9 Oct 2014 00:23:58
Message: <54360dde$1@news.povray.org>
Am 09.10.2014 04:57, schrieb Bald Eagle:
> Warp posted this code for a wood floor he made, and I'm mystified by the "2"
> after "gradient x".  Can anyone explain?
>
> normal { gradient x 2
>      slope_map {
>       [0.00 <0, 1>]
>       [0.05 <1, 0>]
>       [0.95 <1, 0>]
>       [1.00 <0,-1>]
>       }
>      scale 2
>      };

It's an optional scaling factor for the bumpiness. (Officially there 
should be a comma between the "x" and the "2", but POV-Ray is rather lax 
on commas.)


Post a reply to this message

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