POV-Ray : Newsgroups : povray.newusers : pow() Server Time
27 Dec 2024 00:38:44 EST (-0500)
  pow() (Message 1 to 5 of 5)  
From: marabou
Subject: pow()
Date: 29 Oct 2006 09:17:38
Message: <4544b802@news.povray.org>
hello,

in pov3.6 I want something similar like that:
pow ( pow(a,2) - pow(b,2) + pow(c,2), 2)
but parser says he wants an operator and no bracket.
how can I realise this?

thank you in advance.


Post a reply to this message

From: Warp
Subject: Re: pow()
Date: 29 Oct 2006 09:27:12
Message: <4544ba40@news.povray.org>
marabou <not### [at] availableyet> wrote:
> pow ( pow(a,2) - pow(b,2) + pow(c,2), 2)

  I don't get any error when I try that.

-- 
                                                          - Warp


Post a reply to this message

From: marabou
Subject: Re: pow()
Date: 29 Oct 2006 09:32:21
Message: <4544bb75@news.povray.org>
Warp wrote on $DATE:

> marabou <not### [at] availableyet> wrote:
>> pow ( pow(a,2) - pow(b,2) + pow(c,2), 2)
> 
>   I don't get any error when I try that.
> 
and if you try that?

isosurface {
   function {
      pow( pow(x,2)+pow(y,2)+pow(z,2),2) + 
(1-z-x*sqrt(2))*(1-z+x*sqrt(2))*(1+z-x*sqrt(2))*(1+z+x*sqrt(2))
   }
   max_gradient 10
   contained_by{box {-1,1}}
}


Post a reply to this message

From: Warp
Subject: Re: pow()
Date: 29 Oct 2006 09:37:02
Message: <4544bc8e@news.povray.org>
marabou <not### [at] availableyet> wrote:
> and if you try that?

> isosurface {
>    function {
>       pow( pow(x,2)+pow(y,2)+pow(z,2),2) + 
> (1-z-x*sqrt(2))*(1-z+x*sqrt(2))*(1+z-x*sqrt(2))*(1+z+x*sqrt(2))
>    }
>    max_gradient 10
>    contained_by{box {-1,1}}
> }

  Nope. No errors.

-- 
                                                          - Warp


Post a reply to this message

From: marabou
Subject: Re: pow()
Date: 29 Oct 2006 09:52:57
Message: <4544c049@news.povray.org>
Warp wrote:


> 
>   Nope. No errors.
> 
I have found the error (not shown in post before):
5(1-z-x*sqrt(2))
which should be:
5 * (1-z-x*sqrt(2))

My suggestion for upcoming versions of Povray: Interpret numbers before
brackets and constants as factors of following term (to not showing my own
stupidy). hmpff...


Post a reply to this message

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