POV-Ray : Newsgroups : povray.general : Function of a function, or function as a function parameter : Function of a function, or function as a function parameter Server Time
12 May 2024 06:34:42 EDT (-0400)
  Function of a function, or function as a function parameter  
From: Bald Eagle
Date: 11 Jan 2024 11:40:00
Message: <web.65a018e58349df571f9dae3025979125@news.povray.org>
So, I'm working on some other patterns, and I have some general functions that I
want to use.

The problem is that those functions are things like derivatives, which are
functions OF other functions.

Is there a way that I can cleanly and elegantly implement a function declaration
that will allow me to do this?

Otherwise it seems that I'm going to have to either
a) write a macro to #undef the f'(x) function and redefine it for every function
that I want to operate on

and/or

b) wind up defining individual functions for every function I want to take the
function OF - which leads to the morass of multiple functions that I need to
keep track of - so I can remember which one I need, avoid copy-paste errors, and
avoid name collisions - I _disdain_.

Because if I need multiple derivatives at render time, then the macro
work-around is out.

- BE


Post a reply to this message

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