POV-Ray : Newsgroups : povray.binaries.images : Ulam Spiral fun Server Time
28 Mar 2024 19:16:01 EDT (-0400)
  Ulam Spiral fun (Message 9 to 18 of 28)  
<<< Previous 8 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Kenneth
Subject: Re: Ulam Spiral fun
Date: 27 Feb 2022 11:20:00
Message: <web.621ba3b08a8700004cef624e6e066e29@news.povray.org>
David Buck <dav### [at] simberoncom> wrote:
> This visualization is mesmerizing.  It shows that the primes aren't
> completely random but they also aren't predictable.  It really makes you
> think about the nature of primeness.
>

Indeed. This is very intriguing. Your curve and JR's Hilbert example make me
wonder if there is some other kind of spiral (or more complex multi-dimensional
shape??) that would show an even clearer visual pattern to the primes. I kind of
sense that there may be something 'deeper' going on here, yet to be discovered.


Post a reply to this message

From: Alain Martel
Subject: Re: Ulam Spiral fun
Date: 27 Feb 2022 11:46:32
Message: <621baae8$1@news.povray.org>
Le 2022-02-27 à 05:37, jr a écrit :
> hi,
> 
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> Op 24/02/2022 om 17:57 schreef Robert McGregor:
>>> A simple Ulam spiral displaying the locations of the first 2088 prime numbers
>>
>> ... First time I heard about an ulam spiral...
> 
> same here.  v pleasing, visually.  the Wikipedia page shows that other
> arrangements are .. permissible.  attached shows primes marked on a Hilbert
> Curve (sphere_sweep, 4096 points), more "patterns".  (I wonder how much of those
> "patterns" is just the result of a desire to see patterns.  :-))
> 
> 
> regards, jr.

Our brains are extremely good at finding patterns. Even TO good at it. 
It can, and do, find patterns even in places where there are no patterns 
at all.


Post a reply to this message

From: David Buck
Subject: Re: Ulam Spiral fun
Date: 27 Feb 2022 17:21:01
Message: <621bf94d$1@news.povray.org>
Then it would be interesting to run the same spiral using random numbers 
instead of primes and see if we notice the same kinds of patterns.

David

> 
> Our brains are extremely good at finding patterns. Even TO good at it. 
> It can, and do, find patterns even in places where there are no patterns 
> at all.


Post a reply to this message

From: jr
Subject: Re: Ulam Spiral fun
Date: 7 Mar 2022 18:55:00
Message: <web.62269aa88a870000ed36e5cb6cde94f1@news.povray.org>
hi,

had a minor epiphany :-) a few days back, realised that the TOA demo provided
already the moving and turning stuff needed for the Ulam Spiral.  so spent some
"happy hours" gutting the TOA code and from it making "USaF", the Ulam Spiral
(animation) Fun ;-).

attached is the source for the animation posted in p.b.a, a few notes:

- the CSV file included is for the first 4096 numbers, the same length as the
Hilbert Curve still image, though the ini file stops short of that.

- the AA settings in the ini are not v good to keep the rendering .. speedy.

- like the 'Filed()' demo, I direct all output to a scratch directory, you'll
need to adapt the paths in two places, the last line of the ini, and line 63 in
the scene (sorry about it it not being nearer the top, need to load lookup data
in CWD first).

- both verbose and logging can be enabled/disabled to suit.  the log could be
used to render intermediate frames to make for graceful "gliding" and turning.
:-)

and finally, I ask for a "helping hand".  I would like the camera to slowly pull
back and change both location + look_at during the animation, the aim being to
run the spiral to the same length as RMcG.


Alain Martel <kua### [at] videotronca> wrote:
> Our brains are extremely good at finding patterns. Even TO good at it.
> It can, and do, find patterns even in places where there are no patterns
> at all.

so agree, and both fortunate and not.  good, I think, for all the cognitive +
tool-making-drive etc advantage, bad because it leaves us susceptible to
conditioning + propaganda and such.


regards, jr.


Post a reply to this message


Attachments:
Download 'usaf.zip' (5 KB)

From: Bald Eagle
Subject: Re: Ulam Spiral fun
Date: 7 Mar 2022 21:45:00
Message: <web.6226c20d8a8700001f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> had a minor epiphany :-) a few days back, realised that the TOA demo provided
> already the moving and turning stuff needed for the Ulam Spiral.  so spent some
> "happy hours" gutting the TOA code and from it making "USaF", the Ulam Spiral
> (animation) Fun ;-).
>
> attached is the source for the animation posted in p.b.a, a few notes:
>
> - the CSV file included is for the first 4096 numbers, the same length as the
> Hilbert Curve still image, though the ini file stops short of that.
>
> - the AA settings in the ini are not v good to keep the rendering .. speedy.
>
> - like the 'Filed()' demo, I direct all output to a scratch directory, you'll
> need to adapt the paths in two places, the last line of the ini, and line 63 in
> the scene (sorry about it it not being nearer the top, need to load lookup data
> in CWD first).
>
> - both verbose and logging can be enabled/disabled to suit.  the log could be
> used to render intermediate frames to make for graceful "gliding" and turning.
> :-)
>
> and finally, I ask for a "helping hand".  I would like the camera to slowly pull
> back and change both location + look_at during the animation, the aim being to
> run the spiral to the same length as RMcG.
>
>
> Alain Martel <kua### [at] videotronca> wrote:
> > Our brains are extremely good at finding patterns. Even TO good at it.
> > It can, and do, find patterns even in places where there are no patterns
> > at all.
>
> so agree, and both fortunate and not.  good, I think, for all the cognitive +
> tool-making-drive etc advantage, bad because it leaves us susceptible to
> conditioning + propaganda and such.
>
>
> regards, jr.

