Skip to main content

A simple Python package for visualizing the Lorenz attractor, a classic example of a chaotic system in dynamical systems theory.

Project description

Lorenz

Lorenz provides simple utilities to generate and plot Lorenz system trajectories (the classic "butterfly" attractor).

Install

pip install lorenz

Quick start

from lorenz import LorenzButterfly

lorenz = LorenzButterfly()
ax = lorenz.plot()

API

LorenzButterfly

Generate Lorenz system data and plot trajectories.

from lorenz import LorenzButterfly

lorenz = LorenzButterfly(sigma=10.0, rho=28.0, beta=8.0 / 3.0)

# Generate data as a pandas DataFrame
frame = lorenz.generate_data(steps=5000, dt=0.01)

# Plot the trajectory (matplotlib 3D axes)
ax = lorenz.plot(steps=5000, dt=0.01)

Parameters

  • sigma: Prandtl number controlling horizontal convection strength
  • rho: Rayleigh number controlling temperature gradient/chaos level
  • beta: geometry factor (often 8/3 for the classic system)
  • dt: integration time step
  • steps: number of integration steps
  • initial: starting point (x, y, z)

Methods

  • generate_data(...) returns a pandas.DataFrame with columns x, y, z
  • plot(...) returns a matplotlib.axes.Axes instance

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

lorenz-1.0.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

lorenz-1.0.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file lorenz-1.0.0.tar.gz.

File metadata

  • Download URL: lorenz-1.0.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lorenz-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ea64a9139db58558abf57e3b3069269305aabf1cf47f16b72c24b52c1333a0aa
MD5 9b6aab2628e58cf6bacd7e4826b0946b
BLAKE2b-256 1bf7fa416432b71e6378b230bdb7146399de0e34365fd08ae6d0f9a829ca500c

See more details on using hashes here.

Provenance

The following attestation bundles were made for lorenz-1.0.0.tar.gz:

Publisher: publish-to-pypi.yml on gperdrizet/simple-python-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lorenz-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lorenz-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lorenz-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72a839b1e432e7257c9ffbaf801076e735c23e5f8a1de56f36d276fff0904238
MD5 99ecbf114b9ed49a7e2062a8baf3083f
BLAKE2b-256 8f32be53a90baf69e10f4c5318b15e923dd1391210e0194c5365ab03c2b2cd6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for lorenz-1.0.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on gperdrizet/simple-python-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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