mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 18:07:49 +00:00
Added Ellipse
This commit is contained in:
parent
5169d6b297
commit
e139d54ba9
1 changed files with 13 additions and 0 deletions
|
|
@ -128,6 +128,19 @@ class Dot(Circle):
|
||||||
self.shift(point)
|
self.shift(point)
|
||||||
self.init_colors()
|
self.init_colors()
|
||||||
|
|
||||||
|
class Ellipse(VMobject):
|
||||||
|
CONFIG = {
|
||||||
|
"width" : 2,
|
||||||
|
"height" : 1
|
||||||
|
}
|
||||||
|
|
||||||
|
def generate_points(self):
|
||||||
|
circle = Circle(radius = 1)
|
||||||
|
circle = circle.stretch_to_fit_width(self.width)
|
||||||
|
circle = circle.stretch_to_fit_height(self.height)
|
||||||
|
self.points = circle.points
|
||||||
|
|
||||||
|
|
||||||
class AnnularSector(VMobject):
|
class AnnularSector(VMobject):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"inner_radius" : 1,
|
"inner_radius" : 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue