Skip to content

Commit

Permalink
Merge pull request #5 from manim-kindergarten/homework
Browse files Browse the repository at this point in the history
Add DocStrings in mobject and remove TODO flag
  • Loading branch information
TonyCrane authored Jun 30, 2020
2 parents ad40f11 + 4798b79 commit 4d0004d
Show file tree
Hide file tree
Showing 20 changed files with 474 additions and 42 deletions.
10 changes: 10 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,13 @@ def construct(self):
self.wait()
self.play(CyclicReplace(A, B)) # 或Swap(A, B)
self.wait()

class ShowPassingFlashWithThinningStrokeWidthExample(Scene):
def construct(self):
sl = StreamLines(
lambda p: rotate_vector(p / 3, 90 * DEGREES)
)
self.add(sl)
self.wait()
self.play(ShowPassingFlashWithThinningStrokeWidth(sl))
self.wait()
Binary file not shown.
2 changes: 1 addition & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
author = '鹤翔万里 & Tridu33' # 这个整合版本借鉴了很多已有的网友/群友资料,具体链接文中都已经标识引用。


version = '0.3.0'
version = '0.4.0'
release = 'v0.2' #我想把这里标识为文档

# -- General configuration --
Expand Down
22 changes: 12 additions & 10 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ manim教程文档

.. image:: assets/image/DocumentHeader.png

这些文档基于 `3b1b/manim存储库 <https://github.com/3b1b/manim>`_ 的master分支,你可以通过提交pr来为文档做出贡献
这些文档基于 `3b1b/manim存储库 <https://github.com/3b1b/manim>`_ 的master分支,你可以通过提交pr来为文档做出贡献,详见 `贡献规则及编写指南页面 <https://manim.ml/contribution>`__

.. admonition:: 声明
目前包含两大部分, **入门教程** 和 **进阶文档** 。入门教程中还有很多需要完善,进阶文档还需要补充示例。后续可能还会添加 **进阶教程** 部分

这是MK成员根据EulerTour写的 `eulertour-docs <https://www.eulertour.com/docs/>`_ 中文翻译和很多manim教程的学习笔记(教程文档)
.. admonition:: 声明

manim的工程样例已经很多了,比如3b1b的旧项目,或者 `Elteoremadebeethoven的项目 <https://github.com/Elteoremadebeethoven/MyAnimations>`_
`elteoremadebeethoven-manim_3feb_docs <https://github.com/Elteoremadebeethoven/manim_3feb_docs.github.io/tree/master/source>`_
Elteoremadebeethoven的代码仓库和配套的YouTube教学视频 `Animation-course-with-Manim <https://github.com/Elteoremadebeethoven/AnimationsWithManim>`_
B站上有搬运 `BV1W4411Z7Zt <https://www.bilibili.com/video/BV1W4411Z7Zt>`_
这是MK成员根据整合了很多零散教程文档和原创补充编写的manim教程,来源主要有以下:

- EulerTour写的 `文档 <https://www.eulertour.com/docs/>`__
- Elteoremadebeethoven的 `manim 3feb 文档 <https://github.com/Elteoremadebeethoven/manim_3feb_docs.github.io/tree/master/source>`_
- Elteoremadebeethoven的 `代码仓库 <https://github.com/Elteoremadebeethoven/AnimationsWithManim>`__ 和配套的YouTube教学视频 (B站上有搬运 `BV1W4411Z7Zt <https://www.bilibili.com/video/BV1W4411Z7Zt>`_ )
- cai-hust的学习笔记 `cai-hust_manim-tutorial-CN <https://github.com/cai-hust/manim-tutorial-CN>`__
- mk成员原创编写补充

然后cai-hust学习并且做了相关的教程笔记,放在了GitHub上 `cai-hust_manim-tutorial-CN <https://github.com/cai-hust/manim-tutorial-CN>`_
不是原创部分会标注来源,这里把相关资料翻译,分享学习笔记心得和一些技巧,以方便使用manim。如果来源有疏漏,欢迎提出issue指出

