POV-Ray : Newsgroups : povray.advanced-users : Pappus Chain Server Time
27 Jul 2024 18:29:25 EDT (-0400)
  Pappus Chain (Message 31 to 40 of 43)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>
From: kurtz le pirate
Subject: Re: Pappus Chain
Date: 18 Jun 2024 11:29:05
Message: <6671a7c1$1@news.povray.org>
On 18/06/2024 00:50, Bald Eagle wrote:
> And of course, because the Appollonian gasket is a foam, . . .
> 
> bubbles!
> 


GREAT Bubbles. Very good job.


-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Bald Eagle
Subject: Re: Pappus Chain
Date: 18 Jun 2024 16:05:00
Message: <web.6671e8453bd24dfec74cee8225979125@news.povray.org>
Just posting this here for reference.

https://www.johndcook.com/blog/2023/12/19/conformal-map-disk-triangle/

Would be cool to apply this to the gasket to see what pops out - probably a
Sierpinski Triangle.

Search: conformal mapping of circle to a triangle

- BE


Post a reply to this message

From: Bald Eagle
Subject: Re: Pappus Chain
Date: 18 Jun 2024 20:40:00
Message: <web.667228173bd24dfe1f9dae3025979125@news.povray.org>
Now with lenses!


Post a reply to this message


Attachments:
Download 'mjf_appollonianlenses.png' (451 KB)

Preview of image 'mjf_appollonianlenses.png'
mjf_appollonianlenses.png


 

From: MichaelJF
Subject: Re: Pappus Chain
Date: 19 Jun 2024 07:49:27
Message: <6672c5c7$1@news.povray.org>
Am 19.06.2024 um 02:36 schrieb Bald Eagle:
> Now with lenses!
somewhat crazy, but very interesting;)

Best regards
Michael


Post a reply to this message

From: Bald Eagle
Subject: Re: Pappus Chain
Date: 19 Jun 2024 09:20:00
Message: <web.6672da803bd24dfede5e631125979125@news.povray.org>
MichaelJF <fri### [at] t-onlinede> wrote:

> somewhat crazy, but very interesting;)

Aw, thanks Michael!

But what about the render?    :D


Post a reply to this message

From: William F Pokorny
Subject: Re: Pappus Chain
Date: 19 Jun 2024 09:36:14
Message: <6672dece$1@news.povray.org>
On 6/19/24 09:17, Bald Eagle wrote:
> MichaelJF <fri### [at] t-onlinede> wrote:
> 
>> somewhat crazy, but very interesting;)
> 
> Aw, thanks Michael!
> 
> But what about the render?    :D
> 

You have too much free times... :-) Very cool.

Bill P.


Post a reply to this message

From: Bald Eagle
Subject: Re: Pappus Chain
Date: 19 Jun 2024 09:55:00
Message: <web.6672e21b3bd24dfede5e631125979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Just posting this here for reference.
>
> https://www.johndcook.com/blog/2023/12/19/conformal-map-disk-triangle/
>
> Would be cool to apply this to the gasket to see what pops out - probably a
> Sierpinski Triangle.
>
> Search: conformal mapping of circle to a triangle
>
> - BE

https://www.mathworks.com/matlabcentral/fileexchange/35008-generation-of-random-variates

https://www.mathworks.com/matlabcentral/fileexchange/1844-gaussian-hypergeometric-function

function z=hypergeometric2f1(a,b,c,x,n)
% HYPERGEOMETRIC2F1 Computes the hypergeometric function
% using a series expansion:
%
%    f(a,b;c;x)=
%
%    1 + [ab/1!c]x + [a(a+1)b(b+1)/2!c(c+1)]x^2 +
%    [a(a+1)(a+2)b(b+1)(b+2)/3!c(c+1)(c+2)]x^3 + ...
%
% The series is expanded to n terms
%
% This function solves the Gaussian Hypergeometric Differential Equation:
%
%     x(1-x)y'' + {c-(a+b+1)x}y' - aby = 0
%
% The Hypergeometric function converges only for:
% |x| < 1
% c != 0, -1, -2, -3, ...
%
%
% Comments to:
% Diego Garcia   - d.g### [at] ieeeorg
% Chuck Mongiovi - mon### [at] fastnet
% June 14, 2002
if nargin ~= 5
    error('Usage: hypergeometric2f1(a,b,c,x,n) --> Wrong number of arguments')
