POV-Ray : Newsgroups : povray.general : Mega-Pov or V3.5? Server Time
12 Sep 2024 15:51:37 EDT (-0400)
  Mega-Pov or V3.5? (Message 91 to 100 of 108)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>
From: Grey Knight
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 09:56:40
Message: <3C5809A2.90034DD5@namtar.qub.ac.uk>
I always meant to ask; I keep hearing that in POV3.5 iso's, "&" means OR
and "|" means AND. How come?

-- 
signature{
  "Grey Knight" contact{ email "gre### [at] yahoocom" }
  site_of_week{ url "http://digilander.iol.it/jrgpov" }
}


Post a reply to this message

From: Warp
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 10:08:41
Message: <3c580c79@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
: Do you really think there is some code in there that says:
: "add 0.00000000298023224 to clock to annoy users"?  ;-)

  I was wondering if floats could *really* be that inaccurate. When I make
this with povray:

#debug concat(str(99/100,0,25), "\n")

what I get is:

0.9899999999999999911182158

(instead of 0.99). I though, "is this really possible?".
  Then I wanted to be sure and I made a small C program which does basically
the same thing:

#include "stdio.h"
int main()
{
    printf("%.25f\n", 99.0/100.0);
    return 0;
}

  This program prints, surprise surprise:

0.9899999999999999911182158

  So now I am convinced that there's no bug in povray.

  Of course, when making a scene file, one has to minimize the effects of
floating point inaccuracy.
  For example, don't do it this way:

#declare Ind = 0;
#declare Clock = 0;
#while(Ind <= 100)
  #debug concat("Clock: ", str(Clock,0,25), "\n")
  #declare Clock = Clock+1/100;
  #declare Ind = Ind+1;
#end

(The last number printed is 1.0000000000000006661338148.)
  Instead, do it this way:

#declare Ind = 0;
#while(Ind <= 100)
  #declare Clock = Ind/100;
  #debug concat("Clock: ", str(Clock,0,25), "\n")
  #declare Ind = Ind+1;
#end

(The last number printed is 1.0000000000000000000000000.)

  The reason for the second code being better than the first is left as
an exercise to the reader.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Warp
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 10:27:00
Message: <3c5810c4@news.povray.org>
Grey Knight <s16### [at] namtarqubacuk> wrote:
: I always meant to ask; I keep hearing that in POV3.5 iso's, "&" means OR
: and "|" means AND. How come?

  I haven't followed this thing quite closely, but AFAIK the meaning of '&'
and '|' was changed to logical operators "logical and" and "logical or"
(instead of being set theory operators "intersection" and "union", as they
are in megapov, I think).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 10:32:57
Message: <3c581229$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3c580c79@news.povray.org...

<snip>

Just out of curiousity, why does this surprise you?

Also just out of curiosity, if you ask a robot do they say "but it does say
0.99"? Hmm...


Post a reply to this message

From: Warp
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 10:58:17
Message: <3c581819@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
: Just out of curiousity, why does this surprise you?

  I knew that doubles are inaccurate, but it surprised me that they are *that*
inaccurate. The inaccuracy is "only" in the 18th decimal.

  On the other hand, 18 decimals starts to sound like the maximum number of
digits (when converted to decimal) that the base of a double can hold...

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Alf Peake
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 11:06:10
Message: <3c5819f2@news.povray.org>
"Ken" <tyl### [at] pacbellnet> wrote in message
news:3C576D9E.D6CEA9B8@pacbell.net...
>
>
> 25ct wrote:
>
> > In actual fact, It was a very confusing time for me as Megapov and
3.1 were
> > being talked about quite a lot in the forums, and as a result, I
now have
> > 3.1g, Megapov 0.7 and 3.5 beta10 installed.
>
> Is that all? I've got 1.0, 2.2, 3.01, 3.1, 3.5 and a half dozen or
more
> patched versions installed. :)
>

Why do I never see anyone mention 2.1? That's what I've still got
loaded, not 2.2 but all after and megapov 0.7, all DOS. Now I'm in
serious trouble <grin> coz I needed to get Winpov 3.1 for 1st time to
try Schmitt's recompile (Hey! I can use my box while Pov is working.
Thats a novelty!). So thought might as well get WinMega while I'm at
it. If I'm not careful, 3.5b will worm its way in soon.

Alf


Post a reply to this message

From: Mike Williams
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 13:51:38
Message: <bTAhLBAfn4V8EwCP@econym.demon.co.uk>
Wasn't it Zeger Knaepen who wrote:
>>   On the other hand there are things that can be done with 3.5 that can't
>> be done with megapov.
>like?

One neat little feature is spline functions. It's now possible to use a
spline to define a function, and then use that function, say, to specify
an isosurface without any of the mathematics that would otherwise be
involved.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Mike Williams
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 13:52:09
Message: <PjKknHA0y4V8EwjG@econym.demon.co.uk>
Wasn't it Zeger Knaepen who wrote:
>> : And again: I never used the include files bundled with POV-Ray.
>>   Because there wasn't anything interesting in them, until now.
>no, because I like to make everything myself.  Even when I add a lensflare, it's 
>with a
>customized version of Colefax' include file and using a custom lens effect.

Note, however, that there's been a slight tendency to move some of the
stuff out of the core code and into standard include files. A few things
that are features of the MegaPOV language are implemented in the 3.5
include files.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Jan Walzer
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 16:43:10
Message: <3c5868ee$1@news.povray.org>
"Zeger Knaepen" <zeg### [at] studentkuleuvenacbe> wrote:
> > But is that what you would do if it had been years since an official
version
> > was released, the users were getting restless, and 4.0 was probably still
> > years away?
> Do users really need an official version every few years?  I'm happy with
unofficial
> patches, as long as they work the way I expect :)
>

AFAIK: Yes! Just consider the use of POV as a benchmark...
Although this is probably not, what POV was invented for, and where it's
real powers are, it's still used as an official benchmark...

You can't think, that people are using "unofficial patches" for doing serious
benchmarks ...


--
#macro J(N A)#local a=mod(N 3);#local W=<int(mod(A,4)*2)int(-A/4)9>*2;#if
(!mod(a 2))sphere{W,2,2pigment{color rgb<a*5A/2W.x/A*5>}}#if(a<1)sphere{W
+<2,0>2 2pigment{color rgb<a*10A 10>}}#end#end#if(N>3)J(int(N/3)A+1)#end#
end blob{J(29229171 0)threshold 1translate<-6 3>}/******Jan Walzer******/


Post a reply to this message

From: Jan Walzer
Subject: Re: Mega-Pov or V3.5?
Date: 30 Jan 2002 17:01:36
Message: <3c586d40@news.povray.org>
probably it would have been enough, to look at IEEE 754 ?

--
#macro J(N A)#local a=mod(N 3);#local W=<int(mod(A,4)*2)int(-A/4)9>*2;#if
(!mod(a 2))sphere{W,2,2pigment{color rgb<a*5A/2W.x/A*5>}}#if(a<1)sphere{W
+<2,0>2 2pigment{color rgb<a*10A 10>}}#end#end#if(N>3)J(int(N/3)A+1)#end#
end blob{J(29229171 0)threshold 1translate<-6 3>}/******Jan Walzer******/


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>

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