https://github.com/viig99/maze_animation_exp
Solve and animate maze solutions using manim.
https://github.com/viig99/maze_animation_exp
animation manim
Last synced: 8 months ago
JSON representation
Solve and animate maze solutions using manim.
- Host: GitHub
- URL: https://github.com/viig99/maze_animation_exp
- Owner: viig99
- Created: 2025-01-03T16:13:57.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-03T16:17:33.000Z (9 months ago)
- Last Synced: 2025-01-03T17:23:51.258Z (9 months ago)
- Topics: animation, manim
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Animation Experiment
Generate a maze with wall and target's and find the point from which the distance to all targets is minimized.
Animation done using [manim](https://www.manim.community/)## Generate Scene
```bash
manim -pqh scene.py AnimateMaze
```## Maze Solver
```bash
python -m lib.solver
```## Animation
### Extras
```bash
convert_mp4_to_gif() {
# Check if correct number of arguments is provided
if [ "$#" -lt 2 ]; then
echo "Usage: convert_mp4_to_gif [fps] [scale_width]"
return 1
fi# Assign arguments to variables
local input_file="$1"
local output_file="$2"
local fps="${3:-15}" # Default to 15 FPS if not provided
local scale_width="${4:-1080}" # Default to 1080 width if not provided# Run the FFmpeg command
ffmpeg -i "$input_file" -vf "fps=${fps},scale=${scale_width}:-1:flags=lanczos" -c:v gif "$output_file"# Check if the command succeeded
if [ $? -eq 0 ]; then
echo "GIF created successfully at: $output_file"
else
echo "An error occurred while creating the GIF."
fi
}convert_mp4_to_gif "media/videos/scene/1080p60/AnimateMaze.mp4" "assets/AnimateMaze.gif" 24 1080
```