Skip to main content

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 symbol
  • get_atomic_mass(symbol) - Get atomic mass
  • get_atomic_number(symbol) - Get atomic number
  • get_name(symbol) - Get element name
  • get_density(symbol) - Get element density
  • describe_element(symbol) - Returns dictionary with all element properties

📊 Plotting (plot.py)

  • plot_equation(equation, x_range=(-10, 10), title="Equation Plot") - Plot a single equation
  • plot_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 equations
  • simplify_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

  • numpy
  • matplotlib
  • sympy
  • periodictable

All are installed automatically with pip.


📬 Author

Darsh Nayak Das

darsh.nayak@outlook.com

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

formulix-1.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

formulix-1.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file formulix-1.2.tar.gz.

File metadata

  • Download URL: formulix-1.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for formulix-1.2.tar.gz
Algorithm Hash digest
SHA256 265f36798863427bfa1a242c25f511ace489f7850ecd5da5ba4660cea6ca3e91
MD5 8a37f9cceeee05805a64206fa82e5835
BLAKE2b-256 a0d23b7c9313e5c3a81d35723f11f7781713672cef395f7e5daf4e9dd7c90a7b

See more details on using hashes here.

File details

Details for the file formulix-1.2-py3-none-any.whl.

File metadata

  • Download URL: formulix-1.2-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

Hashes for formulix-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d41873faffb4df7ac50c191cb645bf1b45c29025c2678f36cb778e1a91127ec1
MD5 c383fd4b532082036c5774685144475c
BLAKE2b-256 81b7250e802e17e71f44f8f91f4a2de3f53728af6db356dc8aa1d0bd07c45175

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page