Skip to main content

Manim powered complex mappings.

Project description

riemapp

CI Documentation Status pre-commit.ci status codecov discussion

Python Versions Package Version PyPI Downloads License black

riemapp is a fast, easy-to-use, minimal library for Python 3.7+ that aliases manim 0.16.0+ functions for visualising animated and intuitive complex mappings (transformations from the real plane to the complex plane) for various shapes and real-valued functions in two dimensions. It uses a minimum number of dependencies through FFmpeg and pangocairo on Linux.

Users and learners may use riemapp to:

  1. Plot (user-defined)
    • Points
    • Lines
    • Triangles
    • Squares
    • Rectangles
    • Other regular polygons
    • Circles
    • Irregular polygons
    • …and so on
  2. Create smooth, precise animations for plotted figures and map them on the Argand plane according to user-defined complex functions.
  3. Save these animations and play them in the default video player available

Structure

  • Right now, riemapp aliases the geometries provided by manim under riemapp.geometry. Users can either use these alias classes or directly use the MObjects provided by manim.
  • riemapp programatically generates manim animations, and the code for this is available under riemapp.core. All of the information added by a user is passed into a placeholder class which inherits manim.Scene. This class' object is then used to render the animation.

Installation

Install dependencies

FFmpeg

  • Install FFmpeg through their download page or your system's package manager (apt, brew, ...) or clone Saransh-cpp/FFmpeg.
  • Add the bin folder to system path.

pangocairo (Linux systems)

Install libpango1.0-dev if you are on a Linux system -

sudo apt-get update
sudo apt install libpango1.0-dev

Install riemapp

riemapp uses modern Python packaging and can be installed using pip -

python -m pip install riemapp

Usage example

In [1]: import riemapp as rp
Manim Community v0.16.0.post0

In [2]: import numpy as np

In [3]: square = rp.geometry.Square(2.)

In [4]: square
Out[4]: Square(side_length=2.0) (alias for manim.Square)

In [5]: cm = rp.ComplexMap(square, lambda z: np.e ** z)

In [6]: cm
Out[6]: ComplexMap(f=Square(side_length=2.0) (alias for manim.Square), transformation=<lambda>)

In [7]: cm.generate_animation(run_time=2.)
Out[7]: Animate(f=Square(side_length=2.0) (alias for manim.Square), transformation=<lambda>)

In [8]: cm.render(preview=False)

https://user-images.githubusercontent.com/74055102/193077326-2c21cb9e-eb24-473e-b69c-3376f7664ecd.mp4

Contributing

If you want to contribute to riemapp (thanks!), please have a look at our Contributing Guide.

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

riemapp-0.1.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

riemapp-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file riemapp-0.1.0.tar.gz.

File metadata

  • Download URL: riemapp-0.1.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for riemapp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38148795d4fe9a2929b1379d968ffe656e0bc7a152d212c2d1d4a92ff79646b7
MD5 c78903eec4267b95efa80da031efce98
BLAKE2b-256 e82b75ece7853d7928425bbd5fd1f19ae5611f7127b7dc64f6d8cbf08690a156

See more details on using hashes here.

File details

Details for the file riemapp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: riemapp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for riemapp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 597f6f6ab25b957058a51080ee1934f44a49500ae0cc36c3624e42e232a5730b
MD5 08d40e00b0d9d69546203d6966e074f4
BLAKE2b-256 6e2573a6227d8a237f4c9297c0c32524658d59719e73d4abff497cc5ac3ccae4

See more details on using hashes here.

Supported by

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