POV-Ray : Newsgroups : povray.general : Coloring spheres based on their specified size : Re: Coloring spheres based on their specified size Server Time
29 May 2024 04:38:06 EDT (-0400)
  Re: Coloring spheres based on their specified size  
From: Bald Eagle
Date: 1 May 2024 12:15:00
Message: <web.66326a77d66fa13b959fb4725979125@news.povray.org>
"ingo" <nomail@nomail> wrote:

> divide the radius of every sphere by that of the largest sphere, that gives a
> value between 1 and very small. The range depends on the sphere variation. Use
> the value you get as an index to pick a colour, as jr suggest from a spline.
>
> or use one of the interpolation (lerp) macro's to find an index between 1 and
> zero from the radii.
>
> ingo

pigment {rgb <0, Index, 1-Index>}


Post a reply to this message

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