end
if (n <= 0 | n ~= floor(n))
    error('Usage: hypergeometric2f1(a,b,c,x,n) --> n has to be a positive
integer')
end
if (abs(x) > 1)
    error('Usage: hypergeometric2f1(a,b,c,x,n) --> |x| has to be less than 1')
end
if (c <= 0 & c == floor(c))
    error('Usage: hypergeometric2f1(a,b,c,x,n) --> c != 0, -1, -2, -3, ...')
end
z = 0;
m = 0;
while (m<n)
    if (m == 0)
        delta = 1;
    else
        delta = delta .* x .* (a + (m - 1)) .* (b + (m-1)) ./ m ./ (c + (m-1));
   end
   z = z + delta;
   m = m + 1;
end


Post a reply to this message

From: Bald Eagle
Subject: Re: Pappus Chain
Date: 20 Jun 2024 07:15:00
Message: <web.66740eee3bd24dfe1f9dae3025979125@news.povray.org>
And of course we needed so good old fashioned crop circles.
(WIP)


Post a reply to this message


Attachments:
Download 'mjf_appolloniancropcircles.png' (828 KB)

Preview of image 'mjf_appolloniancropcircles.png'
mjf_appolloniancropcircles.png


 

From: Bald Eagle
Subject: Re: Pappus Chain
Date: 20 Jun 2024 16:15:00
Message: <web.66748d783bd24dfea959538725979125@news.povray.org>
Any python coders capable of converting this to SDL?

https://people.sc.fsu.edu/~jburkardt/py_src/hyper_2f1/hyper_2f1.py

#! /usr/bin/env python3
#
def hyper_2f1_test ( ):

#*****************************************************************************80
#
## hyper_2f1_test() tests hyper_2f1().
#
#  Licensing:
#
#    This code is distributed under the MIT license.
#
#  Modified:
#
#    21 December 2023
#
#  Author:
#
#    John Burkardt
#
  import platform

  print ( '' )
  print ( 'hyper_2f1_test():' )
  print ( '  Python version: %s' % ( platform.python_version ( ) ) )
  print ( '  Test hyper_2f1().' )

  hyper_2f1_real_test ( )
  hyper_2f1_complex_test ( )
#
#  Terminate.
#
  print ( '' )
  print ( 'hyper_2f1_test():' )
  print ( '  Normal end of execution.' )
  return

def hyper_2f1 ( a, b, c, x ):

#*****************************************************************************80
#
## hyper_2f1() evaluates the hypergeometric 2F1 function.
#
#  Licensing:
#
#    This code is distributed under the MIT license.
#
#  Modified:
#
#    21 December 2023
#
#  Author:
#
#    John Burkardt
#
#  Input:
#
#    real A, B, C: the parameters.
#
#    real or complex X: the argument.
#
#  Output:
#
#    real or complex F: the value of the function.
#
  from scipy.special import hyp2f1

  f = hyp2f1 ( a, b, c, x )

  return f

def hyper_2f1_real_values ( n_data ):

#*****************************************************************************80
#
## hyper_2f1_real_values() returns some values of the hypergeometric 2F1
function.
#
#  Discussion:
#
#    In Mathematica, the function can be evaluated by:
#
#      fx = Hypergeometric2F1 [ a, b, c, x ]
#
#  Licensing:
#
#    This code is distributed under the MIT license.
#
#  Modified:
#
#    13 February 2015
#
#  Author:
#
#    John Burkardt
#
#  Reference:
#
#    Milton Abramowitz, Irene Stegun,
#    Handbook of Mathematical Functions,
#    National Bureau of Standards, 1964,
#    ISBN: 0-486-61272-4,
#    LC: QA47.A34.
#
#    Shanjie Zhang, Jianming Jin,
#    Computation of Special Functions,
#    Wiley, 1996,
#    ISBN: 0-471-11963-6,
#    LC: QA351.C45
#
#    Stephen Wolfram,
#    The Mathematica Book,
#    Fourth Edition,
#    Cambridge University Press, 1999,
#    ISBN: 0-521-64314-7,
#    LC: QA76.95.W65.
#
#    Daniel Zwillinger, editor,
#    CRC Standard Mathematical Tables and Formulae,
#    30th Edition,
#    CRC Press, 1996,
#    ISBN: 0-8493-2479-3,
#    LC: QA47.M315.
#
#  Input:
#
#    integer n_data.  The user sets n_data to 0 before the first call.
#
#  Output:
#
#    integer n_data.  On each call, the routine increments n_data by 1, and
#    returns the corresponding data; when there is no more data, the
#    output value of n_data will be 0 again.
#
#    real A, B, C, X, the parameters.
#
#    real F, the value of the function.
#
  import numpy as np

  n_max = 24

  a_vec = np.array ( ( \
   -2.5, \
   -0.5, \
    0.5, \
    2.5, \
   -2.5, \
   -0.5, \
    0.5, \
    2.5, \
   -2.5, \
   -0.5, \
    0.5, \
    2.5, \
    3.3, \
    1.1, \
    1.1, \
    3.3, \
    3.3, \
    1.1, \
    1.1, \
    3.3, \
    3.3, \
    1.1, \
    1.1, \
    3.3 ))

  b_vec = np.array ( ( \
    3.3, \
    1.1, \
    1.1, \
    3.3, \
    3.3, \
    1.1, \
    1.1, \
    3.3, \
    3.3, \
    1.1, \
    1.1, \
    3.3, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7 ))

  c_vec = np.array ( ( \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
    6.7, \
   -5.5, \
   -0.5, \
    0.5, \
    4.5, \
   -5.5, \
   -0.5, \
    0.5, \
    4.5, \
   -5.5, \
   -0.5, \
    0.5, \
    4.5 ))

  f_vec = np.array ( ( \
    0.72356129348997784913, \
    0.97911109345277961340, \
    1.0216578140088564160, \
    1.4051563200112126405, \
    0.46961431639821611095, \
    0.95296194977446325454, \
    1.0512814213947987916, \
    2.3999062904777858999, \
    0.29106095928414718320, \
    0.92536967910373175753, \
    1.0865504094806997287, \
    5.7381565526189046578, \
    15090.669748704606754, \
   -104.31170067364349677, \
    21.175050707768812938, \
    4.1946915819031922850, \
    1.0170777974048815592E+10, \
   -24708.635322489155868, \
    1372.2304548384989560, \
    58.092728706394652211, \
    5.8682087615124176162E+18, \
   -4.4635010147295996680E+08, \
    5.3835057561295731310E+06, \
    20396.913776019659426 ))

  x_vec = np.array ( ( \
    0.25, \
    0.25, \
    0.25, \
    0.25, \
    0.55, \
    0.55, \
    0.55, \
    0.55, \
    0.85, \
    0.85, \
    0.85, \
    0.85, \
    0.25, \
    0.25, \
    0.25, \
    0.25, \
    0.55, \
    0.55, \
    0.55, \
    0.55, \
    0.85, \
    0.85, \
    0.85, \
    0.85 ))

  if ( n_data < 0 ):
    n_data = 0

  if ( n_max <= n_data ):
    n_data = 0
    a = 0
    b = 0
    c = 0.0
    x = 0.0
    f = 0.0
  else:
    a = a_vec[n_data]
    b = b_vec[n_data]
    c = c_vec[n_data]
    x = x_vec[n_data]
    f = f_vec[n_data]
    n_data = n_data + 1

  return n_data, a, b, c, x, f

def hyper_2f1_real_test ( ):

#*****************************************************************************80
#
## hyper_2f1_real_test() tests hyper_2f1() for real arguments.
#
#  Licensing:
#
#    This code is distributed under the MIT license.
#
#  Modified:
#
#    21 December 2023
#
#  Author:
#
#    John Burkardt
#
  print ( '' )
  print ( 'hyper_2f1_real_test():' )
  print ( '  hyper_2f1() evaluates the hypergeometric function 2F1(A,B,C;X)' )
  print ( '  Check the computation for real arguments X.' )

  n_data = 0

  while ( True ):

    n_data, a, b, c, x, f1 = hyper_2f1_real_values ( n_data )

    if ( n_data == 0 ):
      break

    f2 = hyper_2f1 ( a, b, c, x )

    print ( '' )
    print ( '  (a,b,c,x):   %4d  %4d  %12f  %12f' % ( a, b, c, x ) )
    print ( '  (exact):     %24.16g' % ( f1 ) )
    print ( '  (computed):  %24.16g' % ( f2 ) )
    print ( '  (error):     %24.16g' % ( abs ( f1 - f2 ) ) )

  return

def hyper_2f1_complex_values ( n_data ):

#*****************************************************************************80
#
## hyper_2f1_complex_values() returns some values of the hypergeometric 2F1
function.
#
#  Discussion:
#
#    In Mathematica, the function can be evaluated by:
#
#      fz = Hypergeometric2F1 [ a, b, c, z ]
#
#  Licensing:
#
#    This code is distributed under the MIT license.
#
#  Modified:
#
#    19 December 2023
#
#  Author:
#
#    John Burkardt
#
#  Reference:
#
#    Shanjie Zhang, Jianming Jin,
#    Computation of Special Functions,
#    Wiley, 1996,
#    ISBN: 0-471-11963-6,
#    LC: QA351.C45
#
#  Input:
#
#    integer n_data.  The user sets n_data to 0 before the first call.
#
#  Output:
#
#    integer n_data.  On each call, the routine increments n_data by 1, and
#    returns the corresponding data; when there is no more data, the
#    output value of n_data will be 0 again.
#
#    real A, B, C: the parameters.
#
#    complex Z: the argument.
#
#    complex FZ: the value of the function.
#
  import numpy as np

  n_max = 15

  a_vec = np.array ( ( \
    3.2, \
    3.2, \
   -5.0, \
    3.3, \
   -7.0, \
    4.3, \
    3.3, \
    3.5, \
    3.3, \
    7.0, \
    5.0, \
    3.5, \
    2.1, \
    8.7, \
    8.7 ))

  b_vec = np.array ( ( \
   1.8, \
  -1.8, \
   3.3, \
  -6.0, \
   3.3, \
  -8.0, \
   5.8, \
  -2.4, \
   4.3, \
   5.0, \
   7.0, \
   1.2, \
   5.4, \
   3.2, \
   2.7 ))

  c_vec = np.array ( ( \
   6.7, \
   6.7, \
   6.7, \
   3.7, \
  -3.7, \
  -3.7, \
   6.7, \
   6.7, \
   6.7, \
   4.1, \
   4.1, \
   9.7, \
   9.7, \
   6.7, \
   6.7 ))

  fz_vec = np.array ( ( \
    5.468999154361234+0.00000000j, \
    0.3375063477462785+0.00000000j, \
    116.8274991533609+603.8909562709345j, \
    17620.41819334182+38293.80901310932j, \
   -11772775115.27448-14382285977.20268j, \
    1316118577866.058-101298889382.4362j, \
    1.733055678355656+0.6340102904953357j, \
    0.6476224071999852-0.5211050690999773j, \
   -1.483008322270093+8.374426179451589j, \
   -0.004037609523971226-0.002956632645480181j, \
   -0.004037609523971226-0.002956632645480181j, \
    1.034313610729953+0.5447389238499308j, \
    0.6885043978280027+1.227418679098749j, \
   -0.9004649679297319-1.11988994714304j, \
   -0.4608388640599718-0.5457569650549665j ))

  z_vec = np.array ( ( \
   1.0+0.0j, \
   1.0+0.0j, \
   5.2+4.8j, \
   5.2-4.8j, \
   5.2-4.8j, \
   5.2+4.8j, \
   0.2+0.1j, \
   0.2+0.5j, \
   0.8+0.3j, \
   3.0-1.0j, \
   3.0-1.0j, \
   0.6+0.9j, \
   0.5+0.7j, \
   0.5+0.7j, \
   0.6+0.9j ))

  if ( n_data < 0 ):
    n_data = 0

  if ( n_max <= n_data ):
    n_data = 0
    a = 0
    b = 0
    c = 0.0
    z = 0.0
    fz = 0.0
  else:
    a = a_vec[n_data]
    b = b_vec[n_data]
    c = c_vec[n_data]
    z = z_vec[n_data]
    fz = fz_vec[n_data]
    n_data = n_data + 1

  return n_data, a, b, c, z, fz

def hyper_2f1_complex_test ( ):

#*****************************************************************************80
#
## hyper_2f1_complex_test() tests hyper_2f1() for complex arguments.
#
#  Licensing:
#
#    This code is distributed under the MIT license.
#
#  Modified:
#
#    21 December 2023
#
#  Author:
#
#    John Burkardt
#
  print ( '' )
  print ( 'hyper_2f1_complex_test():' )
  print ( '  Test hyper_2f1() for complex arguments.' )

  n_data = 0

  while ( True ):

    n_data, a, b, c, z, f1 = hyper_2f1_complex_values ( n_data )

    if ( n_data == 0 ):
      break

    f2 = hyper_2f1 ( a, b, c, z )

    print ( '' )
    print ( '  (a,b,c,z):   %4d  %4d  %8f  (%8f,%8f)' % ( a, b, c, z.real,
z.imag ) )
    print ( '  (exact):     (%24.16g,%24.16g)' % ( f1.real, f1.imag ) )
    print ( '  (computed):  (%24.16g,%24.16g)' % ( f2.real, f2.imag ) )
    print ( '  (error):     %24.16g' % ( abs ( f1 - f2 ) ) )

  return

def timestamp ( ):

#*****************************************************************************80
#
## timestamp() prints the date as a timestamp.
#
#  Licensing:
#
#    This code is distributed under the MIT license.
#
#  Modified:
#
#    06 April 2013
#
#  Author:
#
#    John Burkardt
#
  import time

  t = time.time ( )
  print ( time.ctime ( t ) )

  return

if ( __name__ == '__main__' ):
  timestamp ( )
  hyper_2f1_test ( )
  timestamp ( )


Post a reply to this message

From: MichaelJF
Subject: Re: Pappus Chain
Date: 24 Jul 2024 14:31:53
Message: <66a14899@news.povray.org>
In my opinion, a special case was still missing here...

Blue is an osculatory sphere packing with an asymmetric start 
configuration, red is a classical apollonian sphere packing with a 
symmetric start configuration.

Best regards,
MIchael


Post a reply to this message


Attachments:
Download '20240724_apollonian_spheres_01b_1920.png' (528 KB)

Preview of image '20240724_apollonian_spheres_01b_1920.png'
20240724_apollonian_spheres_01b_1920.png


 

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

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