POV-Ray : Newsgroups : povray.tools.general : gadients.inc a bunch of functions Server Time
9 Dec 2024 13:52:23 EST (-0500)
  gadients.inc a bunch of functions (Message 1 to 8 of 8)  
From: ingo
Subject: gadients.inc a bunch of functions
Date: 9 Jan 2019 17:31:11
Message: <XnsA9D2EF41831AEseed7@news.povray.org>
30+ functions for animations, building isosurfaces and textures. All 
visualised as curves and gradients.


Post a reply to this message


Attachments:
Download 'gradients.inc.txt' (18 KB)

From: William F Pokorny
Subject: Re: gadients.inc a bunch of functions
Date: 10 Jan 2019 11:03:21
Message: <5c376cc9$1@news.povray.org>
On 1/9/19 5:31 PM, ingo wrote:
> 30+ functions for animations, building isosurfaces and textures. All
> visualised as curves and gradients.
> 
Thank you.

It's perhaps worth posting again with the correct spelling of the 
include file in the subject line as some - like me - search for posts by 
subject.

Seeing your collection has me thinking again about extending the built 
in function set with "helper" functions such as these where performance 
warrants.

Bill P.


Post a reply to this message

From: ingo
Subject: Re: gadients.inc a bunch of functions
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

From: jr
Subject: Re: gadients.inc a bunch of functions
Date: 10 Jan 2019 14:05:00
Message: <web.5c3796f4cbe7b4b248892b50@news.povray.org>
hi,

ingo <ing### [at] tagpovrayorg> wrote:
> An example use case,

improves on the test scene.  :-)

you say "30+ functions", but what good can they be to people who, like me, do
not have the maths, without some documentation (and perhaps usage examples)?


regards, jr.


Post a reply to this message

From: Leroy
Subject: Re: gadients.inc a bunch of functions
Date: 10 Jan 2019 16:05:00
Message: <web.5c37b354cbe7b4b2c38922450@news.povray.org>
ingo <ing### [at] tagpovrayorg> wrote:
> 30+ functions for animations, building isosurfaces and textures. All
> visualised as curves and gradients.

Thanks! I just took a quick look.. I think I most of these here, a round some
where. But it's nice to have them all in one place!


Post a reply to this message

From: ingo
Subject: Re: gadients.inc a bunch of functions
Date: 10 Jan 2019 18:26:12
Message: <XnsA9D447244993seed7@news.povray.org>
in news:web.5c3796f4cbe7b4b248892b50@news.povray.org jr wrote:

> improves on the test scene.

:) I'll come up with some examples how to use these. A big chunk of them 
only provide 'refinement' of what already can be done with texturing. 
Different interpolation between gay values etc.

In general, I think tutorials on fragment shaders for webglw (GLSL (OpenGL 
Shading Language)) etc. will give clues how to use such funtions.

It would be nice if the functions VM language would evolve a bit in that 
direction, without throwing away the goodies we have. If only it was for 
readability of the code,

ingo


Post a reply to this message

From: ingo
Subject: Re: gadients.inc a bunch of functions
Date: 10 Jan 2019 18:27:35
Message: <XnsA9D44AE5B2F6seed7@news.povray.org>
in news:web.5c37b354cbe7b4b2c38922450@news.povray.org Leroy wrote:

> I think I most of these here, a round some
> where.

Exactly why I started collecting them in one file. There may be more, my 
archives are a mess :(

ingo


Post a reply to this message

From: ingo
Subject: Re: gadients.inc a bunch of functions
Date: 14 Jan 2019 13:07:02
Message: <XnsA9D7C27873DB0seed7@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 in the subject line

Reposted it in the proper group and with the right spelling
Message-ID: <XnsA9D7C1F3776F3seed7@news.povray.org>

http://news.povray.org/povray.binaries.scene-files/thread/%
3CXnsA9D7C1F3776F3seed7%40news.povray.org%3E/

ingo


Post a reply to this message

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