|
 |
"Kenneth" <kdw### [at] gmail com> wrote:
>
> For multiplication of functions, I readily agree. It's the addition of functions
> that has me puzzled...
>
> I guess I should set up a much-simplified test with maybe two functions, and
> switch them around to see...
Well, I did the test. With *three* simple functions! To make a long story short:
The order of the functions does not matter. Perhaps I should have expected that,
although it wasn't obvious to my way of thinking :-(
So the bigger question of how to easily switch them around is... of no
importance, ha. Sorry for the wasted brain power, lads. I'm actually not
disappointed-- it at least makes my code simpler!
Thanks for the comments and suggestions though; they always get me to think more
deeply.
In case you want to try the quick test (no need for 'high-quality' settings
here):
-----------
#declare BUMPS_F =
function{pattern{bumps scale .2}}
#declare GRANITE_F =
function{pattern{granite scale 3}}
#declare SIN_F = function(x){sin(7*pi*x)}
isosurface{
function { sqrt(pow(x,2)+pow(y,2)+pow(z,2))-.7 // sphere
// switch these around...
+ BUMPS_F(x,y,z)*.5
- GRANITE_F(x,y,z)*.5
- SIN_F(x)*.2
}
threshold 0
accuracy .01
max_gradient 8
contained_by{box{-1.1,1.1}}
pigment{ rgb 1}
}
Post a reply to this message
|
 |