POV-Ray : Newsgroups : povray.binaries.images : The Pi Pool Balls Server Time
8 Aug 2024 04:07:16 EDT (-0400)
  The Pi Pool Balls (Message 13 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Frango com Nata
Subject: Re: The Pi Pool Balls
Date: 23 Nov 2005 10:15:01
Message: <web.4384873a663c0519663e2c5e0@news.povray.org>
I'd like just to know the method...

This reminds me a long-silenced doubt on why quaternion Julia fractals are
restricted to square and cube functions, being it that exponentials and
trigonometrics, as well as their inverses, can actually be generalized to
quaternions, and I wonder where the advantage of our so-called hypercomplex
numbers is. I can't expect to be the first one to point this out, but have
never read a message explaining what happens to POV-Ray's fractals
regarding this issue. Well, perhaps I should make my question in
povray.newusers...


Post a reply to this message

From: the ajj
Subject: Re: The Pi Pool Balls
Date: 24 Nov 2005 08:35:00
Message: <web.4385c094663c0519a43155f60@news.povray.org>
> Right. That is great. Where is the 1600x1200 Version to use it as a
> desktop background?
>

I will render it at a higher resolution this weekend and will post on my web
site.  Let you know when it's there!

Adrian


Post a reply to this message

From: the ajj
Subject: Re: The Pi Pool Balls
Date: 24 Nov 2005 08:35:00
Message: <web.4385c133663c0519a43155f60@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> If you like, I can translate a short Pi generator into POV SDL that will
> give about 700 digits before it gets overflow errors. On a related note, I
> posted a POV scene file a few months back that can calculate e to millions
> of digits. I'll repost it if you like.
>
> PS. Nice concept. Years ago, I wrote a PostScript program to print pi in an
> exponential spiral, and I've recently been thinking of converting it
> (somehow) into POV SDL.

Pi generator would be cool! Could generate some very nice abstract images
then!  Be great if you could post it.

Yeah i was think of a spiral too.  My other concept was placing the balls on
a sine curve in the xz plane and use less focal blur.....lot of image maps
using this message.  Would look nice though ! :-)


Post a reply to this message

From: PM 2Ring
Subject: Re: The Pi Pool Balls
Date: 25 Nov 2005 05:20:01
Message: <web.4386e4ae663c05192eef1b3b0@news.povray.org>
"the_ajj" <nomail@nomail> wrote:
> "PM 2Ring" <nomail@nomail> wrote:
> > If you like, I can translate a short Pi generator into POV SDL that will
> > give about 700 digits before it gets overflow errors. On a related note, I
> > posted a POV scene file a few months back that can calculate e to millions
> > of digits. I'll repost it if you like.
> >
> > PS. Nice concept. Years ago, I wrote a PostScript program to print pi in an
> > exponential spiral, and I've recently been thinking of converting it
> > (somehow) into POV SDL.
>
> Pi generator would be cool! Could generate some very nice abstract images
> then!  Be great if you could post it.
>
> Yeah i was think of a spiral too.  My other concept was placing the balls on
> a sine curve in the xz plane and use less focal blur.....lot of image maps
> using this message.  Would look nice though ! :-)

Here's a Pi spiral. I think I may have a PostScript spiral program that
works better with proportional fonts, but I'd have to hunt for it...


Post a reply to this message


Attachments:
Download 'pispiral0k.png' (54 KB)

Preview of image 'pispiral0k.png'
pispiral0k.png


 

From: PM 2Ring
Subject: Re: The Pi Pool Balls
Date: 25 Nov 2005 07:15:00
Message: <web.4386ff4d663c05192eef1b3b0@news.povray.org>
"the_ajj" <nomail@nomail> wrote:
> "PM 2Ring" <nomail@nomail> wrote:
> > If you like, I can translate a short Pi generator into POV SDL that will
> > give about 700 digits before it gets overflow errors. On a related note, I
> > posted a POV scene file a few months back that can calculate e to millions
> > of digits. I'll repost it if you like.

> Pi generator would be cool! Could generate some very nice abstract images
> then!  Be great if you could post it.

(I thought I replied to this bit already, but I can't see my reply anywhere.
Oh well...)

I'll work on converting Dik T. Winter's Pi program into POV SDL this
weekend. It shouldn't take too long - I'll just modify my e calculator.
Here's Dik's C source for this algorithm, which can actually do a little
over 800 digits.

int a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;
     for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,
     f[b]=d%--g,d/=g--,--b;d*=b);}

Do a Google Groups search on

 Dik T. Winter Pi digits

for more info.


Post a reply to this message

From: PM 2Ring
Subject: Re: The Pi Pool Balls
Date: 28 Nov 2005 00:45:00
Message: <web.438a98df663c0519ad93754b0@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:

> I'll work on converting Dik T. Winter's Pi program into POV SDL this
> weekend. It shouldn't take too long - I'll just modify my e calculator.
> Here's Dik's C source for this algorithm, which can actually do a little
> over 800 digits.
>
> int a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;
>      for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,
>      f[b]=d%--g,d/=g--,--b;d*=b);}

> Do a Google Groups search on
>
>  Dik T. Winter Pi digits
>
> for more info.

Ok, I've now got a working POV version of the above obfuscated C program.
I'll post it tonight. Sorry about the delay, I got distracted... :)


Post a reply to this message

From: PM 2Ring
Subject: Re: The Pi Pool Balls
Date: 28 Nov 2005 03:05:01
Message: <web.438ab998663c0519f3708fad0@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> "PM 2Ring" <nomail@nomail> wrote:
>
> > I'll work on converting Dik T. Winter's Pi program into POV SDL this
> > weekend. It shouldn't take too long - I'll just modify my e calculator.
> > Here's Dik's C source for this algorithm, which can actually do a little
> > over 800 digits.
> >
> > int a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;
> >      for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,
> >      f[b]=d%--g,d/=g--,--b;d*=b);}
>

