manim-dsa


Namemanim-dsa JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/F4bbi/manim-dsa
SummaryA Manim plugin to animate common data structures.
upload_time2024-08-30 20:08:44
maintainerNone
docs_urlNone
authorFabio Missagia
requires_python<3.13,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <a><img src="https://github.com/user-attachments/assets/7d18b40d-e455-4d2d-8a86-39b16401bbf0" width="525" height="300"></a>
    <br />
    <br />
    <a href="https://pypi.org/project/manim-dsa/"><img src="" alt="PyPI Latest Release"></a>
    <a href="http://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/license-MIT-red.svg?style=flat" alt="MIT License"></a>
    <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
    <a href="https://pepy.tech/project/manim-dsa"><img src="https://pepy.tech/badge/manim-dsa" alt="Downloads"> </a>
    <br />
    <br />
    <i>A Manim plugin designed to animate common data structures and algorithms</i>
</p>
<hr />

**Manim DSA**, short for *Manim Data Structures & Algorithms*, is a [Manim](https://www.manim.community/) plugin designed to animate common data structures and algorithms. Whether you are an educator looking to enhance your lectures, a student seeking to better understand these concepts, or a content creator making educational videos, Manim DSA provides a robust toolkit to bring abstract concepts to life.

## Table of Contents:

-  [Installation](#installation)
-  [Importing](#importing)
-  [Usage](#usage)
-  [Documentation](#documentation)
-  [Help with Manim DSA](#help-with-manim-dsa)
-  [Contributing](#contributing)
-  [License](#license)

## Installation

To install Manim DSA, you can use `pip`:

```bash
pip install manim-dsa
```

If you don't have Manim installed, please refer to the [official Manim documentation](https://docs.manim.community/en/stable/installation.html) for installation instructions.

## Importing

Simply use the following line of code to import the package:

```py
from manim_dsa import *
```

## Usage

The following is an example `Scene` where an array, a stack and a graph are created.

```python
from manim import *
from manim_dsa import *

class Example(Scene):
    def construct(self):
        graph = {
            'A': [('C', 11), ('D', 7)],
            'B': [('A', 5),  ('C', 3)],
            'C': [('A', 11), ('B', 3)],
            'D': [('A', 7),  ('C', 4)],
        }
        nodes_and_positions = {
            'A': LEFT * 1.5,
            'B': UP * 2,
            'C': RIGHT * 1.5,
            'D': DOWN * 2,
        }

        mArray = (
            MArray([1, 2, 3], style=ArrayStyle.BLUE)
            .add_indexes()
            .scale(0.9)
            .add_label(Text("Array", font="Cascadia Code"))
            .to_edge(LEFT, 1)
        )

        mStack = (
            MStack([3, 7, 98, 1], style=StackStyle.GREEN)
            .scale(0.8)
            .add_label(Text("Stack", font="Cascadia Code"))
            .move_to(ORIGIN)
        )

        mGraph = (
            MGraph(graph, nodes_and_positions, GraphStyle.PURPLE)
            .add_label(Text("Graph", font="Cascadia Code"))
            .to_edge(RIGHT, 1)
        )

        self.play(Create(mArray))
        self.play(Create(mStack))
        self.play(Create(mGraph))
        self.wait()
```

The result is as follows:

https://github.com/user-attachments/assets/05307dc9-65d9-4262-ae32-3fb53068c8e4

## Documentation

Work in progess.

## Help with Manim DSA

If you need help installing or using Manim DSA, or you need to submit a bug report or feature request, please open an issue.

## Contributing

Contributions are welcome! Whether it’s reporting a bug, suggesting new features, or submitting pull requests, any help is greatly appreciated.

## How to Cite Manim DSA

To demonstrate the value of Manim DSA, we ask that you cite Manim DSA in your work. Currently, the best way to cite Manim DSA is to go to the [repository page](https://github.com/F4bbi/manim-dsa) (if you aren't already) and click the "cite this repository" button on the right sidebar. This will generate a citation in your preferred format, and will also integrate well with citation managers.
For guidance on how to properly cite Manim, please refer to the [Manim GitHub page](https://github.com/ManimCommunity/manim/blob/main/README.md#how-to-cite-manim).

## License

Manim DSA is licensed under the MIT License. You are free to use, modify, and distribute this software as long as you include the original license.

## Acknowledgements

- **[Manim Community](https://www.manim.community/)**: For creating and maintaining the amazing Manim library.
- **[drageelr](https://github.com/drageelr/manim-data-structures)**: For the inspiration behind the array implementation.
- **[Verdiana Pasqualini](https://verdianapasqualini.github.io/ManimGraphLibrary)**: For the inspiration behind the graph implementation.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/F4bbi/manim-dsa",
    "name": "manim-dsa",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Fabio Missagia",
    "author_email": "fabio.missagia@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/35/6f/aa311bb001d4041f44b293d62f50a3e90c16e11a5fd1da7c59a0fc2ddb08/manim_dsa-0.1.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <a><img src=\"https://github.com/user-attachments/assets/7d18b40d-e455-4d2d-8a86-39b16401bbf0\" width=\"525\" height=\"300\"></a>\n    <br />\n    <br />\n    <a href=\"https://pypi.org/project/manim-dsa/\"><img src=\"\" alt=\"PyPI Latest Release\"></a>\n    <a href=\"http://choosealicense.com/licenses/mit/\"><img src=\"https://img.shields.io/badge/license-MIT-red.svg?style=flat\" alt=\"MIT License\"></a>\n    <a href=\"https://github.com/psf/black\"><img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Code style: black\">\n    <a href=\"https://pepy.tech/project/manim-dsa\"><img src=\"https://pepy.tech/badge/manim-dsa\" alt=\"Downloads\"> </a>\n    <br />\n    <br />\n    <i>A Manim plugin designed to animate common data structures and algorithms</i>\n</p>\n<hr />\n\n**Manim DSA**, short for *Manim Data Structures & Algorithms*, is a [Manim](https://www.manim.community/) plugin designed to animate common data structures and algorithms. Whether you are an educator looking to enhance your lectures, a student seeking to better understand these concepts, or a content creator making educational videos, Manim DSA provides a robust toolkit to bring abstract concepts to life.\n\n## Table of Contents:\n\n-  [Installation](#installation)\n-  [Importing](#importing)\n-  [Usage](#usage)\n-  [Documentation](#documentation)\n-  [Help with Manim DSA](#help-with-manim-dsa)\n-  [Contributing](#contributing)\n-  [License](#license)\n\n## Installation\n\nTo install Manim DSA, you can use `pip`:\n\n```bash\npip install manim-dsa\n```\n\nIf you don't have Manim installed, please refer to the [official Manim documentation](https://docs.manim.community/en/stable/installation.html) for installation instructions.\n\n## Importing\n\nSimply use the following line of code to import the package:\n\n```py\nfrom manim_dsa import *\n```\n\n## Usage\n\nThe following is an example `Scene` where an array, a stack and a graph are created.\n\n```python\nfrom manim import *\nfrom manim_dsa import *\n\nclass Example(Scene):\n    def construct(self):\n        graph = {\n            'A': [('C', 11), ('D', 7)],\n            'B': [('A', 5),  ('C', 3)],\n            'C': [('A', 11), ('B', 3)],\n            'D': [('A', 7),  ('C', 4)],\n        }\n        nodes_and_positions = {\n            'A': LEFT * 1.5,\n            'B': UP * 2,\n            'C': RIGHT * 1.5,\n            'D': DOWN * 2,\n        }\n\n        mArray = (\n            MArray([1, 2, 3], style=ArrayStyle.BLUE)\n            .add_indexes()\n            .scale(0.9)\n            .add_label(Text(\"Array\", font=\"Cascadia Code\"))\n            .to_edge(LEFT, 1)\n        )\n\n        mStack = (\n            MStack([3, 7, 98, 1], style=StackStyle.GREEN)\n            .scale(0.8)\n            .add_label(Text(\"Stack\", font=\"Cascadia Code\"))\n            .move_to(ORIGIN)\n        )\n\n        mGraph = (\n            MGraph(graph, nodes_and_positions, GraphStyle.PURPLE)\n            .add_label(Text(\"Graph\", font=\"Cascadia Code\"))\n            .to_edge(RIGHT, 1)\n        )\n\n        self.play(Create(mArray))\n        self.play(Create(mStack))\n        self.play(Create(mGraph))\n        self.wait()\n```\n\nThe result is as follows:\n\nhttps://github.com/user-attachments/assets/05307dc9-65d9-4262-ae32-3fb53068c8e4\n\n## Documentation\n\nWork in progess.\n\n## Help with Manim DSA\n\nIf you need help installing or using Manim DSA, or you need to submit a bug report or feature request, please open an issue.\n\n## Contributing\n\nContributions are welcome! Whether it\u2019s reporting a bug, suggesting new features, or submitting pull requests, any help is greatly appreciated.\n\n## How to Cite Manim DSA\n\nTo demonstrate the value of Manim DSA, we ask that you cite Manim DSA in your work. Currently, the best way to cite Manim DSA is to go to the [repository page](https://github.com/F4bbi/manim-dsa) (if you aren't already) and click the \"cite this repository\" button on the right sidebar. This will generate a citation in your preferred format, and will also integrate well with citation managers.\nFor guidance on how to properly cite Manim, please refer to the [Manim GitHub page](https://github.com/ManimCommunity/manim/blob/main/README.md#how-to-cite-manim).\n\n## License\n\nManim DSA is licensed under the MIT License. You are free to use, modify, and distribute this software as long as you include the original license.\n\n## Acknowledgements\n\n- **[Manim Community](https://www.manim.community/)**: For creating and maintaining the amazing Manim library.\n- **[drageelr](https://github.com/drageelr/manim-data-structures)**: For the inspiration behind the array implementation.\n- **[Verdiana Pasqualini](https://verdianapasqualini.github.io/ManimGraphLibrary)**: For the inspiration behind the graph implementation.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Manim plugin to animate common data structures.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/F4bbi/manim-dsa",
        "Repository": "https://github.com/F4bbi/manim-dsa"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8fc0369ed7d63bc2ec71b7b668516eaab9db787101b4482b7971f5f5d0dc6927",
                "md5": "f5571d89185e3a3ec4c282627e829319",
                "sha256": "9f1bca774ef2fc0a0bca479092259bd8be9577c4dad42357090af42684ba7fa9"
            },
            "downloads": -1,
            "filename": "manim_dsa-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5571d89185e3a3ec4c282627e829319",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 19724,
            "upload_time": "2024-08-30T20:08:31",
            "upload_time_iso_8601": "2024-08-30T20:08:31.304364Z",
            "url": "https://files.pythonhosted.org/packages/8f/c0/369ed7d63bc2ec71b7b668516eaab9db787101b4482b7971f5f5d0dc6927/manim_dsa-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "356faa311bb001d4041f44b293d62f50a3e90c16e11a5fd1da7c59a0fc2ddb08",
                "md5": "8d3ea8301c96d95f209e7f58d9f41ae6",
                "sha256": "a996bb8cd1b4232a6aa6e28f2d84e26861433e3531540cfdd5f275b05b9fa64b"
            },
            "downloads": -1,
            "filename": "manim_dsa-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8d3ea8301c96d95f209e7f58d9f41ae6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 17319,
            "upload_time": "2024-08-30T20:08:44",
            "upload_time_iso_8601": "2024-08-30T20:08:44.915111Z",
            "url": "https://files.pythonhosted.org/packages/35/6f/aa311bb001d4041f44b293d62f50a3e90c16e11a5fd1da7c59a0fc2ddb08/manim_dsa-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-30 20:08:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "F4bbi",
    "github_project": "manim-dsa",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "manim-dsa"
}
        
Elapsed time: 0.80372s