Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mcjkula/time-dilation-calculator

A calculator for computing the lorentz-factor and time dilation of objects moving near the speed of light written in Python using Flet.
https://github.com/mcjkula/time-dilation-calculator

calculator physics time-dilation

Last synced: 2 months ago
JSON representation

A calculator for computing the lorentz-factor and time dilation of objects moving near the speed of light written in Python using Flet.

Awesome Lists containing this project

README

        


Time Dilation Calculator

# Time Dilation Calculator

This repository contains a Time Dilation Calculator built with `Flet`. It allows users to input a velocity and calculate the lorentz-factor and dilated time based on the given proper time.

## Technologies Used

- Framework: [flet](https://github.com/flet-dev/flet) (Flet enables developers to easily build realtime web, mobile and desktop apps in Python).

## Features

### Lorentz Factor Calculation
- Users can input the velocity of an object and the speed of light to calculate the lorentz-factor.
- Supports various units of velocity including km/s, % of c, m/s, and km/h.

### Time Dilation Calculation
- Calculates the dilated time based on the given proper time and the calculated lorentz-factor.
- Displays the lorentz-factor and dilated time.

### Lorentz Factor Visualization
- Visualizes the Lorentz Factor using the Phytagoras Theorem.
- Represents the typical Lorentz Factor/Time Dilation curve in a new way, to better see the current state of dilated time.



## Requirements

To run and use the Time Dilation Calculator, you need the following:

- `flet` framework installed.
- Python 3.10 (Because of the Match-Case)

## Usage

1. Clone this repository.
2. Ensure all requirements are met.
3. Run the script.

```bash
python main.py
```

## Future Plans
- Implement error handling for invalid input values.
- Provide additional information on lorentz-factor and time dilation within the app.
- ~~Include visualizations to better illustrate the concept of time dilation.~~ (Done)

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. [Maciej Kula](https://github.com/mcjkula).