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.0.tar.gz (5.0 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.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for formulix-1.0.tar.gz
Algorithm Hash digest
SHA256 6d98b950967e11c34479553147bd7604594817b35f4a4383a8eaff45cc98f19f
MD5 74aac5be7adcacdf42531a5af994eaab
BLAKE2b-256 65b74c0ce029e883f452c5c4404c2993cd567cdd5683401fb9d6c74dd39ec59d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: formulix-1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 490b821d8422957234148016e0204b7530c7eb18e28b972399ab8d1ae651b3f0
MD5 7176898cad89a468c54c0dd4a8826769
BLAKE2b-256 151267ee36cd2ff71b1762348f1fd52bcdbfc35ae6fd0d8c58f9d09b59ae05d1

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