mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2005-06-08, 00:51   #34
Damian
 
Damian's Avatar
 
May 2005
Argentina

101110102 Posts
Smile Sugestion

How about adding color to the plot?
It could be something like start with blue, and become red as it reaches the end of the loop.
And a blue circle in the first position and a red circle in the end one.
That way one can se the "path" made by the ant.
Damian is offline   Reply With Quote
Old 2005-06-12, 02:18   #35
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

10100000012 Posts
Default

Quote:
Originally Posted by Damian
How about adding color to the plot?
It could be something like start with blue, and become red as it reaches the end of the loop.
And a blue circle in the first position and a red circle in the end one.
That way one can se the "path" made by the ant.
Any takers? This seems like it might be doable, but I'm not sure how to do it
Orgasmic Troll is offline   Reply With Quote
Old 2005-06-12, 10:15   #36
potonono
 
potonono's Avatar
 
Jun 2005
USA, IL

193 Posts
Default

Attached is a 3D color spread for the first 50000 primes. Starts at bright red, fades into purple, violet, and eventually blue. There is a black cylinder from the start point (red) to the end point (blue).

This was made in POV-Ray 3.6 (freeware)

Attached Thumbnails
Click image for larger version

Name:	prime_spread_color.gif
Views:	286
Size:	57.5 KB
ID:	575  

Last fiddled with by potonono on 2005-06-12 at 10:22
potonono is offline   Reply With Quote
Old 2005-06-12, 19:15   #37
Damian
 
Damian's Avatar
 
May 2005
Argentina

2×3×31 Posts
Smile Cool!

Looks pretty!
Just one question, as the distance between two primes gets longer as x increases, shouldn't the straight lines also get longer as the ant advances in it's path?
In that case, and looking in the diagram, it looks like the ant started in the blue region and ended in the red one.
(because there are longer straight lines in the red section)

Quote:
Originally Posted by potonono
Attached is a 3D color spread for the first 50000 primes. Starts at bright red, fades into purple, violet, and eventually blue. There is a black cylinder from the start point (red) to the end point (blue).

This was made in POV-Ray 3.6 (freeware)

Damian is offline   Reply With Quote
Old 2005-06-12, 20:26   #38
potonono
 
potonono's Avatar
 
Jun 2005
USA, IL

193 Posts
Default

Woops! You are correct. I mislabelled my colors. You would start in the blue and move toward red. Attached are a couple zooms on the original and final position.
Attached Thumbnails
Click image for larger version

Name:	test-zoom-origin.gif
Views:	263
Size:	92.0 KB
ID:	576  
potonono is offline   Reply With Quote
Old 2005-06-12, 20:28   #39
potonono
 
potonono's Avatar
 
Jun 2005
USA, IL

C116 Posts
Default

final position
Attached Thumbnails
Click image for larger version

Name:	test-zoom-current.gif
Views:	265
Size:	67.8 KB
ID:	577  
potonono is offline   Reply With Quote
Old 2005-06-12, 23:42   #40
Damian
 
Damian's Avatar
 
May 2005
Argentina

2728 Posts
Default Cool!

At first I thought that it was a 2D plot you made.
Did you use Uncwilly's sugestion for making it 3D? I would also like to see the 2D version.

Also I have a new question now
(both in the 2D and the 3D version)
Lets call Path(t) the path the ant makes from 1 to t.
I wonder for what value of t the ant first returns to the origin (if it ever does).
Or more generally what is the number of times the ant returns to some point (x,y) or (x,y,z)

And a 3D variant: it works equal to the 2D version but when the ant changes direction (at a prime) it would also jump up in the +z direction.
That way the +z jumps will be counting the number of primes.

And how about a 2D graph R(t) of the distance of the ant at Path(t) to the origin?

Now everyone has homework!
Damian is offline   Reply With Quote
Old 2005-06-13, 10:40   #41
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

100100001012 Posts
Default

Quote:
Originally Posted by Damian
I wonder for what value of t the ant first returns to the origin (if it ever does).
It never does. The ant only ever takes one step of odd length (primes 2 and 3 are the only primes an odd distance apart), but to return to the origin it must take an even number of odd steps.

Quote:
Or more generally what is the number of times the ant returns to some point (x,y) or (x,y,z)
I'll leave the hard questions for someone else :-)
geoff is offline   Reply With Quote
Old 2005-06-13, 17:14   #42
Damian
 
Damian's Avatar
 
May 2005
Argentina

2×3×31 Posts
Default You are right

What can be seen now is that the ant never goes over a position where both x and y have pair values. (And so it doesn't return to (0,0)).
And both x and y have to be odd for there been a chance that t is prime (and thus the ant turn to the left)
If only one value (x or y) is odd, and the other is pair, then t is pair for that value of Path(t)

A new question would be: for what value of t the ant first return to the first prime position, if it ever does? (that is Path(2)). If it does then t will be pair because we are talking about (1,0).

Quote:
Originally Posted by geoff
It never does. The ant only ever takes one step of odd length (primes 2 and 3 are the only primes an odd distance apart), but to return to the origin it must take an even number of odd steps.



I'll leave the hard questions for someone else :-)
Damian is offline   Reply With Quote
Old 2005-06-14, 05:24   #43
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

641 Posts
Default

Quote:
Originally Posted by Damian
And how about a 2D graph R(t) of the distance of the ant at Path(t) to the origin?

Now everyone has homework!
Here's the 2d version:
Attached Thumbnails
Click image for larger version

Name:	prime-ant-distance.gif
Views:	197
Size:	8.5 KB
ID:	589  
Orgasmic Troll is offline   Reply With Quote
Old 2005-06-14, 21:24   #44
Damian
 
Damian's Avatar
 
May 2005
Argentina

BA16 Posts
Default Nice!

Quote:
Originally Posted by TravisT
Here's the 2d version:
From looking at your graph the ant didn't return to Path(2) at last for t < 50.000 (it's value should be 1 at that point)

I now installed Mathematica so I can make some graphics too.
I will draw the 1D case (the ant walks over a 1 dimensional line, and turn around at prime values of t )
I draw path(t) as a function of t (thus a 2D graph).

Here's the code:

ptslist2 = {0, 1}; pt2 = 1;
For[i = 1, i < 50000, i = i + 2, pt2 = pt2 - (Prime[i + 1] - Prime[i]);
ptslist2 = Append[ptslist2, pt2];
pt2 = pt2 + (Prime[i + 2] - Prime[i + 1]);
ptslist2 = Append[ptslist2, pt2]];
ListPlot[ptslist2, PlotJoined -> True]
Attached Thumbnails
Click image for larger version

Name:	ant.GIF
Views:	185
Size:	8.2 KB
ID:	599  
Damian is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Primes as pictures pepi37 Programming 13 2017-07-28 03:06
Pretty Fast Primality Test (for numbers = 3 mod 4) tapion64 Miscellaneous Math 40 2014-04-20 05:43
Pretty Result R.D. Silverman Cunningham Tables 2 2009-06-19 01:39
Projected Pictures. mfgoode Puzzles 18 2007-09-21 08:06
Pretty Progress Pictures Joe O Prime Sierpinski Project 3 2007-06-02 21:28

All times are UTC. The time now is 23:23.


Fri Aug 6 23:23:44 UTC 2021 up 14 days, 17:52, 1 user, load averages: 4.37, 4.10, 4.05

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.