Skip to main content

Helper functions for symbolic math, matrix visualization, and plotting

Project description

Helper functions for symbolic math, matrix visualization, and plotting

Author: University of Stuttgart, Institute for Structural Mechanics (IBB)
License: BSD3
Version: 0.4.16
Date: Mar 24, 2026

Description

This helper module currently provides 13 specialized functions for symbolic mathematics, matrix visualization, and plotting operations. Designed for SymPy, NumPy, Matplotlib, and Plotly integration in Jupyter Notebooks and Python environments.

Helper Functions

  1. animate - Animate 2D curves from symbolic expressions or datasets
  2. animate_arrow - Animates a moving arrow along a parametric path
  3. combine_plots - Stack multiple Matplotlib/Plotly plots into combined figures
  4. display - Format scalars, vectors, or matrices in LaTeX for display
  5. display_eigen - Compute and display eigenvalues/eigenvectors with LaTeX formatting
  6. display_matrix - Display truncated matrices with optional numerical evaluation
  7. extend_plot - Merge multiple plots side-by-side with horizontal offsets
  8. minimize - General optimization wrapper for symbolic expressions with constraints
  9. newtons_method - Newton-Raphson root finding mirroring Maple's Student[Calculus1][NewtonsMethod] with value, sequence, plot, and animation output
  10. num_int - Numerically integrate symbolic expressions over 1D domains using composite Gauss quadrature
  11. plot_2d - Plot symbolic expressions or datasets in 2D using Matplotlib
  12. plot_3d - Plot symbolic 3D surfaces using Plotly for interactive visualization
  13. plot_arrow - Plot 2D vectors as arrows mirroring Maple's arrow() command, compatible with combine_plots
  14. plot_param_grid - Plot 2D parametric surface grids with control points
  15. symbolic_BSpline - Generate symbolic B-spline basis functions with plotting

Dependencies

  • Python 3.8+
  • numpy, sympy, matplotlib, plotly
  • IPython (for LaTeX rendering)

Quick Start

import IBB_Helper as ibb

# Display matrix
ibb.display_matrix(np.array([[1, 2], [3, 4]]), name="A")

# Show symbolic expression  
ibb.display(sp.sin(x)**2 + sp.cos(x)**2, name="Identity")

# Plot 2D curves
ibb.plot_2d([sp.sin(x), sp.cos(x)], var=(x, (-np.pi, np.pi)))

# Plot 3D surface
ibb.plot_3d(sp.sin(x*y), var=(x, (-2, 2), y, (-2, 2)))

# Plot vectors as arrows
ibb.plot_arrow([G1, G2], colors=["blue", "blue"], labels=["$g_1$", "$g_2$"])

# Newton's method
ibb.newtons_method(x**3 - x - 2, x, 0.5, output="animation", stoppingcriterion="absolute")

Development Status

This is an ongoing project with regular enhancements. Updates might include:

  • New helper functions
  • Performance optimizations
  • Extended compatibility
  • Bug fixes and stability improvements

Notes

  • Optimized for education, research, and technical documentation
  • Seamless SymPy/NumPy integration
  • Enhanced LaTeX formatting for presentations

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ibb_helper-0.4.16.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

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

ibb_helper-0.4.16-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file ibb_helper-0.4.16.tar.gz.

File metadata

  • Download URL: ibb_helper-0.4.16.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ibb_helper-0.4.16.tar.gz
Algorithm Hash digest
SHA256 b03e6eaa3c5746a48b761047350e31d6c005f35ee0c39a11cf15996be16ca227
MD5 ca42844e4b47bd27a8cf3c2ab2056a66
BLAKE2b-256 390cbdc42dc823f0527e82cf82bb9ff928c094b5d7d86cb72175002f75a2dec7

See more details on using hashes here.

File details

Details for the file ibb_helper-0.4.16-py3-none-any.whl.

File metadata

  • Download URL: ibb_helper-0.4.16-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ibb_helper-0.4.16-py3-none-any.whl
Algorithm Hash digest
SHA256 6bdb00686944df10024451916df2becd360d209061f48ec8c359263ab447028a
MD5 93fd5ccd2a9ad5da194b362632b8f2ea
BLAKE2b-256 db7acc4e0afaad2d4e672705dfd513739753a4c510c9370473bcd912a6109332

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