POV-Ray : Newsgroups : povray.advanced-users : Pattern-Arithmetics : Re: Pattern-Arithmetics Server Time
29 Jul 2024 22:30:02 EDT (-0400)
  Re: Pattern-Arithmetics  
From: Chris Huff
Date: 8 Nov 2000 16:04:07
Message: <chrishuff-6627A5.16041008112000@news.povray.org>
In article <3A096641.FB1CA85B@schwen.de>, Daniel Schwen 
<dan### [at] schwende> wrote:

> Using an Isosurface function as the pattern would be perfect. Does that
> work, and if so how?

Just put the function in as a pattern, no syntax changes are needed.

#declare Onion = function {cos(sqrt(sqr(x) + sqr(y) + sqr(z)))}
// this is an onion-like pattern, a sine wave emanating from < 0, 0, 0>. 
// You could also use a pigment function, but that might render a little
// slower.

Then, in your pigment you want to use the pattern on:
pigment {
    function {
        sqr(
            Onion(x, y, z)
            + Onion(x-5, y+2, z-3)
            + Onion(x+2, y-4, z+1)
        )
    }
    color_map {...}
}

-- 
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.