POV-Ray : Newsgroups : povray.unofficial.patches : Bug in cpow? : Re: Bug in cpow? Server Time
2 Sep 2024 04:18:35 EDT (-0400)
  Re: Bug in cpow?  
From: david sharp
Date: 17 May 2000 12:37:04
Message: <3922cab0$1@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote in message news:3922afc2@news.povray.org...
> david sharp <dsh### [at] interportnet> wrote:
> : The cpow function needs both arguments to be 'complex';
> : To do Z^2 with cpow, you need to do cpow(Z,<2,0>)
>
>   Ah, ok.
>   I said this by mail already, but let me say it again here:
>   It would be more intuitive if cpow() would accept either a float or
> a complex.

That would be helpful, but implementation is complicated
by the way POV-Ray promotes a float (say 2.0) to a VECTOR
(becomes <2.0,2.0,2.0> ) when it is expecting a vector. So
cpow(Z,2) becomes cpow(Z,<2,2>) rather than the desired
cpow(Z,<2,0>). The simplest way to implement float exponents
would be to have a new function (eg crpow(Z,X) )


Post a reply to this message

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