POV-Ray : Newsgroups : povray.unofficial.patches : Float factor expected but log found instead Server Time
1 Nov 2024 21:20:55 EDT (-0400)
  Float factor expected but log found instead (Message 1 to 10 of 10)  
From: David Fontaine
Subject: Float factor expected but log found instead
Date: 21 May 2000 23:50:27
Message: <3928ADAE.15F2E71E@faricy.net>
#declare KuenSurface = parametric {
   function (2*sqrt(1+u^2)*cos(u-atan2(u,1))*sin(v))/(1+u^2*sin(v)^2),
            (2*sqrt(1+u^2)*sin(u-atan2(u,1))*sin(v))/(1+u^2*sin(v)^2),
            log(tan(.5*v))+(2*cos(v))/(1+u^2+sin(v)^2)
   <0,0>,<2*pi,pi>
   <-5,-5,-5>,<5,5,5>
}

any help appreciated :-)

--
David Fontaine     <dav### [at] faricynet>     ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/


Post a reply to this message

From: david sharp
Subject: Re: Float factor expected but log found instead
Date: 21 May 2000 23:55:58
Message: <3928afce@news.povray.org>
David Fontaine <dav### [at] faricynet> wrote in message
news:3928ADAE.15F2E71E@faricy.net...
> #declare KuenSurface = parametric {
>    function (2*sqrt(1+u^2)*cos(u-atan2(u,1))*sin(v))/(1+u^2*sin(v)^2),
>             (2*sqrt(1+u^2)*sin(u-atan2(u,1))*sin(v))/(1+u^2*sin(v)^2),
>             log(tan(.5*v))+(2*cos(v))/(1+u^2+sin(v)^2)
>    <0,0>,<2*pi,pi>
>    <-5,-5,-5>,<5,5,5>
> }
>

In function{}'s it is  'ln' instead of 'log'


Post a reply to this message

From: David Fontaine
Subject: Re: Float factor expected but log found instead
Date: 22 May 2000 00:18:13
Message: <3928B42F.24643C9F@faricy.net>
david sharp wrote:

> In function{}'s it is  'ln' instead of 'log'

Ah, muchas gracias.

--
David Fontaine     <dav### [at] faricynet>     ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/


Post a reply to this message

From: Matthew Bennett
Subject: Re: Float factor expected but log found instead
Date: 23 May 2000 08:07:39
Message: <392a748b@news.povray.org>
"david sharp" <dsh### [at] interportnet> wrote in message
news:3928afce@news.povray.org...
>
> David Fontaine <dav### [at] faricynet> wrote in message
> news:3928ADAE.15F2E71E@faricy.net...
> > #declare KuenSurface = parametric {
> >    function (2*sqrt(1+u^2)*cos(u-atan2(u,1))*sin(v))/(1+u^2*sin(v)^2),
> >             (2*sqrt(1+u^2)*sin(u-atan2(u,1))*sin(v))/(1+u^2*sin(v)^2),
> >             log(tan(.5*v))+(2*cos(v))/(1+u^2+sin(v)^2)
> >    <0,0>,<2*pi,pi>
> >    <-5,-5,-5>,<5,5,5>
> > }
> >
>
> In function{}'s it is  'ln' instead of 'log'

Isn't that to base e rather than base 10 though?


Post a reply to this message

From: david sharp
Subject: Re: Float factor expected but log found instead
Date: 23 May 2000 09:01:51
Message: <392a813f@news.povray.org>
Matthew Bennett <ben### [at] btinternetcom>
> "david sharp" <dsh### [at] interportnet> wrote
>
> > In function{}'s it is  'ln' instead of 'log'
>
> Isn't that to base e rather than base 10 though?
>

In the isosurface patch  ln is actually  log base 10.
or, actually, ln(x) = log_10(abs(x)) . I kind of remember
learning that the 'n' in 'ln' was because ln was supposed
to be 'natural' logarithm. Perhaps the 'n' in the isosurface
patch ln is for 'nice'.


Post a reply to this message

From: Ron Parker
Subject: Re: Float factor expected but log found instead
Date: 23 May 2000 23:13:43
Message: <slrn8imitk.3ce.ron.parker@linux.parkerr.fwi.com>
On Tue, 23 May 2000 09:02:36 -0400, david sharp wrote:
>
>Matthew Bennett <ben### [at] btinternetcom>
>> "david sharp" <dsh### [at] interportnet> wrote
>>
>> > In function{}'s it is  'ln' instead of 'log'
>>
>> Isn't that to base e rather than base 10 though?
>>
>
>In the isosurface patch  ln is actually  log base 10.
>or, actually, ln(x) = log_10(abs(x)) . 

I don't see that in the superpatch 3.1g code (I don't have MegaPOV code
handy on this machine.)  Specifically, it says 

LOG( ABS( *calc_stack_top ))

where LOG is defined in isofunc.h as 'log'.  A quick 'man log' shows
that 'log' is the C function for natural logarithm, and 'log10' is the
base-10 logarithm.

If that's different in MegaPOV, it should probably be put back.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
These are my opinions.  I do NOT speak for the POV-Team.


Post a reply to this message

From: david sharp
Subject: Re: Float factor expected but log found instead
Date: 23 May 2000 23:32:24
Message: <392b4d48@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote
>
> LOG( ABS( *calc_stack_top ))
>
> where LOG is defined in isofunc.h as 'log'.  A quick 'man log' shows
> that 'log' is the C function for natural logarithm, and 'log10' is the
> base-10 logarithm.
>

Oh, that's right.


Post a reply to this message

From: Warp
Subject: Re: Float factor expected but log found instead
Date: 24 May 2000 03:59:47
Message: <392b8bf2@news.povray.org>
david sharp <dsh### [at] interportnet> wrote:
: In the isosurface patch  ln is actually  log base 10.

  In my opinion, if this is so, it's very wrong. 'ln' has always been
logarithm base e.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Float factor expected but log found instead
Date: 24 May 2000 07:47:33
Message: <392bc155@news.povray.org>
In article <392b8bf2@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   In my opinion, if this is so, it's very wrong. 'ln' has always been
> logarithm base e.

As you know, the isosurface patch has plenty of differences from the
official POV-Ray functions.  Hopefully all these annoying differences will
be corrected in POV-Ray 3.5.


     Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: david sharp
Subject: Re: Float factor expected but log found instead
Date: 24 May 2000 08:48:34
Message: <392bcfa2@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote
> In article <392b8bf2@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:
>
> >   In my opinion, if this is so, it's very wrong. 'ln' has always been
> > logarithm base e.
>

I was mistaken. I have been believing that the standard C language log was
log_10 when it's actually log_e. I have also known that it was log_e, since
I have had to use it correctly many times, but I have to relearn this fact
every
time


Post a reply to this message

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