Skip to content

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

License

Notifications You must be signed in to change notification settings

mcjkula/time-dilation-calculator

Repository files navigation

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 (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.
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 file for details. Maciej Kula.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Languages