Commit graph

58 commits

Author SHA1 Message Date
Grant Sanderson
2708ecfd47 Fix Arrow.get_start 2020-08-20 17:13:24 -07:00
Grant Sanderson
fd17e42c23 Add about_point arg to Line.set_angle 2020-08-16 09:45:34 -07:00
Grant Sanderson
93f7671732 Fixes to Arrow 2020-07-22 18:17:08 -07:00
Grant Sanderson
9a44794dc9 Removes default color for polygon 2020-06-29 22:53:44 -07:00
Grant Sanderson
f11cb5a498 Small cleanups to arrow 2020-06-29 11:04:23 -07:00
Grant Sanderson
0b58572f41 Removes magic number 2020-06-28 12:15:55 -07:00
Grant Sanderson
1cab58ac49 Change how arrow is implemented to be all fill no stroke 2020-06-28 10:05:49 -07:00
Grant Sanderson
09df42a755 Acutually uses Arrow.preserve_tip_size_when_scaling 2020-06-22 15:22:05 -07:00
Grant Sanderson
48801f2892 Don't give arrow tip stroke width by default 2020-06-17 17:13:07 -07:00
Grant Sanderson
00ad9d7f95 Cleanup to square and rectangle init 2020-06-14 17:42:25 -07:00
Grant Sanderson
81cedfbfda Cleanup to the __init__ functions on a few geometry objects 2020-06-13 15:21:19 -07:00
Grant Sanderson
4385fc75d0 Change TipableVMobject to take in all tip_config at one spot 2020-06-06 10:56:23 -07:00
Grant Sanderson
e5a215cbd6 Have rectangles drawn in ccw order 2020-06-05 13:23:15 -07:00
Grant Sanderson
06123f956a Don't deepcopy Arrow by default 2020-02-27 17:19:50 +00:00
Grant Sanderson
b504899714 Replace np.clip with clip 2020-02-18 22:32:57 -08:00
Grant Sanderson
c654ca4506 Remove usage of np.append 2020-02-13 12:03:54 -08:00
Grant Sanderson
c780a7471b Default SVG paths and dots to have locked triangulation 2020-02-13 11:56:39 -08:00
Grant Sanderson
9835813679 Rename generate_points to init_points 2020-02-11 19:55:00 -08:00
Grant Sanderson
f8d7daa14f Change geometry mobjects to work with quadratic bezier curves 2020-02-05 14:46:25 -08:00
Grant Sanderson
8e15846ec5 Tiny clean to spacing 2019-09-26 11:04:35 -07:00
Grant Sanderson
0a695dd442 Changed Arrow default 2019-06-25 09:02:56 -07:00
Grant Sanderson
48f38b8940 Line.put_start_and_end_on should return self 2019-06-23 16:25:48 -07:00
Grant Sanderson
8ce13875a3 Added Line.set_length 2019-06-19 16:07:22 -07:00
Grant Sanderson
08eee147b3 Added TangentLine 2019-06-15 12:21:29 -07:00
Grant Sanderson
cfbbff1bdf Default color of Vector should be white 2019-06-13 16:14:03 -07:00
Stephen Wild
41539387a5 Documentation for TipableVMobject
Add an overview of TipableVMobject's functionality and a few comments, as well as grouping some methods by functionality (roughly).
2019-06-10 03:36:16 +08:00
Grant Sanderson
76f61c504b Remove unnecessary import 2019-04-21 08:13:05 -07:00
Grant Sanderson
c1e2ee7843 Changed arrow default max_stroke_width_to_length_ratio 2019-04-09 18:51:44 -07:00
Grant Sanderson
5dc6018df5 Added default args for Line and Vector 2019-04-06 11:52:23 -07:00
Grant Sanderson
26c7faabdd Hacky fix to Arrow scaling issue. There must be a better way to do this... 2019-04-04 14:29:10 -07:00
Grant Sanderson
22f8e24d41 Vector.scale was broken for vectors with length 0 2019-03-24 11:33:04 -07:00
Grant Sanderson
43f2145508 Change default max_stroke_width_to_length_ratio 2019-03-23 10:52:02 -07:00
Grant Sanderson
319b256b0c Fix to Arrow styling 2019-03-20 21:27:45 -07:00
James Norton
741ed593b2 Fix height setting in Ellipse initialization 2019-03-07 10:44:43 -05:00
Jean Whitmore
73a6c2400b Fixed CurvedArrow constructor by moving get_length() to base class.
I moved get_length() from the Line class to the shared base class,
TipableVMobject.

