POV-Ray : Newsgroups : povray.unofficial.patches : Sampling in pov3.5 Server Time
6 Oct 2024 12:31:58 EDT (-0400)
  Sampling in pov3.5 (Message 31 to 32 of 32)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mael
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 09:08:40
Message: <3e198de8$1@news.povray.org>
I was thinking about computing the discrepancy (for different numbers of
samples), to see what are the best values for count with the current samples
data in pov
I found a description to compute the star discrepancy, but only for uniform
distribution in a unit square
http://mathworld.wolfram.com/StarDiscrepancy.html
http://ina.eivd.ch/Collaborateurs/etr/research.html

As i don't know how to adapt it for a disc, I decided to map the disc to a
square
(x,y) the sample in the disc gives nx=x*x+y*y and ny=atan2(y,x)/(2*pi)+.5 in
the square unit

But when applying this transformation to povray samples I get those bad
looking results (at least for small N)
http://195.221.122.126/samples/rad_square010.jpg
http://195.221.122.126/samples/rad_square020.jpg
http://195.221.122.126/samples/rad_square050.jpg
http://195.221.122.126/samples/rad_square100.jpg

So I wonder if it's a good way to measure the discrepancy
Or is the povray distribution not that good ?

M


Post a reply to this message

From: Anders K 
Subject: Re: Sampling in pov3.5
Date: 6 Jan 2003 13:53:42
Message: <3e19d0b6$1@news.povray.org>
Mael wrote:
> As i don't know how to adapt it for a disc, I decided to map the disc to a
> square

That would distort the disc in all sorts of ways, so the bad results aren't
surprising.

Anders

--
#macro E(D)(#if(D<2)D#else#declare I=I+1;mod(pow(.5mod(I 6))*asc(substr(
"X0(1X([\\&Q@TV'YDGU`3F(-V[6Y4aL4XFUTD#N#F8\\A+F1BFO4`#bJN61EM8PFSbFA?C"
I/6 1))2)<1#end)#end#macro R(D,I,T,X,Y)#if(E(D))R(D-1I,T,Y/2X)R(D-1I,T+Y
/2Y/2X)#else box{T T+X+Y pigment{rgb E(2)*9}}#end#end R(10,5z*3-1v*2u*2)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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