POV-Ray : Newsgroups : povray.newusers : Puzzled by gradient Server Time
21 Dec 2024 12:53:20 EST (-0500)
  Puzzled by gradient (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: Puzzled by gradient
Date: 8 Oct 2014 23:00:00
Message: <web.5435f97d27a1b11a5e7df57c0@news.povray.org>
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
    };


Post a reply to this message

From: clipka
Subject: Re: Puzzled by gradient
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.