TESTED

python3 -m manim manim_tutorial_P37.py MoreShapes -pl
2019-03-03 07:53:15 -06:00
Jean Whitmore
61dbad5edd Revert "Reverted Cleaned Up Arrow Implementation (commit d489b5df5c77...)"
Undoing my revert of another commit because I found a fix.

This reverts commit cd29ff6e0d.
2019-03-03 07:42:00 -06:00
Jean Whitmore
cd29ff6e0d Reverted Cleaned Up Arrow Implementation (commit d489b5df5c77...) 2019-02-24 11:57:02 -06:00
jeanimal
2d552e0aa4
Fix Ellipse constructor: 'width' is not defined
Constructing an ellipse before gave the error "name 'width' is not defined"

I got this error when running the tutorial at https://github.com/zimmermant/manim_tutorial/blob/master/manim_tutorial_P37.py.

python3 -m manim manim_tutorial_P37.py MoreShapes -pl

Traceback (most recent call last):
  File "/Users/jeanwhitmore/Code/python3/manim/manimlib/extract_scene.py", line 153, in main
    scene = SceneClass(**scene_kwargs)
  File "/Users/jeanwhitmore/Code/python3/manim/manimlib/scene/scene.py", line 52, in __init__
    self.construct()
  File "manim_tutorial_P37.py", line 33, in construct
    ellipse=Ellipse(width=3, height=1, color=RED)
  File "/Users/jeanwhitmore/Code/python3/manim/manimlib/mobject/geometry.py", line 319, in __init__
    self.set_width(width, stretch=True)
NameError: name 'width' is not defined

After this fix, the Ellipse can be constructed and the animation is generated.

(Another shape is still broken, and I will try to fix that, too.)
2019-02-17 21:34:40 -06:00
Grant Sanderson
18de4c5404 Make it sound that Polygon.round_corners leaves it with evenly distributed anchors 2019-02-15 15:16:02 -08:00
Grant Sanderson
a6dd906983 Remove commented out Arrow tip_length default 2019-02-15 11:48:23 -08:00
Grant Sanderson
84b07bc347 Fixed Polygon.round_corners bug 2019-02-07 22:25:09 -08:00
Grant Sanderson
2449f3a284 Remove Grid 2019-02-07 21:59:32 -08:00
Grant Sanderson
5b5415cc3e Added round_corners method to Polygon 2019-02-07 21:57:40 -08:00
Grant Sanderson
7a488702e4 Changed Rectangle implementation 2019-02-07 21:24:00 -08:00
Grant Sanderson
d489b5df5c Cleaned up Arrow implementation 2019-02-07 21:14:43 -08:00
Grant Sanderson
0a65ee6725 Getting rid of use_rectangular_stem for Arrow 2019-02-07 17:53:11 -08:00
Grant Sanderson
9d132ed5e5 Cleaned up implementation of DashedLine 2019-02-07 15:41:54 -08:00
Grant Sanderson
0ecac2bfb4 Factored out Line.get_start and Line.get_end to be more general Mobject methods 2019-02-07 14:52:40 -08:00
Grant Sanderson
ce2b508e10 Cleaning up Line 2019-02-07 10:59:04 -08:00
Grant Sanderson
ef7b2919d2 Clean up Sector classes 2019-02-07 10:12:42 -08:00