|
|
nomail@nomail wrote:
>>Hmm... that's not gonna work.
>
>
> Not exactly what I wanted to hear. I guess I will have to work out a new
> function to do what I wanted.
>
> Thank you. If anyone has any suggestions to make the original work please
> feel free to post.
I suggest that you read about about user defined functions and
the select() function.
2.2.1.6.3 Declaring User-Defined Float Functions:
http://www.povray.org/documentation/view/3.6.1/231/
2.2.1.3.4 Functions:
http://www.povray.org/documentation/view/3.6.1/228/
Here's a simple example:
#declare MyFn =
function(x, y, z) { // Or just: function {
select(y - 1, 0, SomeExpression, 0) + // Case: y = 1
select(y - 2, 0, OtherExpression, 0) + // Case: y = 2
select(y - 2, 0, 0, YetAnotherExpression) // Case: y > 2
}
You may also have a look at my reply in this thread in p.b.s-f:
From: Yadgar
Subject: Discontinuous functions?
Date: 14 Aug 2004 11:19:55
http://tinyurl.com/6vaar
http://news.povray.org/povray.binaries.scene-files/message/%3C411fd33c%40news.povray.org%3E/#%3C411fd33c%40news.povray.org%3E
--
Tor Olav
http://subcube.net
http://subcube.com
Post a reply to this message
|
|