-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New sections for the sphinx-example page #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f34c875
# New sections for the sphinx-example page
kolibril13 49a5184
# delete unnecessary test file
kolibril13 2b6519f
# renamed files and removed some unused code
kolibril13 4c889ec
# removed redundant caption
kolibril13 de5fbc7
correct conf file that was changed by accident
kolibril13 4e0708d
Update conf.py
kolibril13 d09060a
Update docs/source/examples/shapes.rst
kolibril13 e87361a
Update docs/source/examples/3d.rst
kolibril13 f6a057d
Update docs/source/examples/advanced_projects.rst
kolibril13 dc337ba
Update docs/source/examples/formulas.rst
kolibril13 50148cf
Update docs/source/examples/camera_settings.rst
kolibril13 ef10ace
Update docs/source/examples/neat_projects.rst
kolibril13 955c6dd
Merge branch 'master' into examples_folder_structure
kolibril13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
3D Scenes | ||
================================= | ||
|
||
.. manim:: Example3DNo1 | ||
:quality: medium | ||
:save_last_frame: | ||
|
||
class Example3DNo1(ThreeDScene): | ||
def construct(self): | ||
axes = ThreeDAxes() | ||
sphere = ParametricSurface( | ||
lambda u, v: np.array([ | ||
1.5 * np.cos(u) * np.cos(v), | ||
1.5 * np.cos(u) * np.sin(v), | ||
1.5 * np.sin(u) | ||
]), v_min=0, v_max=TAU, u_min=-PI / 2, u_max=PI / 2, | ||
checkerboard_colors=[RED_D, RED_E], resolution=(15, 32) | ||
) | ||
self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) | ||
self.add(axes, sphere) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Advanced Projects | ||
================================= | ||
|
||
This page is currently under construction. It will feature a selection of advanced projects built with manim. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Animations | ||
============ | ||
|
||
|
||
Transformations | ||
################# | ||
|
||
Some more examples will come soon here! | ||
|
||
Updaters | ||
########## | ||
|
||
.. manim:: Updater1Example | ||
:quality: medium | ||
|
||
class Updater1Example(Scene): | ||
def construct(self): | ||
curve_reference = Line(ORIGIN, LEFT).set_color(GREEN) | ||
self.add(curve_reference) | ||
|
||
def update_curve(mob, dt): | ||
mob.rotate_about_origin(dt) | ||
|
||
curve2 = Line(ORIGIN, LEFT) | ||
curve2.add_updater(update_curve) | ||
self.add(curve_reference, curve2) | ||
self.wait(PI) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Annotations | ||
================================= | ||
|
||
.. manim:: AnnotateBrace | ||
:quality: medium | ||
:save_last_frame: | ||
|
||
class AnnotateBrace(Scene): | ||
def construct(self): | ||
dot = Dot([0, 0, 0]) | ||
dot2 = Dot([2, 1, 0]) | ||
line = Line(dot.get_center(), dot2.get_center()).set_color(ORANGE) | ||
b1 = Brace(line) | ||
b1text = b1.get_text("Distance") | ||
b2 = Brace(line, direction=line.copy().rotate(PI / 2).get_unit_vector()) | ||
b2text = b2.get_tex("x-x_1") | ||
self.add(dot, dot2, line, b1, b2, b1text, b2text) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Camera Settings | ||
================================= | ||
|
||
.. manim:: TestZoom1 | ||
:quality: medium | ||
|
||
class TestZoom1(ZoomedScene): | ||
CONFIG = { | ||
"zoomed_camera_frame_starting_position": [0, 0, 0], | ||
"zoomed_display_corner": [0, 0, 0], | ||
"zoomed_display_height": config['frame_height'], | ||
"zoomed_display_width": config['frame_width'], | ||
"zoom_factor": 0.1, | ||
} | ||
def construct(self): | ||
self.activate_zooming(animate=True) | ||
d = Dot() | ||
self.add(d) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Formulas | ||
================================= | ||
|
||
.. manim:: Formula1 | ||
:quality: medium | ||
:save_last_frame: | ||
|
||
class Formula1(Scene): | ||
def construct(self): | ||
t = MathTex(r"\int_a^b f'(x) dx = f(b)- f(a)") | ||
self.add(t) | ||
self.wait(1) |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
NeatProjects | ||
================================= | ||
|
||
This page is currently under construction. It will feature a selection of neat projects built with manim. |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Shapes | ||
================================= | ||
|
||
.. manim:: Shape1 | ||
:quality: medium | ||
:save_last_frame: | ||
|
||
class Shape1(Scene): | ||
def construct(self): | ||
d = Dot() | ||
c = Circle() | ||
s = Square() | ||
t = Triangle() | ||
d.next_to(c, RIGHT) | ||
s.next_to(c, LEFT) | ||
t.next_to(c, DOWN) | ||
self.add(d, c, s, t) | ||
self.wait(1) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Text | ||
================================= | ||
|
||
.. manim:: Text1 | ||
:quality: medium | ||
:save_last_frame: | ||
|
||
class Text1(Scene): | ||
def construct(self): | ||
t = TextMobject("Hello World") | ||
self.add(t) | ||
kolibril13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.