![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] yahoo com" }
site_of_week{ url "http://digilander.iol.it/jrgpov" }
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thorsten Froehlich <tho### [at] trf de> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Grey Knight <s16### [at] namtar qub ac uk> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Tom Melly <tom### [at] tomandlu co uk> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Ken" <tyl### [at] pacbell net> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Zeger Knaepen" <zeg### [at] student kuleuven ac be> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |