A toolkit of geometry and physics formulas
Project description
📦 Formulix
Formulix is a powerful and easy-to-use Python package that provides a collection of tools and utilities for solving problems in Geometry, Physics, Chemistry, Mathematics, Plotting, and Unit Conversions.
It's perfect for students, educators, and developers building science-related applications.
🚀 Features
📐 Geometry (shapes.py)
-
Area Calculations:
rectangle_area(length, breadth)square_area(side)circle_area(radius)rhombus_area(diagonal1, diagonal2)triangle_area(base, height)eq_triangle_area(side)(Equilateral triangle)parallelogram_area(base, height)trapezium_area(base1, base2, height)heron_area(a, b, c)(Heron's formula for triangles)
-
Perimeter/Circumference Calculations:
rectangle_perimeter(length, breadth)square_perimeter(side)triangle_perimeter(a, b, c)circle_circumference(radius)rhombus_perimeter(side)parallelogram_perimeter(base, side)trapezium_perimeter(a, b, c, d)
-
Volume Calculations:
cube_volume(side)cuboid_volume(length, breadth, height)cylinder_volume(radius, height)cone_volume(radius, height)sphere_volume(radius)
-
Other Geometric Functions:
pythagoras_hypotenuse(a, b)pythagoras_missing_side(hypotenuse, side)triangle_median(a, b, c)
🧲 Physics (physics.py)
speed(distance, time)distance(speed, time)time(distance, speed)acceleration(final_velocity, initial_velocity, time)force(mass, acceleration)weight(mass, gravity=9.8)
⚗️ Chemistry (chem.py)
get_element(symbol)- Get element by symbolget_atomic_mass(symbol)- Get atomic massget_atomic_number(symbol)- Get atomic numberget_name(symbol)- Get element nameget_density(symbol)- Get element densitydescribe_element(symbol)- Returns dictionary with all element properties
📊 Plotting (plot.py)
plot_equation(equation, x_range=(-10, 10), title="Equation Plot")- Plot a single equationplot_multiple(equations, x_range=(-10, 10), title="Multiple Equations Plot")- Plot multiple equations
🔢 Equation Solver (eq_solver.py)
solve_equation(equation_str, var='x')- Solves single-variable equationssimplify_expression(expr_str)- Simplifies mathematical expressions
🔁 Unit Conversions (conversions.py)
convert_length(value, from_unit, to_unit)convert_mass(value, from_unit, to_unit)convert_time(value, from_unit, to_unit)convert_temperature(value, from_unit, to_unit)convert_volume(value, from_unit, to_unit)convert_speed(value, from_unit, to_unit)
📦 Installation
pip install Formulix
✅ Example Usage
from Formulix import (
rectangle_area, force, get_element,
solve_equation, plot_equation, convert_temperature
)
print(rectangle_area(10, 5)) # 50
print(force(10, 2)) # 20
print(get_element("H").mass) # 1.00794
print(solve_equation("x**2 - 4 = 0")) # [2, -2]
plot_equation("x**2 + 2*x + 1") # Shows a plot
print(convert_temperature(0, 'C', 'F')) # 32.0
🧪 Requirements
numpymatplotlibsympyperiodictable
All are installed automatically with pip.
📬 Author
Darsh Nayak Das
9th Grade Student & Science Coder 💡
📄 License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file formulix-1.1.tar.gz.
File metadata
- Download URL: formulix-1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef5a6857fcbea21ec6052833f204313ccfab019aa7792a876e2afb4d87973d1c
|
|
| MD5 |
4db5aa7c227b4f04b50ef7df981b3b89
|
|
| BLAKE2b-256 |
1a01725ab09c25e788acccee99990908626f40e844e486e5796c78f54ea98600
|
File details
Details for the file formulix-1.1-py3-none-any.whl.
File metadata
- Download URL: formulix-1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f0b6c559540f7f9da764f0d3f459bd91307d0af3fe2e9a6acf0a34318cfff9a
|
|
| MD5 |
88caf8cd961015909a2f16f51a13024d
|
|
| BLAKE2b-256 |
301f8c4744e32394c113968616a65fbabb792a2c832c08019afb9ce1f8069d6f
|