不是原创部分都会标注清晰来源,只是想把相关资料整合编辑成方便的文档格式,顺便学习笔记心得和一些技巧,以方便查阅使用manim
用到的都会标明来源。虽然已经很注意每个记笔记来源都保持原有链接,但是可能有疏漏,如果你看到忘记标明出处的,请帮忙标注一下,谢谢
**那么,祝大家好运ღ( ´・ᴗ・` )**

.. toctree::
:maxdepth: 2
Expand Down
15 changes: 13 additions & 2 deletions source/mobject/changing.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
Changing(TODO)
==============
Changing
==============

AnimatedBoundary
******************
.. autoclass:: manimlib.mobject.changing.AnimatedBoundary
:members:


TracedPath
******************
.. autoclass:: manimlib.mobject.changing.TracedPath
:members:
29 changes: 27 additions & 2 deletions source/mobject/coordinate_systems.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
CoordinateSystems(TODO)
=======================
CoordinateSystems
=======================

CoordinateSystem
******************
.. autoclass:: manimlib.mobject.coordinate_systems.CoordinateSystem
:members:

Axes
******************
.. autoclass:: manimlib.mobject.coordinate_systems.Axes
:members:

ThreeDAxes
******************
.. autoclass:: manimlib.mobject.coordinate_systems.ThreeDAxes
:members:

NumberPlane
******************
.. autoclass:: manimlib.mobject.coordinate_systems.NumberPlane
:members:

ComplexPlane
******************
.. autoclass:: manimlib.mobject.coordinate_systems.ComplexPlane
:members:
24 changes: 22 additions & 2 deletions source/mobject/frame.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
Frame(TODO)
===========
Frame
===========

ScreenRectangle
******************
.. autoclass:: manimlib.mobject.frame.ScreenRectangle
:members:

FullScreenRectangle
******************
.. autoclass:: manimlib.mobject.frame.FullScreenRectangle


FullScreenFadeRectangle
******************
.. autoclass:: manimlib.mobject.frame.FullScreenFadeRectangle


PictureInPictureFrame
******************
.. autoclass:: manimlib.mobject.frame.PictureInPictureFrame
:members:
14 changes: 12 additions & 2 deletions source/mobject/functions.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
Functions(TODO)
===============
Functions
===============

ParametricFunction
******************
.. autoclass:: manimlib.mobject.functions.ParametricFunction
:members:

FunctionGraph
******************
.. autoclass:: manimlib.mobject.functions.FunctionGraph
:members:
137 changes: 136 additions & 1 deletion source/mobject/geometry.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,137 @@
Geometry
========
===============

TipableVMobject
********************
.. autoclass:: manimlib.mobject.geometry.TipableVMobject
:members:

Arc
********************
.. autoclass:: manimlib.mobject.geometry.Arc
:members:

ArcBetweenPoints
********************
.. autoclass:: manimlib.mobject.geometry.ArcBetweenPoints
:members:

CurvedArrow
********************
.. autoclass:: manimlib.mobject.geometry.CurvedArrow
:members:

CurvedDoubleArrow
********************
.. autoclass:: manimlib.mobject.geometry.CurvedDoubleArrow
:members:

Circle
********************
.. autoclass:: manimlib.mobject.geometry.Circle
:members:

Dot
********************
.. autoclass:: manimlib.mobject.geometry.Dot
:members:

SmallDot
********************
.. autoclass:: manimlib.mobject.geometry.SmallDot
:members:

Ellipse
********************
.. autoclass:: manimlib.mobject.geometry.Ellipse
:members:

AnnularSector
********************
.. autoclass:: manimlib.mobject.geometry.AnnularSector
:members:

Sector
********************
.. autoclass:: manimlib.mobject.geometry.Sector
:members:

Annulus
********************
.. autoclass:: manimlib.mobject.geometry.Annulus
:members:

Line
********************
.. autoclass:: manimlib.mobject.geometry.Line
:members:

DashedLine
********************
.. autoclass:: manimlib.mobject.geometry.DashedLine
:members:

TangentLine
********************
.. autoclass:: manimlib.mobject.geometry.TangentLine
:members:

Elbow
********************
.. autoclass:: manimlib.mobject.geometry.Elbow
:members:

Arrow
********************
.. autoclass:: manimlib.mobject.geometry.Arrow
:members:

Vector
********************
.. autoclass:: manimlib.mobject.geometry.Vector
:members:

DoubleArrow
********************
.. autoclass:: manimlib.mobject.geometry.DoubleArrow
:members:

CubicBezier
********************
.. autoclass:: manimlib.mobject.geometry.CubicBezier
:members:

Polygon
********************
.. autoclass:: manimlib.mobject.geometry.Polygon
:members:

RegularPolygon
********************
.. autoclass:: manimlib.mobject.geometry.RegularPolygon
:members:

Triangle
********************
.. autoclass:: manimlib.mobject.geometry.Triangle
:members:

ArrowTip
********************
.. autoclass:: manimlib.mobject.geometry.ArrowTip
:members:

Rectangle
********************
.. autoclass:: manimlib.mobject.geometry.Rectangle
:members:

Square
********************
.. autoclass:: manimlib.mobject.geometry.Square
:members:

RoundedRectangle
********************
.. autoclass:: manimlib.mobject.geometry.RoundedRectangle
:members:
4 changes: 2 additions & 2 deletions source/mobject/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
物体部分mobject(TODO)
物体部分mobject
======================

.. admonition:: 声明

这一部分全为鹤翔万里原创编写
这一部分全为鹤翔万里与數心原创编写,目前示例部分还没有完成

:class:`~mobject.mobject.Mobject` 是屏幕中出现的所有物体的超类。

Expand Down
28 changes: 26 additions & 2 deletions source/mobject/matrix.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
Matrix(TODO)
============
Matrix
============

Matrix
******************
.. autoclass:: manimlib.mobject.matrix.Matrix
:members:

DecimalMatrix
******************
.. autoclass:: manimlib.mobject.matrix.DecimalMatrix


IntegerMatrix
******************
.. autoclass:: manimlib.mobject.matrix.IntegerMatrix


MobjectMatrix
******************
.. autoclass:: manimlib.mobject.matrix.MobjectMatrix


------

.. autofunction:: manimlib.mobject.matrix.get_det_text
38 changes: 36 additions & 2 deletions source/mobject/mobject_update_utils.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
MobjectUpdateUtils(TODO)
========================
MobjectUpdateUtils
========================

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.assert_is_mobject_method

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.always

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.f_always

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.always_redraw

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.always_shift

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.always_rotate

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.turn_animation_into_updater

-----

.. autofunction:: manimlib.mobject.mobject_update_utils.cycle_animation

-----
14 changes: 12 additions & 2 deletions source/mobject/number_line.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
NumberLine(TODO)
================
NumberLine
================

NumberLine
**********************
.. autoclass:: manimlib.mobject.number_line.NumberLine
:members:

UnitInterval
**********************
.. autoclass:: manimlib.mobject.number_line.UnitInterval
:members:
Loading

0 comments on commit 4d0004d

Please sign in to comment.