Page 1 of 1

Tick tock goes the asteroids (but without the tick tock)

Posted: Sun Feb 02, 2014 1:13 pm
by A Random Player

Code: Select all

import math
mass = 1000
periods = [1,60,3600]
output =  "Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: " + str(mass) + "]"
for a in periods:
 radius = ((36*a/(2*math.pi))**2*mass)**(1.0/3)
 vel = math.sqrt(mass/radius)
 output = output + ", [x0: 0,y0: " + str(-radius) + ",vx: " + str(vel) + ",vy: 0,t0: 0,who: 3,m: 0]"
print output
http://codepad.org/kcIwuNPG

It's a clock. Come on, you should know what a clock is.
But remember, least period (fastest hand) on inside. You can change the periods in the period list.

Simple:

Code: Select all

Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000], [x0: 0,y0: -32.0195399866,vx: 5.5884639774,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -490.737510252,vx: 1.42749755282,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -7521.13565872,vx: 0.364634946483,vy: 0,t0: 0,who: 3,m: 0]
Inner is a period 1 second. Next is second hand. Next is minute hand. (The clock repeats once per hour)

Simple w/ more hands:

Code: Select all

Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000], [x0: 0,y0: -32.0195399866,vx: 5.5884639774,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -490.737510252,vx: 1.42749755282,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -7521.13565872,vx: 0.364634946483,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -39421.9031045,vx: 0.159268983004,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -62578.3704587,vx: 0.126411875583,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -3196093.62523,vx: 0.0176884693564,vy: 0,t0: 0,who: 3,m: 0]
1 second, second hand (1 min), minute hand (1 hr), hour hands (12 hour and 24 hour), day hand (365 day period).

On second thought that was stupid. Here's clocks with mass of star reduced to 1:
Simple:

Code: Select all

Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1], [x0: 0,y0: -3.20195399866,vx: 0.55884639774,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -49.0737510252,vx: 0.142749755282,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -752.113565872,vx: 0.0364634946483,vy: 0,t0: 0,who: 3,m: 0]
More hands:

Code: Select all

Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1], [x0: 0,y0: -3.20195399866,vx: 0.55884639774,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -49.0737510252,vx: 0.142749755282,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -752.113565872,vx: 0.0364634946483,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -3942.19031045,vx: 0.0159268983004,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -6257.83704587,vx: 0.0126411875583,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -319609.362523,vx: 0.00176884693564,vy: 0,t0: 0,who: 3,m: 0]
Binary for fun:

Code: Select all

Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000], [x0: 0,y0: -32.0195399866,vx: 5.5884639774,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -50.8278514582,vx: 4.4355667983,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -80.6841848741,vx: 3.52051170085,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -128.078159946,vx: 2.7942319887,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -203.311405833,vx: 2.21778339915,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -322.736739496,vx: 1.76025585043,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -512.312639785,vx: 1.39711599435,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -813.245623332,vx: 1.10889169958,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -1290.94695799,vx: 0.880127925213,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -2049.25055914,vx: 0.698557997175,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -3252.98249333,vx: 0.554445849788,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -5163.78783194,vx: 0.440063962607,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -8197.00223657,vx: 0.349278998587,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -13011.9299733,vx: 0.277222924894,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -20655.1513278,vx: 0.220031981303,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -32788.0089463,vx: 0.174639499294,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -52047.7198932,vx: 0.138611462447,vy: 0,t0: 0,who: 3,m: 0]
Small version:

Code: Select all

Gravity Fun at TestTubeGames: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1], [x0: 0,y0: -3.20195399866,vx: 0.55884639774,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -5.08278514582,vx: 0.44355667983,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -8.06841848741,vx: 0.352051170085,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -12.8078159946,vx: 0.27942319887,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -20.3311405833,vx: 0.221778339915,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -32.2736739496,vx: 0.176025585043,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -51.2312639785,vx: 0.139711599435,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -81.3245623332,vx: 0.110889169958,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -129.094695799,vx: 0.0880127925213,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -204.925055914,vx: 0.0698557997175,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -325.298249333,vx: 0.0554445849788,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -516.378783194,vx: 0.0440063962607,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -819.700223657,vx: 0.0349278998587,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -1301.19299733,vx: 0.0277222924894,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -2065.51513278,vx: 0.0220031981303,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -3278.80089463,vx: 0.0174639499294,vy: 0,t0: 0,who: 3,m: 0], [x0: 0,y0: -5204.77198932,vx: 0.0138611462447,vy: 0,t0: 0,who: 3,m: 0]
Some of the very far asteroids appear not to load. Any ideas?


Also, any ideas to make the clock more readable without overlaying a protractor? Utilize LCMs for instance? Add some factors?

Re: Tick tock goes the asteroids (but without the tick tock)

Posted: Sun Feb 02, 2014 6:09 pm
by robly18
Cool.
As for making it more readable: how about unmovable stars with 0 mass?

Re: Tick tock goes the asteroids (but without the tick tock)

Posted: Sun Feb 02, 2014 8:04 pm
by exfret
A Random Player wrote:Some of the very far asteroids appear not to load. Any ideas?
For this, you could make the gravity law higher/lower so that the far out asteroids are closer. The really far out ones would still win, but you could still get some just-barely-further-out ones close enough in to be loaded. Oh, I know. A n^r gravity law would be perfect for this circumstance, because the distance from the center to get a certain period approaches linear, right? And since time is measured exponentially, this makes it exponential (60 seconds in a minute, 3600 seconds in an hour, 3600*24 seconds in a day, 3600*24*365 seconds in a year, 3600*24*365*∞ seconds in Chuck Norris' lifetime, etc.).

Re: Tick tock goes the asteroids (but without the tick tock)

Posted: Sat Feb 08, 2014 12:54 am
by testtubegames
A Random Player wrote:Some of the very far asteroids appear not to load. Any ideas?
Nice clocks -- glad I got the zoom working in the new simulator. All the ones I loaded seemed to add all the asteroids properly. I have a guess what the problem is, too. Asteroids crash based on proximity to stars. But that ignores the mass of the stars -- which it really needs to take into account. For a tiny m=1 star, the asteroids should be able to live a lot closer without crashing.

Also, I like robly's idea, m=0 stars could work. Also, you can easily get radial lines by adding asteroids with zero velocity (and orbit-lines on). They'll crash right into the central star.