POV-Ray : Newsgroups : povray.general : #switch #case in function? : Re: Using splines to map arbitrary value (was Re: #switch #case infunction?= Server Time
27 Jul 2024 12:08:42 EDT (-0400)
  Re: Using splines to map arbitrary value (was Re: #switch #case infunction?=  
From: Bald Eagle
Date: 18 Jun 2024 10:05:00
Message: <web.667193726b7c39638519c45d25979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> On your original question about #switch inside a function{} block, I saw
> your switch by multiplication as good as anything else for clarity.

WFP,

I was trying to think of some additional way to lay things like this out for
clarity, and I wondered if you might think about a way to evaluate functions in
a structure like a color_map.

Or perhaps more like a prism or a spline.

Then it would be easy to see what ranges any given function would be evaluated
in.

function_map {
     [0.0 FunctionA (x, y, z)]
     [0.3 FUnctionA (x, y, z)]
     [0.3 FunctionB (N)]
     [0.7 FunctionC (j, k)]
     [0.7 FunctionD (clock)]
     [1.0 FunctionD (clock)]
}

What are your thoughts on this type of data structure and how much work would
require its implementation?

- BW


Post a reply to this message

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