diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..838f92f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Module", + "type": "python", + "request": "launch", + "module": "nbody -m", + "justMyCode": true + } + ] +} \ No newline at end of file diff --git a/dev/deprecated/plotly.py b/dev/deprecated/plotly.py index 1a69ae7..019c8f1 100644 --- a/dev/deprecated/plotly.py +++ b/dev/deprecated/plotly.py @@ -1,52 +1 @@ -import nbody.core as nb -import plotly.graph_objects as go -''' -bodies = nb.horizons_batch(('10','199','299','399','499','599','699','799','899')) -phys = nb.Engine(dt=1000) -phys.attach_bodies(bodies) -phys.make_relative_to(bodies[0]) -phys.do_collisions = False -phys.simulate(100000) -phys.save_as('bodies') -''' -def frame_args(duration): - return { - "frame": {"duration": duration}, - "mode": "immediate", - "fromcurrent": True, - "transition": {"duration": duration, "easing": "linear"}, - } -phys = nb.Engine(dt=1000) -phys.load_as('bodies') - -(xs,ys,zs) = list(list(bod['pos'][x][::100] for bod in phys.bodies) for x in (0,1,2)) - -mm = [[0,0],[0,0],[0,0]] -for bod in phys.bodies[:5]: - for i in (0,1,2): - mm[i][0] = min(mm[i][0], *bod['pos'][i]) - mm[i][1] = max(mm[i][1], *bod['pos'][i]) - -b = phys.bodies -fig = go.Figure() -fb = b[0] -for i in range(5): - fig.add_trace(go.Scatter3d(x=[], y=[], z=[],mode="lines", line={'color':b[i].color})) - #fig.add_trace(go.Scatter3d(x=[], y=[], z=[],mode="markers", marker=dict(color=b[i].color, size=10))) - - -fig.update(frames = [go.Frame(data= [go.Scatter3d(x=xs[i][:k+1],y=ys[i][:k+1],z=zs[i][:k+1]) - for i in range(5)],name=f'frame{k}') for k in range(1,len(xs[0]))]) -#go.Scatter3d(x=[xs[i][k],],y=[ys[i][k],],z=[zs[i][k],] - -fig.update_layout(scene=dict( - xaxis=dict(range=mm[0], autorange=False),yaxis=dict(range=mm[1], autorange=False),zaxis=dict(range=mm[2], autorange=False), - aspectratio=dict(x=1, y=1, z=1)), - updatemenus=[dict(type="buttons", - buttons=[dict(label="Play", - method="animate", - args=[None, {'frame':{'duration':1}, 'transition':{'duration':1}}])])] - ) - - -fig.show() \ No newline at end of file +import mpmath as mp diff --git a/main.py.lprof b/main.py.lprof new file mode 100644 index 0000000..99875e6 Binary files /dev/null and b/main.py.lprof differ diff --git a/main.py.prof b/main.py.prof new file mode 100644 index 0000000..049c525 Binary files /dev/null and b/main.py.prof differ diff --git a/nbody/build/config.py b/nbody/build/config.py new file mode 100644 index 0000000..49a04dc --- /dev/null +++ b/nbody/build/config.py @@ -0,0 +1,3 @@ + +# Arithimetic Calculation +USE_FLOAT = False # whether to override number types to float, useful when gmpy2 is not available. diff --git a/nbody/build/gmpy-gmpy2-2.2.0a1.tar.gz b/nbody/build/gmpy-gmpy2-2.2.0a1.tar.gz new file mode 100644 index 0000000..648a554 Binary files /dev/null and b/nbody/build/gmpy-gmpy2-2.2.0a1.tar.gz differ diff --git a/nbody/build/gmpy2-2.0.8-cp27-cp27m-win32.whl b/nbody/build/gmpy2-2.0.8-cp27-cp27m-win32.whl new file mode 100644 index 0000000..de47a35 Binary files /dev/null and b/nbody/build/gmpy2-2.0.8-cp27-cp27m-win32.whl differ diff --git a/nbody/build/gmpy2-2.0.8-cp27-cp27m-win_amd64.whl b/nbody/build/gmpy2-2.0.8-cp27-cp27m-win_amd64.whl new file mode 100644 index 0000000..20f8fde Binary files /dev/null and b/nbody/build/gmpy2-2.0.8-cp27-cp27m-win_amd64.whl differ diff --git a/nbody/build/gmpy2-2.1.5-cp311-cp311-win_amd64.whl b/nbody/build/gmpy2-2.1.5-cp311-cp311-win_amd64.whl new file mode 100644 index 0000000..1b83b54 Binary files /dev/null and b/nbody/build/gmpy2-2.1.5-cp311-cp311-win_amd64.whl differ diff --git a/solarsystem_bodies.npz b/solarsystem_bodies.npz index b2a004f..0dba61e 100644 Binary files a/solarsystem_bodies.npz and b/solarsystem_bodies.npz differ diff --git a/temp.dat b/temp.dat new file mode 100644 index 0000000..3526384 Binary files /dev/null and b/temp.dat differ diff --git a/temp.html b/temp.html new file mode 100644 index 0000000..05b715a --- /dev/null +++ b/temp.html @@ -0,0 +1,22 @@ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/temp.json b/temp.json new file mode 100644 index 0000000..e69de29