Here it is: Pi in the sky. :)

// Persistence of Vision Ray Tracer Scene Description File
// File: ECalc.pov
// Vers: 3.6
// Desc: High precision calculation of pi
//       using Dik T. Winter's method.
// Date: 2004.09.05
// Auth: PM 2Ring
//
//
// -F -A0.5 +AM2 +R1
// -D +A0.1 +AM2 +R3
//

#declare Use_Light = 1;         //0=self-luminous. 1=use light source
#declare Use_Sky = 1;           //0=grey background. 1=Sky sphere with
clouds

global_settings {
  assumed_gamma 1
  max_trace_level 10
}

//-------------------------------------------------------------
#include "colors.inc"
#include "skies.inc"

camera{
  //orthographic
  location -z * 70
  look_at 0
  right x*image_width/image_height up y
  direction z
  angle 30
}

#if(Use_Sky)
  sky_sphere {S_Cloud2 rotate <65, -175, -3> scale .25}
#else
  //background{rgb .5}
#end

//0: self luminous
#if(Use_Light)
  light_source {<0.0, 150.0, -250.0> rgb 1}

  #default {
    finish{
      specular 0.75 roughness 0.045
      phong .5 phong_size 200
      metallic
      reflection{
        0.6
        metallic
      }
      ambient 0.05 diffuse 0.7
    }
    pigment{ rgb<1.0, 0.75, 0.175> }
  }
#else
  #default {
    finish{ ambient 1 diffuse 0 }
    pigment{ rgb<1.0, 0.8, 0.2> }
  }
#end

//-------------------------------------------------------------

//Progressively print passed strings, with line wrap. Can't break up long
strings.
#declare Txm=18;                //Right margin
#declare Lx=-Txm;               //Left margin
#declare Tx=Lx;                 //Cursor position
#declare Ty=11.5;               //Top margin
#declare Dy=1.1;                //Line height

//Newline
#macro NL()
  #declare Tx=Lx;
  #declare Ty=Ty-Dy;
#end

//Print string. Works better with a monospace font like "lucon.ttf"
#macro print(s)
  #local TBlock = text{ttf "cyrvetic.ttf", s .5, 0}

  #local Dx = (max_extent(TBlock) - min_extent(TBlock)).x;
  #if(Tx+Dx>= Txm) NL() #end

  object{TBlock translate <Tx, Ty, 0>}

  #declare Tx=Tx + Dx;
#end

//-------------------------------------------------------------
/*
#include <stdio.h>

int main(void)
{
    int a = 10000, b = 0, c = 2800, d = 0, e = 0, f[2801], g;
    while (b!=c)
    {
        f[b] = a/5;
        b = b + 1;
    }
    g = c*2;
    while (g)
    {
        d = 0;
        b = c;
        while (b)
        {
            d = d + f[b]*a;
            g = g - 1;
            f[b] = d % g;
            d = d / g;
            g = g - 1;
            b = b - 1;
            if(b) d = d * b;
        }
        c = c - 14;
        printf("%0.4d", e + d/a);
        e  =  d % a;
        g = c*2;
    }
    printf("n");
    return 0;
}
*/
//-------------------------------------------------------------

#declare a = 10000;
#declare c = 2800;
#declare e = 0;
#declare f = array[c+1];

#declare b = 0;
#while (b!=c)
  #declare f[b] = 2000;
  #declare b = b + 1;
#end
#declare f[c] = 0;

union{
  print("800 digits of pi.") NL()
  #debug "nStarting Pi calculation. This scene requires the parsing of over
22300K tokensn"
  #declare g = c * 2;
  #while(g)
    #declare d = 0;
    #declare b = c;
    #while(b)
      #declare d = d + f[b]*a;
      #declare g = g - 1;
      #declare f[b] = mod(d, g);
      #declare d = floor(d / g);
      #declare g = g - 1;
      #declare b = b - 1;
      #if(b) #declare d = d * b; #end
    #end
    #declare c = c - 14;
    #declare dd = e + floor(d/a);
    print(concat(" ", str(dd, -4, 0)))

    #declare e  =  mod(d, a);
    #declare g = c*2;
    //#debug "."
  #end
  //#debug "nFinished calculatingn"

  rotate -20*y/2
  translate 1.5*x
}

//--------------------End of scene-----------------------------

Don't forget to restore the backslashes in the #debug statements.


Post a reply to this message


Attachments:
Download 'picalcas.jpg' (250 KB)

Preview of image 'picalcas.jpg'
picalcas.jpg


 

From: the ajj
Subject: Re: The Pi Pool Balls
Date: 28 Nov 2005 13:10:00
Message: <web.438b46f2663c0519a43155f60@news.povray.org>
That's great - thanks - now for some more interesting pool ball images!!!
:-)


Post a reply to this message

From: Frango com Nata
Subject: Re: The Pi Pool Balls
Date: 29 Nov 2005 15:30:00
Message: <web.438cb9e8663c0519c181fd400@news.povray.org>


Post a reply to this message

From: PM 2Ring
Subject: Re: The Pi Pool Balls
Date: 30 Nov 2005 01:45:01
Message: <web.438d4969663c0519ad93754b0@news.povray.org>
"Frango com Nata" <nomail@nomail> wrote:


So am I. :) There are easier-to-understand Pi algorithms. The arctan methods
are the easiest to understand, but my favourite is the arithmetic-geometric
mean method, which doubles the precision with each iteration.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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