Double Pendulum visualised with fetching system information in Python.

Overview

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.
  • 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

Maths and Pendulum settings

Window settings

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 :)

Comments
  • Add WM feature

    Add WM feature

    I use i3wm, and it seems that theres only a DE function, which returns Generic Mabye change the line to WM/DE: or make a seperate line stating the wm currently running

    opened by Rstar284 2
  • Remove title() on info values

    Remove title() on info values

    in pendulum.py we have stdscr.addstr(i+3,(len(x)+1),': {0}'.format(sys_specs[x].title())) on line 330, this has proved unpopular and will be changed to stdscr.addstr(i+3,(len(x)+1),': {0}'.format(sys_specs[x]))

    opened by Nekurone 0
  • Username not showing up

    Username not showing up

    When i was observing your code, i saw a function get_user(), and it seems its not being used anywhere in the code, thus not showing the {username}@{hostname} line image

    opened by Rstar284 0
  • Clean up variable names.

    Clean up variable names.

    Speaks for itself, variables are mostly 1 letter temp variables right now and all over the show. Implementing them with actual, readable names would improve readability.

    good first issue 
    opened by Nekurone 0
  • Move drawing functions to new file

    Move drawing functions to new file

    Improving readability is a big part of this project, as ideally I'd like it to become a reference for some of the more jank solutions when working with curses, moving the draw functions out of pendulum.py would improve that

    enhancement 
    opened by Nekurone 0
  • Add more variables to the parser

    Add more variables to the parser

    Variables such as epsilon, both masses and both length rather than them being equal to mass and length respectively,

    Would allow more functionality for chaos effects without code editing.

    good first issue 
    opened by Nekurone 0
Releases(v1.2)
Owner
Nekurone
Nekurone
PyWordle: A Python-made wordle manual solver

PyWordle: A Python-made wordle manual solver How to use it Start the program with python3 pywordlesolver.py. How it works The program has a simple 5-l

Federico Torrielli 5 Nov 24, 2022
Yet another bash/zsh prompt script

Here we have yet another script for Git-aware customization of the command prompt in Bash and zsh. Unlike all the other scripts, I wrote this one, so

John T. Wodder II 5 Oct 13, 2021
Themes for the kitty terminal emulator

Themes for the kitty terminal This is a collection of themes for the kitty terminal emulator. The themes were initially imported from dexpota/kitty-th

Kovid Goyal 190 Jan 05, 2023
A VIM-inspired filemanager for the console

ranger 1.9.3 ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory

12.6k Dec 30, 2022
xonsh is a Python-powered, cross-platform, Unix-gazing shell

xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

xonsh 6.7k Dec 31, 2022
A begginer reverse shell tool python.

A begginer tools for hacking. The theme of this repository is to bring some ready-made open-source tools for anyone new to the world of hacking. This

Dio brando 2 Jan 05, 2022
Command-line search tool for GitHub

cligh is a command-line search tool for GitHub.

1 Oct 02, 2022
A command line tool made in Python for the popular rhythm game

osr!name A command line tool made in Python for the popular rhythm game "osu!" that changes the player name of a .osr file (replay file). Example: Not

2 Dec 28, 2021
A CLI tool for creating disposable environments.

dispenv - Disposable Python Environments ⚠️ WIP Need to make an environment to work on a GitHub issue? Want to try out a new package and not leave the

Peter Baumgartner 3 Mar 14, 2022
Tidier - a simple command line tool that helps you make your files tidy up

Tidier - a simple command line tool that helps you make your files tidy up

AmirMohammad Hosseini Nasab 8 Aug 16, 2022
Command line, configuration and persistence utilities

Zensols Utilities Command line, configuration and persistence utilities generally used for any more than basic application. This general purpose libra

Paul Landes 2 Nov 17, 2022
This is the public repo for the VS Code Extension AT&T i386/IA32 UIUC-ECE391 Syntax Highlighting

AT&T i386 IA32 UIUC ECE391 GCC Highlighter & Snippet & Linter This is the VS Code Extension for UIUC ECE 391, MIT 6.828, and all other AT&T-based i386

Jackgetup 1 Feb 05, 2022
Python CLI utility and library for manipulating SQLite databases

sqlite-utils Python CLI utility and library for manipulating SQLite databases. Some feature highlights Pipe JSON (or CSV or TSV) directly into a new S

Simon Willison 1.1k Jan 04, 2023
organize your books on the command line

organize your books on the command line

Ben Winston 19 Jan 21, 2022
instant coding answers via the command line

howdoi instant coding answers via the command line Sherlock, your neighborhood command-line sloth sleuth. Are you a hack programmer? Do you find yours

Benjamin Gleitzman 9.8k Jan 08, 2023
A command-line utility that, given a markdown file, checks whether all its links work.

A command-line utility written in Python that checks validity of links in a markdown file.

Teclado 2 Dec 08, 2021
Todo - You could use terminal to set your todo

Python Tutorial You can learn how to build a terminal application(CLI applicatio

29 Jun 29, 2022
Wordle-cli - Command-line clone of Josh Wardle's WORDLE

Command-line clone of Josh Wardle's WORDLE, inspired by Paul Battley's Ruby vers

Klipspringer 32 Jan 03, 2023
Tstock - Check stocks from the terminal

tstock - Check stocks from the terminal! 📈 tstock is a tool to easily generate stock charts from the command line. Just type tstock aapl to get a 3 m

Gabe Banks 502 Dec 30, 2022
Notion-cli-list-manager - A simple command-line tool for managing Notion databases

A simple command-line tool for managing Notion List databases. ✨

Giacomo Salici 75 Dec 04, 2022