Skip to content

A Python library to create animations and tools for teaching data structures, along with the Dastflix website.

Notifications You must be signed in to change notification settings

shlomi-perles/dastimator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dastimator 📚🎥

Dastimator is a Python library built on the powerful Manim library, designed to assist in teaching data structures in an engaging and visual way. Initially developed for use in the Data Structures course at The Hebrew University of Jerusalem (HUJI), dastimator simplifies the creation of programmatic animations for educational purposes.


Features 🚀

  • A dedicated website hosting presentations about data structures, all created using dastimator.
  • Explore the presentations and their source code here.

🛠️ Library Tools

  • A suite of tools that extends Manim's core functionality to simplify the creation of visualizations.
  • Includes modules for handling and animating data structures like arrays, graphs, etc.

Example Usage ✍️

Here's a sample snippet showcasing how to create and animate an array:

from tools.array import *
from tools.consts import *
from tools.scenes import *


class ArrayExample(SectionsScene):
    def construct(self):
        self.next_section("arr", pst.NORMAL)
        array = ArrayMob("Array:", "", "8", "1", "3", "9", show_indices=True, indices_pos=DOWN, starting_index=1)
        array.scale_to_fit_width(config.frame_width * 0.6)
        self.play(Write(array))
        self.play(array.animate.at(1, "b"))
        self.play(array.animate.at(1, 3))
        self.play(array.indicate_at(3))
        self.play(array.push(5))
        self.play(array.pop(4))
        self.play(array.swap(1, 3))

        pointer = ArrayPointer(array, 1, "Here", direction=0.4 * DOWN)
        self.play(Write(pointer))
        self.play(pointer.to_entry(5))

        self.wait(2)
ArrayExample.mp4

Contributions 🤝

Contributions are welcome! Feel free to:

  • Submit issues.
  • Fork the project.

License 📜

This project is licensed under the MIT License.


Acknowledgments 🌟

  • Built using the Manim library.
  • Special thanks to the students of HUJI for inspiring the project.

About

A Python library to create animations and tools for teaching data structures, along with the Dastflix website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published