POV-Ray : Newsgroups : povray.advanced-users : particle system : Re: particle system Server Time
1 Jul 2024 06:06:07 EDT (-0400)
  Re: particle system  
From: clipka
Date: 26 Jun 2009 06:50:00
Message: <web.4a44a71a816b3b0aa745f7570@news.povray.org>
"Kay-Ju" <k.j### [at] gmxde> wrote:
> I.e. i have a field consisting of let's say 32
> by 32 small spheres and i want them to be translated
> along the y-axis according to the map-color.
>
> Can this be done?
> In an easy way?

There are multiple ways to do this. I guess the easiest is to #define a pigment
from the image, and use eval_pigment() (defined in functions.inc) in a double
loop to retrieve the color at the respective point in the image (note that the
coordinates should normally range from 0 to 1); you can then use the .red,
..green or .blue component of the returned color vector (or .gray for the
brightness) to compute the desired translation.


Post a reply to this message

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