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.
- A dedicated website hosting presentations about data structures, all created using dastimator.
- Explore the presentations and their source code here.
- 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.
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 are welcome! Feel free to:
- Submit issues.
- Fork the project.
This project is licensed under the MIT License.
- Built using the Manim library.
- Special thanks to the students of HUJI for inspiring the project.