Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/x0rbyt3/pendfetch

Double Pendulum visualised with fetching system information in Python.
https://github.com/x0rbyt3/pendfetch

ascii command-line commandline commandline-interface engineering maths python python-3 python3 rice ricing shell system-information terminal-based

Last synced: 15 days ago
JSON representation

Double Pendulum visualised with fetching system information in Python.

Awesome Lists containing this project

README

        

Header image: Pendfetch

Show off your terminal, in style.

Build with <3 Made with python 



Code style: black
 
Twitter
 
PyPI version


A nice relaxing double pendulum simulation using ASCII, able to simulate multiple pendulums at once, and provide tracing of pendulums as well as providing some system information.
If you spot any bugs or features that need adding (especially with the specs), just open an issue :)




Demo Gif

## Features
- As mentioned, able to simulate multiple pendulums at once.
- Able to specify the weight and mass of pendulums to create different butterfly effects.
- Uses equations from [here.](https://www.myphysicslab.com/pendulum/double-pendulum-en.html)
- If -s is used, it grabs system specs and displays them.(hi r/unixporn)
- Obviously a lot could be done to it (see below the Args), Any contributions are appreciated)
## Quickstart:
__Dependencies:__ Python 3.2+,curses (standard on UNIX) or relevent windows port, psutils if you want to use -s

### Github
- Clone using `https://github.com/Nekurone/pendfetch.git` or download the zip.
- Extract if necessary and head inside the folder.
- ```python3 pendulum.py [args]```

### Pip
- `python3 -m pip install pendfetch` (or `pip install pendfetch`)
- `pendfetch [args]`

#### Don't forget to include `-s` for neofetch feature :)
## **__Args__**

Visuals
- [help (-h)](#help)
- [trace (-t)](#trace)
- [tracedrop (-tD)](#tracedrop)
- [specs (-s)](#specs)

Maths and Pendulum settings
- [pendulum (-p)](#pendulum)
- [speed (-sP)](#speed)
- [gravity (-g)](#gravity)
- [mass (-m)](#mass)
- [length (-l)](#length)

Window settings
- [HEIGHT (-H)](#height)
- [WIDTH (-W)](#width)
- [dHEIGHT (-dH)](#dheight)
- [dWIDTH (-dW)](#dwidth)

Visuals


--help (-h)


Spits out a fairly standard argparse help message. Note this is printed out when the program is run anyway.


type: None, default: None
setting in example: -h



--trace (-t)


Enables 'tracing', a faint line behind the pendulums that fades.

type: bool, default: off,
setting in example: -t


--traceDrop (-tD)


Controls the rate at which the trace from -t fades. Higher is faster fading.

type: float, default: 1.0,
setting in example: -t -tD 0.5



--specs (-t)


Enables showing system info, note this feature is still a WIP, any bugs or issues just let me know.


type: bool, default: off,
setting in example: -s


Maths and Pendulum Settings



--pendulum (-p)


Number of pendulums to simulate at once. Combine with the gravity settings and some speed settings for some really pretty visuals.


type: int, default: 1,
setting in example: -p 300


--speed (-sP)


Multiplier for speed of simulation. Around 0.5-1.5 is a good range


type: float, default: 1.0,
setting in example: -sP 3.0


--gravity(-g)


Controls the strength of gravity, note, this directly affects the speed of the simulation. So slowing down is recommended.


type: float, default: 9.81,
setting in example: -g 1


--mass (-m)


Controls the mass of the pendulums, useful mostly for butterfly effects


type: float, default: 100.0,
setting in example: -m 300 -sP 0.2


--length (-l)


Controls the length of the arms of the pendulums, useful mostly for butterfly effects

type: float, default: 250.0, setting in example: -l 150 -sP 0.3

todo: Window settings


If you have any suggestions, or anything you'd like to add (or, more likely you found a bug) just open a PR :)