Created
September 2, 2025 03:59
-
-
Save wakusei-meron-/cae0ead5121070f56dbe1404b0f1d4cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 3, | |
| "id": "a6e72175-d428-48bc-9eda-1bc561680286", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "0.19.0\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "import manim as mn\n", | |
| "from manim import *\n", | |
| "\n", | |
| "config.media_width = \"75%\"\n", | |
| "config.verbosity = \"WARNING\"\n", | |
| "\n", | |
| "print(mn.__version__)\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 4, | |
| "id": "4da01b8c-fd4f-4a8f-9afe-dd40de2d441a", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Manim Community <span style=\"color: #008000; text-decoration-color: #008000\">v0.19.0</span>\n", | |
| "\n", | |
| "</pre>\n" | |
| ], | |
| "text/plain": [ | |
| "Manim Community \u001b[32mv0.\u001b[0m\u001b[32m19.0\u001b[0m\n", | |
| "\n" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "name": "stderr", | |
| "output_type": "stream", | |
| "text": [ | |
| " " | |
| ] | |
| }, | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<video src=\"media/jupyter/CircleToSquare@[email protected]\" controls autoplay loop style=\"max-width: 75%;\" >\n", | |
| " Your browser does not support the <code>video</code> element.\n", | |
| " </video>" | |
| ], | |
| "text/plain": [ | |
| "<IPython.core.display.Video object>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "%%manim -qm CircleToSquare\n", | |
| "\n", | |
| "class CircleToSquare(Scene):\n", | |
| " def construct(self):\n", | |
| " blue_circle = Circle(color=BLUE, fill_opacity=0.5)\n", | |
| " green_square = Square(color=GREEN, fill_opacity=0.8)\n", | |
| " self.play(DrawBorderThenFill(green_square))\n", | |
| " self.wait()\n", | |
| " \n", | |
| " self.play(Transform(green_square, blue_circle))\n", | |
| " self.wait()" | |
| ] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Python 3 (ipykernel)", | |
| "language": "python", | |
| "name": "python3" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 3 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython3", | |
| "version": "3.11.9" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment