{ "cells": [ { "cell_type": "markdown", "id": "7c29fa9c", "metadata": {}, "source": [ "# Manim (optional)" ] }, { "cell_type": "markdown", "id": "70a27f0e", "metadata": { "slideshow": { "slide_type": "-" }, "tags": [ "remove-cell" ] }, "source": [ "**CS1302 Introduction to Computer Programming**\n", "___" ] }, { "cell_type": "code", "execution_count": 1, "id": "d77a4c80", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Manim Community v0.7.0\n",
"\n",
"\n"
],
"text/plain": [
"Manim Community \u001b[32mv0.\u001b[0m\u001b[32m7.0\u001b[0m\n",
"\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import math\n",
"\n",
"from manim import *\n",
"\n",
"%reload_ext mytutor"
]
},
{
"cell_type": "markdown",
"id": "d1f98ec3",
"metadata": {},
"source": [
"[Manim](https://github.com/3b1b/manim) is a powerful **anim**ation engine for **ma**themetics developed by [3Blue1Brown](https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw). We will use manim to domenstrate how object-oriented programming uses classes and objects to make it create complex animation."
]
},
{
"cell_type": "markdown",
"id": "38162710",
"metadata": {},
"source": [
"## Creating a scene"
]
},
{
"cell_type": "markdown",
"id": "99df536c",
"metadata": {},
"source": [
"**How to create an animation with `manim`?**"
]
},
{
"cell_type": "markdown",
"id": "98c4819e",
"metadata": {},
"source": [
"In jupyter notebook, we can use `%%manim` cell magic:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "00d1bc79",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"