POV-Ray : Newsgroups : povray.newusers : Bumps, squared. : Re: Bumps, squared. Server Time
28 Jul 2024 18:14:41 EDT (-0400)
  Re: Bumps, squared.  
From: Karl Anders
Date: 9 Dec 2007 02:35:01
Message: <web.475b9966fb428a64a3740fdb0@news.povray.org>
"Greg M. Johnson" <pte### [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 2003-2023 Persistence of Vision Raytracer Pty. Ltd.