POV-Ray : Newsgroups : povray.tools.general : gadients.inc a bunch of functions : Re: gadients.inc a bunch of functions Server Time
5 Dec 2021 21:03:39 EST (-0500)
  Re: gadients.inc a bunch of functions  
From: ingo
Date: 10 Jan 2019 12:40:26
Message: <XnsA9D3BDF773E82seed7@news.povray.org>
in news:5c376cc9$1@news.povray.org William F Pokorny wrote:

> It's perhaps worth posting again with the correct spelling of the 
> include file

I'll do so later Bill, I also noticed there are some comments missing 
here and there. 
An example use case,

#version 3.8;
global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 1 diffuse 0 emission 0}} 
#include "gradients.inc"
#include "functions.inc"

camera {
  orthographic location <0,0,-1> look_at  <0,0,0>
  right x*image_width/image_height
}

//==
// Remember the Agfacontour film for equidensitometry? Old Skool.
// Three narrow bands of a pattern
// Pf: a pattern or noise function
// pigment{function{Equidens(x,y,z,f_noise_generator(x,y,z,3))}}
// pigment{function{Equidens(x,y,z,f_wood(x,y,z))}}
#declare Equidens  = function(x,y,z,Pf){
                       G_cubic_pulse(Pf,.2,.05)+
                       G_cubic_pulse(Pf,.5,.05)+
                       G_cubic_pulse(Pf,.8,.05)
                     }

box {
  <-.5,-.5,0>, <.5,.5,0>
  texture {
    pigment {
      function{
        Equidens(x,y,z,f_wood(x,y,z))
      }
      color_map {
        [0.0 color rgb 0.0 ]
        [1.0 color rgb 1.0 ]
      }
      scale .05
    }
  }
}


ingo


Post a reply to this message

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