CW-DoublePendulum 0.3.0__py3-none-any.whl → 0.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ import sim
2
+
3
+ sim.runSim()
CWDoublePendulum/sim.py CHANGED
@@ -9,6 +9,9 @@ def runSim():
9
9
  import time
10
10
  import csv
11
11
  import hashlib
12
+ import importlib.resources
13
+ import CWDoublePendulum
14
+
12
15
 
13
16
  # Initial parameters (all can be modified with sliders)
14
17
  l1 = 1.0
@@ -374,7 +377,8 @@ def runSim():
374
377
  result = np.round(state, decimals=6)
375
378
  resultStr = ','.join(map(str, result))
376
379
  hashDigest = hashlib.sha256(resultStr.encode()).hexdigest()
377
- testHash = np.loadtxt('testHash.txt', dtype=str)
380
+ with importlib.resources.files(CWDoublePendulum).joinpath("testHash.txt").open("r") as f:
381
+ testHash = f.read().strip()
378
382
  if hashDigest != testHash:
379
383
  print("Test failed! Please re-download source code")
380
384
  else:
@@ -383,6 +387,4 @@ def runSim():
383
387
 
384
388
  testButton.on_clicked(runVerification)
385
389
 
386
- plt.show()
387
-
388
- runSim()
390
+ plt.show()
@@ -0,0 +1 @@
1
+ 8b59f2def9fbe49c3b9406b77c242680ebe77a80b7cb60b70e47ee5871221762
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.4
2
+ Name: CW-DoublePendulum
3
+ Version: 0.3.2
4
+ Summary: A Python package that uses NumPy and Matplotlib to simulate an interactive double pendulum.
5
+ Author-email: Chase Worsley <worsleychase@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Worsleychase/InteractiveDoublePendulum
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: numpy
15
+ Requires-Dist: matplotlib
16
+ Dynamic: license-file
17
+
18
+ # Interactive Double Pendulum
19
+
20
+ An interactive double pendulum simulator built with Python and Matplotlib.
21
+ This tool visualizes the chaotic motion of a double pendulum and allows real-time parameter tuning, trail visualization, and data collection.
22
+
23
+ ## Features
24
+
25
+ - Adjustable parameters: masses, lengths, gravity, and time step via sliders.
26
+ - Real-time animation with pause, reset, and trail toggles.
27
+ - Data collection and export to CSV for further analysis.
28
+ - Built-in verification test to check simulation correctness.
29
+ - Minimal dependencies: just `numpy` and `matplotlib`.
30
+
31
+ ## Installation
32
+
33
+ Install directly from PyPI:
34
+
35
+ ```bash
36
+ pip install CW-DoublePendulum
37
+ ```
38
+
39
+
@@ -0,0 +1,10 @@
1
+ CWDoublePendulum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ CWDoublePendulum/manualRun.py,sha256=6r2-FnS7fmeATN6BcRlqprtvQmg-uIydXLp9tqpCUTo,26
3
+ CWDoublePendulum/sim.py,sha256=2Aohzil00IXh-Bf313GxYHD-hH_AaxTErCi6EjSnyig,14584
4
+ CWDoublePendulum/testHash.txt,sha256=C1JNg1nq1ztoj6XriL9w3WLzq3LwH86VIlDBh4U_xsQ,64
5
+ cw_doublependulum-0.3.2.dist-info/licenses/LICENSE,sha256=P_M8rIY4EFOQArRFqXCsxqdZyDp2kUCszxsaDapqA_4,1090
6
+ cw_doublependulum-0.3.2.dist-info/METADATA,sha256=83jCRetFv6F9UIjbJbCTMUYg36AAMp1XHP0GvdiUlOs,1317
7
+ cw_doublependulum-0.3.2.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
8
+ cw_doublependulum-0.3.2.dist-info/entry_points.txt,sha256=bl8GVAAafizZ1OprX6HOmfdP0pcJRYjsAEeKdxMTCiw,65
9
+ cw_doublependulum-0.3.2.dist-info/top_level.txt,sha256=getQFdsFpgw4puZJPD_uM4uFaD_ltaEzamsq6zcL4dM,17
10
+ cw_doublependulum-0.3.2.dist-info/RECORD,,
@@ -1,20 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: CW-DoublePendulum
3
- Version: 0.3.0
4
- Summary: A Python package that uses NumPy and Matplotlib to simulate an interactive double pendulum.
5
- Author-email: Chase Worsley <your_email@example.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/Worsleychase/InteractiveDoublePendulum
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.9
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: numpy
15
- Requires-Dist: matplotlib
16
- Dynamic: license-file
17
-
18
- # Interactive Double Pendulum
19
-
20
- Final project for Mathematical & Computational Physics II
@@ -1,8 +0,0 @@
1
- CWDoublePendulum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- CWDoublePendulum/sim.py,sha256=TVheQjzSzxUpoQJGwSv8Eo-LIyGysCfZRAWuinNcoEs,14451
3
- cw_doublependulum-0.3.0.dist-info/licenses/LICENSE,sha256=P_M8rIY4EFOQArRFqXCsxqdZyDp2kUCszxsaDapqA_4,1090
4
- cw_doublependulum-0.3.0.dist-info/METADATA,sha256=fduBHeg454wr-Wsugtbf7Z4peZLthXS6saQu7Cs2FHQ,719
5
- cw_doublependulum-0.3.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
6
- cw_doublependulum-0.3.0.dist-info/entry_points.txt,sha256=bl8GVAAafizZ1OprX6HOmfdP0pcJRYjsAEeKdxMTCiw,65
7
- cw_doublependulum-0.3.0.dist-info/top_level.txt,sha256=getQFdsFpgw4puZJPD_uM4uFaD_ltaEzamsq6zcL4dM,17
8
- cw_doublependulum-0.3.0.dist-info/RECORD,,