POV-Ray : Newsgroups : povray.newusers : Bumps, squared. : Re: Bumps, squared. Server Time: 6 Jul 2008 10:04:51 GMT
  Re: Bumps, squared.  
From: Karl Anders
Date: 9 Dec 2007 07:35:01
"Greg M. Johnson" <pterandon [at] thecommononethatstartswithYcom> wrote:
> I was trying to do some isosurface-like things with some functions.  I
> wanted a pigment pattern which was based on the values generated by bumps
> (or wrinkles, etc)  squared.
>
> I found that I could not get any syntax that would work for declaring a
> function from a pattern and then doing arithmetic operations on it, and
> then using THAT as a pigment pattern.
>
> Help is appreciated, thanks.

Hi Greg,

how about

#declare BumpFunc = function{ pattern{ bumps } };
#declare BumpSquared = function{ pow( BumpFunc( x, y, z ), 2 ) };

I didn't actually USE this for anything, but it seems syntactically correct
because POV-Ray doesn't choke on it - except for complaining about no objects
in scene ...

Greetings
Karl


Post a reply to this message

Copyright 1991-2004 POV-Team™