|
 |
hi,
> I'm not really sure whether I'm on-topic here or not... but as this
> group also deals with programming techniques, I just assumed...
I think p.general would be better
> My question: does PoV-Ray allow programming of "discontinuous" functions
> (I only dabble in math, so please don't stone me if this is not the
> correct terminus!)?
>
> Is it possible to write a function which changes apruptly at certain
> values, such as
>
> from x=0 to x=1.5: pow(x, 2)
> from x=1.5 to x=7: sqrt(14-x)+3
> etc. etc. ?
Where would you like to use it? If you want to use it to describe the
postion of an object (in an animation), you can try the following:
#declare f1=function(x){pow(x,2)};
#declare f2=function(x){sqrt(14-x)+3};
#if(x>0 && x<1.5)//correct way to describe interval??
//use f1 to get position
#end
#if(other interval)
//use f2 f1 to get position
#end
I assume it would have the same effect as an discontious function.
Hoping to be of help,
JWV
"Yadgar" <yaz### [at] gmx de> wrote in message
news:411df55b$1@news.povray.org...
> High!
>
> I'm not really sure whether I'm on-topic here or not... but as this
> group also deals with programming techniques, I just assumed...
>
> My question: does PoV-Ray allow programming of "discontinuous" functions
> (I only dabble in math, so please don't stone me if this is not the
> correct terminus!)?
>
> Is it possible to write a function which changes apruptly at certain
> values, such as
>
> from x=0 to x=1.5: pow(x, 2)
> from x=1.5 to x=7: sqrt(14-x)+3
> etc. etc. ?
>
> See you in Khyberspace -
> http://home.arcor.de/yadgar/khyberspace/index-e.html
> Afghanistan Chronicle: http://home.arcor.de/yadgar/
>
> Yadgar
>
> Now playing: Deimos and Phobos go to Mars (Synergy)
Post a reply to this message
|
 |