POV-Ray : Newsgroups : povray.advanced-users : function select logic : Re: function select logic Server Time
25 Apr 2024 19:36:00 EDT (-0400)
  Re: function select logic  
From: Bald Eagle
Date: 23 Nov 2016 11:00:01
Message: <web.5835bcf1a279be30c437ac910@news.povray.org>
scott <sco### [at] scottcom> wrote:

> I think you misunderstand my point. Any #if, #declare etc will only get
> evaluated once when the scene is parsed. You'll end up with either your
> function declared or not declared. When you come to use that function in
> a pigment or isosurface or whatever your #if #declare statements won't
> be executed again. Any logic needs to go inside the function declaration
> using the select function, not #if.

True.
Though I was looking at "equations" not any declared functions.

> Using the transmit channel is a good idea though. You could define
> another function for calculating the transmit value, that just returns 1
> if any of RGB parameters are out of range, or zero otherwise. This needs
> to be a select statement inside a function though, not using #if.

I think that Mike is going to have a devil of a time trying to get that to go
with an isosurface.  That needs to be an implicit surface, no?

I'm leaning towards a parametric using splines defined by points resulting from
his stack-of-blocks code.

Maybe someone more clever, and with more round-tuits has a more elegant
solution....


Post a reply to this message

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