POV-Ray : Newsgroups : povray.unofficial.patches : slope-dependent pattern : Re: slope-dependent pattern Server Time
1 Sep 2024 18:13:50 EDT (-0400)
  Re: slope-dependent pattern  
From: Chris Huff
Date: 5 Jan 2001 19:25:42
Message: <chrishuff-4D1D42.19271605012001@news.povray.org>
In article <3A565458.62638751@gmx.de>, Christoph Hormann 
<chr### [at] gmxde> wrote:

> I think that would suffice, since a warp does not only specify the amount
> but also the direction, this could be even more universal.

Well, the warping vector can't be used directly, since patterns are 
float values only...I was thinking of using the length of the warp 
vector.


> Not sure whow you mean that, the purpose i was thinking of was for example
> controlling the fine structure of an isosurface landscape depending on the
> slope of it's large scale shape.

Ah, I see...well, declare the large scale function, and use something 
like:
#declare P = 0.01;// sampling distance
#declare Fn = function {...}

#declare MaxSlopeFn =
function {
    max(max(
        (abs(Fn(x+P, y, z)-Fn(x-P, y, z))),
         abs(Fn(x, y+P, z)-Fn(x, y-P, z)))),
         abs(Fn(x, y, z+P)-Fn(x, y, z-P)))
    )/(2*P)
}

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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