GAAAAAHHHHH.....

TOA, CWD, RMcG......

The Apogee bong wasn't mine, and since William Leonard Pickard stopped making
all the good stuff.....

I cannot Become One with your universe and divine the hidden meaning of your
acronyms.

So you wanna follow the bouncing prime ball as it spirals around the origin and
keep the whole spiral in the view frustrum?

Would any of those camera spline macros be of use?

http://www.f-lohmueller.de/pov_tut/animate/anim22e.htm


Post a reply to this message

From: jr
Subject: Re: Ulam Spiral fun
Date: 8 Mar 2022 09:35:00
Message: <web.622769428a870000ed36e5cb6cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > ...
> GAAAAAHHHHH.....
>
> TOA, CWD, RMcG......

heh, you missed CSV, AA, _and_ p.b.a.  :-)


> ...
> So you wanna follow the bouncing prime ball as it spirals around the origin and
> keep the whole spiral in the view frustrum?
>
> Would any of those camera spline macros be of use?

not too sure yet, need to look this over, thanks for the ref.  from my
lack-of-know-how perspective, roughly, I think of two circles, both approx
around origin, the smaller for the look_at, a larger for the location; the
larger more (shallow) helix, ie I would like from clock 0 to 1 for both
diameters to slowly increase, and the location to "lift", so that the effect is
like zooming out, taking in more + more of the plane.  thinking the movement
should be clockwise (while the spiral gets drawn counter-clockwise).  anyway,
near the end one should have a "bird's eye" view of the spiral.  (I'm reasonably
sure it's not very difficult, but you know of .. my limitations :-))


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Ulam Spiral fun
Date: 8 Mar 2022 13:25:00
Message: <web.62279ec68a8700001f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> not too sure yet, need to look this over, thanks for the ref.  from my
> lack-of-know-how perspective, roughly, I think of two circles, both approx
> around origin, the smaller for the look_at, a larger for the location; the
> larger more (shallow) helix, ie I would like from clock 0 to 1 for both
> diameters to slowly increase, and the location to "lift", so that the effect is
> like zooming out, taking in more + more of the plane.  thinking the movement
> should be clockwise (while the spiral gets drawn counter-clockwise).  anyway,
> near the end one should have a "bird's eye" view of the spiral.  (I'm reasonably
> sure it's not very difficult, but you know of .. my limitations :-))

Ah, I get it now.


How about you use the frame number or clock value to calculate an angle.
For your camera, subtract some increment, for you look_at, add.
Increment your camera's y-value every frame.

To get the spiral effect, increment the radius each frame.

Basically, translate some amount away from the origin (radius), translate your
camera up, and then rotate.   That ought to be it.


Post a reply to this message

From: Bald Eagle
Subject: Re: Ulam Spiral fun
Date: 8 Mar 2022 15:35:00
Message: <web.6227bde88a8700001f9dae3025979125@news.povray.org>
Also, just recalling that this type of thing has been discussed before:


approximations, and more
https://www.youtube.com/watch?v=EK32jo7i5LQ


Post a reply to this message

From: Kenneth
Subject: Re: Ulam Spiral fun
Date: 9 Mar 2022 06:30:00
Message: <web.62288f9d8a8700004cef624e6e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Also, just recalling that this type of thing has been discussed before:
>
>
> approximations, and more
> https://www.youtube.com/watch?v=EK32jo7i5LQ

Wow, that is a fascinating discourse on these apparent spiral 'patterns', and so
well-explained. The various visualizations are top-notch too.

So it turns out that a mathematician from centuries ago has already come up with
a completely rational explanation. There *are* clear patterns to be seen with
the primes-- or any other set of 'related' numbers, so it seems-- but they
result from the visualization technique itself.

That video is a real eye-opener, and quite instructive. Thanks for posting.


Post a reply to this message

From: Alain Martel
Subject: Re: Ulam Spiral fun
Date: 9 Mar 2022 11:06:20
Message: <6228d07c$1@news.povray.org>
Le 2022-03-08 à 15:34, Bald Eagle a écrit :
> Also, just recalling that this type of thing has been discussed before:
> 
> Why do prime numbers make these spirals? | Dirichlet’s theorem, pi
> approximations, and more
> https://www.youtube.com/watch?v=EK32jo7i5LQ
> 

Yes, 3Blue1Brown. Very interesting channel. You should also take a look 
a Mathologer, Numberfile and Stand-up Maths for more interesting 
insights into mathematics.


Post a reply to this message

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

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