0

I try to make convex lense. But not using SVGimages or other things. I want to define it in a class But ı'll get a black screen image. What should ı do? Ok, ı can fix it like following: a=ArcBetweenPoints(ORIGIN, UP, self.rad) and b=ArcBetweenPoints(UP, ORIGIN, self.rad) then add self.add(a,b). Ok, there is no problem. But why the self.add() wasn't used in Circle(Arc) class that was defined in manim packages. How can it work? Here is the code:

class YaşamÇiçeği(Mobject):

CONFIG = {
    "rad" : TAU / 6,
}

def __init__(self, **kwargs):
    Mobject.__init__(self)
    ArcBetweenPoints(ORIGIN, UP, self.rad)
    ArcBetweenPoints(UP, ORIGIN, self.rad)
SexyZecky
  • 9
  • 2

1 Answers1

0

All geometric figures are VMobjects, that is, Bezier curves. These VMobjects have a special method called generate_points, in the case of Arc is this.

The Circle class is a subclass of Arc (a particular case where Arc=360º), so you don't need to use the "add" method, both VMobjects and VGroups can also be containers, but the advantage of VMobjects is that you can explicitly define the shape of the paths. I recommend that you watch this video that I have already done so you can give yourself a better idea.

Recommendations: Do not use non-English symbols, it can bring you problems in the compilation. Also give a correct format to your code, learn the basics of Markdown in 5 minutes here.

TheoremOfBeethoven
  • 1,864
  • 6
  • 15