'Creating circles inside of an circle in Manim?
I want to create this image with manim. I created this image with the following code:
class Circles(Scene):
def construct(self):
circleOne = Circle()
circleTwo = Circle()
circleThree = Circle()
circleOne.shift(LEFT)
circleTwo.shift(UP)
circleThree.shift(RIGHT)
self.add(circleOne, circleTwo, circleThree)
self.wait(1)
How is it possible to put one big circle around my manim animation that it looks like here?
Solution 1:[1]
I just added another circle with a bigger radius than the other circles:
%%manim -qm AlignToTest
class AlignToTest(Scene):
def construct(self):
circleOne = Circle(radius=3.8)
circleTwo = Circle()
circleThree = Circle()
circleFour = Circle()
self.add(circleOne, circleTwo, circleThree, circleFour)
self.wait(1)
Here is the correct imitation of the image:
%%manim -qm AlignToTest
class AlignToTest(Scene):
def construct(self):
circleOne = Circle(radius = 2.4)
circleTwo = Circle(radius = 2.4)
circleThree = Circle(radius = 2.4)
circleFour = Circle(radius=3.8)
circleOne.shift(LEFT, UP)
circleTwo.shift(DOWN*1.4)
circleThree.shift(RIGHT, UP)
self.add(circleOne, circleTwo, circleThree, circleFour)
self.wait(1)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
