POV-Ray : Newsgroups : povray.documentation.inbuilt : 3.5.11.7 CELLS Server Time: 23 Oct 2019 02:03:23 GMT
  3.5.11.7 CELLS (Message 1 to 7 of 7)  
From: Kenneth
Subject: 3.5.11.7 CELLS
Date: 18 Oct 2005 21:05:02
Message: <web.4355617ae0e80f9d399425f30@news.povray.org>
Currently, the 3.6.1 documentation states,
"The cells pattern fills 3-D space with unit cubes.  Each cube gets a random
value from 0 to 1."

Wouldn't a clearer explanation be,
"The cells pattern fills 3-D space with unit cubes.  Each cube gets a random
color value from 0 to 1 (or a random color chosen from a user-defined
color_map.)"  ?

Actually, it's not clear if  "0 to 1" means the color INDEX values of the
color-map, or the actual color values themselves.

Ken


Post a reply to this message

From: Warp
Subject: Re: 3.5.11.7 CELLS
Date: 19 Oct 2005 05:39:13
Message: <4355dc00@news.povray.org>
Kenneth <kdw### [at] earthlinknet> wrote:
> Currently, the 3.6.1 documentation states,
> "The cells pattern fills 3-D space with unit cubes.  Each cube gets a random
> value from 0 to 1."

> Wouldn't a clearer explanation be,
> "The cells pattern fills 3-D space with unit cubes.  Each cube gets a random
> color value from 0 to 1 (or a random color chosen from a user-defined
> color_map.)"  ?

  The cells pattern is a pattern. Patterns do not have colors. It would thus
be incorrect to say that it gets color values.

  A pattern is just a function which returns values between 0 and 1,
that's it. It can have several uses besides being used in a pigment.
Thus it would also be incorrect to say that it gets a color from a
user-defined color_map because it can be used in numerous other things
as well.

  Example:

#declare R = function { pattern { cells } };

  Where are the colors here? There aren't any. Where's the color_map? There
isn't one because one is not needed.
  The function defined above can be used for anything that a function
can be used for. It can be used eg. to create a height_field. There are
no colors involved.

-- 
                                                          - Warp


Post a reply to this message

From: Kenneth
Subject: Re: 3.5.11.7 CELLS
Date: 19 Oct 2005 06:20:00
Message: <web.4355e4aed81db2d2f62422910@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:

>   The cells pattern is a pattern. Patterns do not have colors. It would thus
> be incorrect to say that it gets color values.
>
>   A pattern is just a function which returns values between 0 and 1,
> that's it. It can have several uses besides being used in a pigment.


>                                                           - Warp

oooohhhh, I see. I'm completely off base. Though bear with me:  "Each cube
gets a random value from 0 to 1."  A value for...what?

Ken


Post a reply to this message

From: Warp
Subject: Re: 3.5.11.7 CELLS
Date: 19 Oct 2005 07:04:15
Message: <4355efee@news.povray.org>
Kenneth <kdw### [at] earthlinknet> wrote:
> oooohhhh, I see. I'm completely off base. Though bear with me:  "Each cube
> gets a random value from 0 to 1."  A value for...what?

  For whatever you want to use values between 0 and 1 for.

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: 3.5.11.7 CELLS
Date: 19 Oct 2005 15:55:48
Message: <43566c84$1@news.povray.org>
Kenneth wrote:
> oooohhhh, I see. I'm completely off base. Though bear with me:  "Each cube
> gets a random value from 0 to 1."  A value for...what?

A pattern is a function that maps 3D coordinates to a value in the range 
0..1, right? And scale affects how the x, y, z domain is interpreted, 
with frequency affecting how the output is determined. And then the 
value can be used for a variety of purposes, including indexing into a 
color map.  Is that an accurate summary?

-- 
   Darren New / San Diego, CA, USA (PST)
    Neither rocks nor slush nor salted rims
    shall keep us from our appointed rounds.


Post a reply to this message

From: Kenneth
Subject: Re: 3.5.11.7 CELLS
Date: 21 Oct 2005 02:35:00
Message: <web.43585363d81db2d26a521a540@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Kenneth <kdw### [at] earthlinknet> wrote:
> > oooohhhh, I see. I'm completely off base. Though bear with me:  "Each cube
> > gets a random value from 0 to 1."  A value for...what?
>
>   For whatever you want to use values between 0 and 1 for.
>
> --
>                                                           - Warp

A veil is starting to life from my eyes. Your reply -- and our discussion
over at

<web.43555e39142797ad399425f30@news.povray.org>

got me to thinking about the subject in much broader terms.  I'm finally
starting to *see*  the connection between color_maps, ( & density_maps &
normal_maps and the like), their values, and the math functions like CELLS
that operate on them. It has been a day of discovery!  Can't say much more
yet; I'm still experimenting....which is leading to even more discoveries!

(For those interested, I posted a message at the thread above on a different
topic, but the discussions are starting to converge around a more general
topic that also relates to this one.)

Ken


Post a reply to this message

From: Kenneth
Subject: Re: 3.5.11.7 CELLS
Date: 21 Oct 2005 03:30:01
Message: <web.43585f67d81db2d26a521a540@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> ...And then the value can be used for a variety of purposes,
> including indexing into a
> color map....
>
Aha!  Vindicated at last!  ; - )

Actually, I'm getting a MUCH clearer picture of what's going on, from all
that's been posted here (and from another unrelated question I posted which
has come around to discussing this very topic.)

I see now that my "new definition of CELLS" was much too limited, addressing
one specific example only.

I've also "discovered" that the CELLS pattern can be used to create a very
good "granite" texture...to my eyes, actually more realistic than the
GRANITE pattern itself. Just by scaling it way down in size (with some
appropriate colors in a color_map) and applying some turbulence....which,
because of the abrupt nature of color changes intrinsic to the CELLS
pattern, creates jagged, distorted "squares." Makes a much "grainer"
crystal-flake-like granite, which I like.

Ken


Post a reply to this message

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